Commit 5d5c2be4 authored by tangwei's avatar tangwei

修改bug

parent 3088e793
...@@ -126,16 +126,16 @@ ...@@ -126,16 +126,16 @@
<if test="alertSourceCode!= null "> <if test="alertSourceCode!= null ">
and alert_source_code = #{alertSourceCode} and alert_source_code = #{alertSourceCode}
</if> </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> </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> </select>
......
...@@ -150,9 +150,12 @@ public class AlertCalledServiceImpl extends BaseService<AlertCalledDto, AlertCal ...@@ -150,9 +150,12 @@ public class AlertCalledServiceImpl extends BaseService<AlertCalledDto, AlertCal
String startTime, String startTime,
String endTime, String endTime,
String sort) { 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); List<AlertCalled> list = alertCalledMapper.selectAllPage(pageBean.getCurrent(), pageBean.getSize(), alertStatus, alertTypeCode, alertSourceCode, startTime, endTime,data,lift);
IPage<AlertCalled> iPage = new Page<>(); IPage<AlertCalled> iPage = new Page<>();
iPage.setRecords(list); 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