提交 | 用户 | 时间
|
0a7d0f
|
1 |
<?xml version="1.0" encoding="UTF-8" ?> |
潘 |
2 |
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" > |
|
3 |
<mapper namespace="com.iailab.module.model.mcs.sche.dao.StScheduleSchemeDao"> |
|
4 |
|
|
5 |
<select id="getAlarmAndSuggestPage" resultType="com.iailab.module.model.api.mcs.dto.StAlarmAndSuggestRespVO"> |
|
6 |
select |
|
7 |
t.type, |
|
8 |
t.title, |
|
9 |
t.content, |
|
10 |
t.time, |
|
11 |
t.obj |
|
12 |
from ( |
|
13 |
select 'alarm' type, t1.title, t1.content, t1.alarm_time `time`, t1.alarm_obj obj |
|
14 |
from t_mm_predict_alarm_message t1 |
|
15 |
UNION |
|
16 |
select 'suggest' type, t2.title, t2.content, t2.schedule_time `time`, t2.schedule_obj obj |
|
17 |
from t_st_schedule_suggest t2 |
|
18 |
) t |
|
19 |
<where> |
|
20 |
<if test="params.obj != null and params.obj != ''"> |
|
21 |
and t.obj = #{obj} |
|
22 |
</if> |
|
23 |
<if test="params.startTime != null and params.startTime != ''"> |
|
24 |
and t.time >= #{startTime} |
|
25 |
</if> |
|
26 |
<if test="params.endTime != null and params.endTime != ''"> |
|
27 |
and t.time <= #{endTime} |
|
28 |
</if> |
|
29 |
</where> |
|
30 |
order by t.time desc |
|
31 |
|
|
32 |
</select> |
|
33 |
</mapper> |