Commit 64f32ae8 authored by chenzhao's avatar chenzhao

修改bug

parent d7d08e65
......@@ -135,31 +135,25 @@
<where>
a.is_delete = 0
<if test="alertStatus!= null ">
and alert_status = #{alertStatus}
and a.alert_status = #{alertStatus}
</if>
<if test="startTime!= null and endTime != null">
and call_time between #{startTime} and #{endTime}
and a.call_time between #{startTime} and #{endTime}
</if>
<if test="alertTypeCode!= null ">
and alarm_type_code = #{alertTypeCode}
and a.alarm_type_code = #{alertTypeCode}
</if>
<if test="alertSourceCode!= null ">
and alert_source_code = #{alertSourceCode}
</if>
<if test="data == 'address' and data != null and lift == 'ascend'">
order by CONVERT(address USING 'gbk') ASC limit #{current},#{size}
</if>
<if test="data == 'address' and data != null and lift == 'descend'">
order by CONVERT(address USING 'gbk') DESC limit #{current},#{size}
and a.alert_source_code = #{alertSourceCode}
</if>
<if test="data != null and data != 'address' and lift == 'ascend'">
order by #{data} ASC limit #{current},#{size}
<if test="data == 'address' and data != null and lift != null ">
order by CONVERT(address USING 'gbk') ${lift} limit #{current},#{size}
</if>
<if test="data != null and data != 'address' and lift == 'descend'">
order by #{data} DESC limit #{current},#{size}
<if test="data != null and data != 'address' and lift != null ">
order by ${data} ${lift} limit #{current},#{size}
</if>
<if test="data == null ">
order by call_time DESC limit #{current},#{size}
order by a.call_time DESC limit #{current},#{size}
</if>
</where>
</select>
......
......@@ -178,6 +178,14 @@ public class AlertCalledServiceImpl extends BaseService<AlertCalledDto, AlertCal
split[0] = "alertStatus";
}
}
if (split[1] != null){
if (split[1].equals("ascend")){
split[1] = "ASC";
}
if (split[1].equals("descend")){
split[1] = "DESC";
}
}
String data = split != null ? RedisKey.humpToLine(split[0]) : null;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment