RegisterPushMapper.xml
2.28 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
<?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.RegisterPushMapper" >
<resultMap id="BindPushDto" type="com.sincere.common.dto.smartCampus.BindPushDto" >
<result column="SchoolId" property="schoolId" />
<result column="SchoolName" property="schoolName" />
<result column="type" property="type" />
<result column="BeginDate" property="beginDate" />
<result column="EndDate" property="endDate" />
<result column="IntervalDays" property="intervalDays" />
<result column="PushTime" property="pushTime" />
<result column="Msg" property="msg" />
</resultMap>
<select id="selectBindPushSchool" resultType="java.lang.Integer" resultMap="BindPushDto">
select SchoolId , SchoolName , type , BeginDate , EndDate , IntervalDays , PushTime , Msg from EM_QYHID where isPush = 1
</select>
<resultMap id="ParentMap" type="com.sincere.common.dto.smartCampus.ParentDto">
<result column="school_id" property="schoolId"/>
<result column="ParentMobile" property="mobile"/>
</resultMap>
<select id="selectNotFollow" parameterType="java.lang.Integer" resultMap="ParentMap">
SELECT SZ_V_School_Student.school_id , SZ_V_School_Student.ParentMobile FROM SZ_V_School_Student WHERE not EXISTS
(SELECT NULL
FROM SZ_V_School_Parent
WHERE SZ_V_School_Parent.class_id = SZ_V_School_Student.class_id
AND SZ_V_School_Parent.parent_mobile = SZ_V_School_Student.ParentMobile
)
and school_id = #{schoolId}
</select>
<resultMap id="ParentMap2" type="com.sincere.common.dto.smartCampus.ParentDto">
<result column="school_id" property="schoolId"/>
<result column="mobile" property="mobile"/>
</resultMap>
<select id="selectNotBind" parameterType="java.util.Map" resultMap="ParentMap2">
SELECT SZ_V_School_Parent.school_id , SZ_V_School_Parent.mobile FROM SZ_V_School_Parent
WHERE school_id = #{schoolId}
<if test="type == 4">
and ( DingUserId is null or DingUserId = '' )
</if>
<if test="type == 5">
and ( QiYeHaoUserId is null or QiYeHaoUserId = '' )
</if>
</select>
</mapper>