|
@@ -2,6 +2,8 @@ package com.bizmatics.controller.web;
|
|
|
|
|
|
|
|
|
import com.bizmatics.common.core.bean.ApiResult;
|
|
|
+import com.bizmatics.model.Device;
|
|
|
+import com.bizmatics.persistence.mapper.DeviceMapper;
|
|
|
import com.bizmatics.service.DeviceService;
|
|
|
import com.bizmatics.service.vo.DeviceCountVO;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
@@ -11,6 +13,7 @@ import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
import org.springframework.web.bind.annotation.RequestParam;
|
|
|
import org.springframework.web.bind.annotation.RestController;
|
|
|
|
|
|
+import java.util.ArrayList;
|
|
|
import java.util.Date;
|
|
|
import java.util.List;
|
|
|
|
|
@@ -26,6 +29,9 @@ public class DeviceController {
|
|
|
@Autowired
|
|
|
private DeviceService deviceService;
|
|
|
|
|
|
+ @Autowired
|
|
|
+ private DeviceMapper deviceMapper;
|
|
|
+
|
|
|
|
|
|
/**
|
|
|
* 查询设备总数
|
|
@@ -48,5 +54,15 @@ public class DeviceController {
|
|
|
public ApiResult<DeviceCountVO> selectDeviceCountByType(@RequestParam Integer site){
|
|
|
return ApiResult.success(deviceService.selectDeviceCountByType(site));
|
|
|
}
|
|
|
+
|
|
|
+ @GetMapping("/test")
|
|
|
+ public List<String> test(){
|
|
|
+ List<Device> list = deviceMapper.list(1, null, null, null, null, null);
|
|
|
+ List<String> list1 = new ArrayList<>();
|
|
|
+ for (Device device:list) {
|
|
|
+ list1.add(device.getDeviceCode());
|
|
|
+ }
|
|
|
+ return list1;
|
|
|
+ }
|
|
|
}
|
|
|
|