| | |
| | | |
| | | <!--自定义分页列表查询--> |
| | | <select id="selectHkEventPage" resultType="cn.gistack.sm.hk.vo.HkEventVO"> |
| | | select * from sm_hk_event where 1 =1 |
| | | 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 src_name like concat('%',#{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 status = #{hkEvent.status} |
| | | and she.status = #{hkEvent.status} |
| | | </if> |
| | | <if test="hkEvent.eventType!=null"> |
| | | and event_type = #{hkEvent.eventType} |
| | | and she.event_type = #{hkEvent.eventType} |
| | | </if> |
| | | <if test="hkEvent.startTime !=null and hkEvent.startTime !=''"> |
| | | AND send_time >= #{hkEvent.startTime} |
| | | AND DATE_FORMAT(she.send_time,'%Y-%m-%d') >= #{hkEvent.startTime} |
| | | </if> |
| | | <if test="hkEvent.endTime !=null and hkEvent.endTime !=''"> |
| | | AND send_time <= #{hkEvent.endTime} |
| | | AND DATE_FORMAT(she.send_time,'%Y-%m-%d') <= #{hkEvent.endTime} |
| | | </if> |
| | | </select> |
| | | |