Commit 5d5c2be4 authored by tangwei's avatar tangwei

修改bug

parent 3088e793
......@@ -126,16 +126,16 @@
<if test="alertSourceCode!= null ">
and alert_source_code = #{alertSourceCode}
</if>
<if test="data != null and lift == 'ascend'">
order by #{data} ASC limit #{current},#{size}
</if>
<if test="data != null and lift == 'descend'">
order by #{data} DESC limit #{current},#{size}
</if>
<if test="data == null ">
order by call_time DESC limit #{current},#{size}
</if>
</where>
<if test="data != null and lift == 'ascend'">
order by #{data} ASC limit #{current},#{size}
</if>
<if test="data != null and lift == 'descend'">
order by #{data} DESC limit #{current},#{size}
</if>
<if test="data == null ">
order by call_time DESC limit #{current},#{size}
</if>
</select>
......
......@@ -150,9 +150,12 @@ public class AlertCalledServiceImpl extends BaseService<AlertCalledDto, AlertCal
String startTime,
String endTime,
String sort) {
String[] split = sort.split(",");
String data = RedisKey.humpToLine(split[0]);
String lift =split[1];
String[] split = sort!=null? sort.split(","):null;
String data = split!=null? RedisKey.humpToLine(split[0]):null;
String lift =split!=null?split[1]:null;
List<AlertCalled> list = alertCalledMapper.selectAllPage(pageBean.getCurrent(), pageBean.getSize(), alertStatus, alertTypeCode, alertSourceCode, startTime, endTime,data,lift);
IPage<AlertCalled> iPage = new Page<>();
iPage.setRecords(list);
......
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