warningNotificationMapper.xml
2.05 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
<?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="cn.com.glsx.dj.mindworkplate.mapper.WarningNotificationMapper" >
<resultMap id="BaseResultMap" type="cn.com.glsx.dj.mindworkplate.model.WarningNotification" >
<!--
WARNING - @mbg.generated
-->
<id column="id" property="id" jdbcType="BIGINT" />
<result column="warning_type" property="warningType" jdbcType="TINYINT" />
<result column="warning_tag" property="warningTag" jdbcType="VARCHAR" />
<result column="warning_time" property="warningTime" jdbcType="TIMESTAMP" />
<result column="warning_title" property="warningTitle" jdbcType="VARCHAR" />
<result column="warning_content" property="warningContent" jdbcType="VARCHAR" />
<result column="warning_person_uuid" property="warningPersonUuid" jdbcType="VARCHAR" />
<result column="warning_person_name" property="warningPersonName" jdbcType="VARCHAR" />
<result column="warning_person_phone" property="warningPersonPhone" jdbcType="VARCHAR" />
<result column="create_time" property="createTime" jdbcType="TIMESTAMP" />
</resultMap>
<sql id="Base_Column_List" >
<!--
WARNING - @mbg.generated
-->
id, warning_type, warning_tag, warning_time, warning_title, warning_content, warning_person_uuid,
warning_person_name, warning_person_phone, create_time
</sql>
<select id="findWarningNotificationPage"
resultMap="BaseResultMap">
select
pmb.id,warning_type, warning_tag, warning_time, warning_title, warning_content, warning_person_uuid,
warning_person_name, warning_person_phone, create_time,pmb.status
from warning_notification t1
left join pad_message_box pmb on t1.msg_bos_id = pmb.id and pmb.del_flag = 'N'
where 1 = 1
<if test="condition.warningPersonPhone != null and condition.warningPersonPhone != ''">
and t1.warning_person_phone = #{condition.warningPersonPhone}
</if>
order by pmb.status asc, t1.create_time desc
</select>
</mapper>