KqTemplateMapper.xml
1.89 KB
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper namespace="com.sincere.smartSearch.mapper.KqTemplateMapper">
<resultMap id="TemplateMap" type="com.sincere.smartSearch.model.KqTemplate">
<result column="config" property="config"/>
<result column="SchoolId" property="schoolId"/>
<result column="type" property="type"/>
</resultMap>
<select id="selectKqTemplate" resultMap="TemplateMap">
select XA_KqTemplate.config , XA_KqTemplate.SchoolId ,SZ_School.MsgTypes as type from XA_KqTemplate
join SZ_School on XA_KqTemplate.SchoolId = SZ_School.school_id
where XA_KqTemplate.State = 1 and XA_KqTemplate.ScenceType = 0
and (SZ_School.MsgTypes like '%4%' or SZ_School.MsgTypes like '%5%')
</select>
<resultMap id="TeacherMap" type="com.sincere.common.dto.smartCampus.KqTeacherDto">
<result column="user_id" property="userId"/>
<result column="school_id" property="schoolId"/>
<result column="name" property="name"/>
<result column="mobile" property="mobile"/>
<result column="pass" property="pass"/>
<result column="DingUserId" property="dingUserId"/>
<result column="QiYeHaoUserId" property="weChatUserId"/>
<result column="XSTOpenId" property="xSTOpenId"/>
<result column="face" property="face"/>
</resultMap>
<select id="selectSchoolTeacher" parameterType="java.lang.Integer" resultMap="TeacherMap">
select SZ_User.user_id , SZ_UserRole.school_id , SZ_User.name , SZ_User.mobile , SZ_User.pass ,
SZ_User.DingUserId , SZ_User.QiYeHaoUserId , SZ_User.XSTOpenId ,SZ_User.face
from SZ_User join SZ_UserRole on SZ_User.user_id = SZ_UserRole.user_id
where SZ_UserRole.school_id = #{schoolId} and SZ_UserRole.usertype = 0
</select>
</mapper>