同步代码
This commit is contained in:
parent
ce9b6f4ce4
commit
351e45cc09
@ -1,5 +1,6 @@
|
||||
package com.fastbee.data.controller;
|
||||
|
||||
import java.util.Comparator;
|
||||
import java.util.List;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
@ -53,11 +54,24 @@ public class AlertLogController extends BaseController
|
||||
@ApiOperation("查询设备告警列表")
|
||||
// @PreAuthorize("@ss.hasPermi('iot:alertLog:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(AlertLog alertLog)
|
||||
public AjaxResult list(AlertLog alertLog)
|
||||
{
|
||||
startPage();
|
||||
// startPage();
|
||||
List<AlertLog> list = alertLogService.selectAlertLogList(alertLog);
|
||||
return getDataTable(list);
|
||||
// 获取排序类型
|
||||
String sort = alertLog.getSort();
|
||||
if(sort != null){
|
||||
//对列表进行排序
|
||||
//升序
|
||||
if(sort.equals("1")){
|
||||
list.sort(Comparator.comparing(AlertLog::getCreateTime));
|
||||
}
|
||||
//降序
|
||||
else if(sort.equals("2")){
|
||||
list.sort(Comparator.comparing(AlertLog::getCreateTime).reversed());
|
||||
}
|
||||
}
|
||||
return success(list);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -0,0 +1,50 @@
|
||||
package com.fastbee.data.controller.aaScreenAgricultural;
|
||||
|
||||
import com.fastbee.common.core.controller.BaseController;
|
||||
import com.fastbee.common.core.domain.AjaxResult;
|
||||
import com.fastbee.deviceInfo.mapper.DeviceInformationWormsMapper;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
@RestController
|
||||
@RequestMapping("/device/info")
|
||||
public class DeviceInfoController extends BaseController {
|
||||
|
||||
@Autowired
|
||||
private DeviceInformationWormsMapper deviceInformationWormsMapper;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 查询虫情设备列表
|
||||
*/
|
||||
@GetMapping("/wormList")
|
||||
public AjaxResult getDeviceList() {
|
||||
return success();
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询气象设备列表
|
||||
*/
|
||||
@GetMapping("/weatherList")
|
||||
public AjaxResult getWeatherList() {
|
||||
return success();
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询墒情设备列表
|
||||
*/
|
||||
@GetMapping("/soilList")
|
||||
public AjaxResult getSoilList() {
|
||||
return success();
|
||||
}
|
||||
/**
|
||||
* 查询杀虫灯设备列表
|
||||
*/
|
||||
@GetMapping("/lightList")
|
||||
public AjaxResult getLightList() {
|
||||
return success();
|
||||
}
|
||||
}
|
@ -23,4 +23,5 @@ public class RenKeUserDeviceOverviewController {
|
||||
return AjaxResult.success(renkeUserDeviceOverview.getsysAllUserDevice());
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
@ -70,4 +70,6 @@ public class AlertLog extends BaseEntity
|
||||
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date endTime;
|
||||
|
||||
private String sort ;//排序类型1升序2降序根据时间
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user