<?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.gistack.sm.hk.mapper.HkEventMapper">
|
|
<!--自定义分页列表查询-->
|
<select id="selectHkEventPage" resultType="cn.gistack.sm.hk.vo.HkEventVO">
|
select
|
she.*,
|
bdb.dict_value as eventTypeName
|
from YWXT.sm_hk_event she
|
left join YWXT.blade_dict_biz bdb on bdb.dict_key = she.event_type and bdb.is_deleted = 0 and code = 'EVENT_TYPE'
|
where 1 =1
|
<if test="hkEvent.srcName!=null and hkEvent.srcName!=''">
|
and she.src_name like concat('%',#{hkEvent.srcName},'%')
|
</if>
|
<if test="hkEvent.eventTypeName!=null and hkEvent.eventTypeName!=''">
|
and bdb.dict_value like concat('%',#{hkEvent.eventTypeName},'%')
|
</if>
|
<if test="hkEvent.status!=null">
|
and she.status = #{hkEvent.status}
|
</if>
|
<if test="hkEvent.eventType!=null">
|
and she.event_type = #{hkEvent.eventType}
|
</if>
|
<if test="hkEvent.startTime !=null and hkEvent.startTime !=''">
|
AND DATE_FORMAT(she.send_time,'%Y-%m-%d') >= #{hkEvent.startTime}
|
</if>
|
<if test="hkEvent.endTime !=null and hkEvent.endTime !=''">
|
AND DATE_FORMAT(she.send_time,'%Y-%m-%d') <= #{hkEvent.endTime}
|
</if>
|
order by she.id desc
|
</select>
|
|
</mapper>
|