|
|
@@ -41,17 +41,26 @@ public class DeviceController {
|
|
|
|
|
|
@Autowired
|
|
|
DeviceService deviceService;
|
|
|
-
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 设备查询
|
|
|
+ * @param req
|
|
|
+ * @return
|
|
|
+ */
|
|
|
@PostMapping("search")
|
|
|
@ResponseBody
|
|
|
@Operation(summary = "查询设备")
|
|
|
@Parameter(name="token",description = "token",required = true,in = ParameterIn.HEADER)
|
|
|
- public ResultPage<Device> blurrySearch(@RequestBody DeviceSearchReq req){
|
|
|
- log.info("blurrySearch>>:{}",req);
|
|
|
- return deviceService.blurrySearch(req);
|
|
|
+ public ResultPage<Device> selectSearch(@RequestBody DeviceSearchReq req){
|
|
|
+ log.info("selectSearch>>:{}",req);
|
|
|
+ return deviceService.selectSearch(req);
|
|
|
}
|
|
|
|
|
|
-
|
|
|
+ /**
|
|
|
+ * 设备详情
|
|
|
+ * @param req
|
|
|
+ * @return
|
|
|
+ */
|
|
|
@PostMapping("detail")
|
|
|
@ResponseBody
|
|
|
@Operation(summary = "设备详情")
|
|
|
@@ -59,8 +68,12 @@ public class DeviceController {
|
|
|
log.info("detail>>:{}",req);
|
|
|
return deviceService.detail(req.getId());
|
|
|
}
|
|
|
-
|
|
|
|
|
|
+ /**
|
|
|
+ * 设备添加
|
|
|
+ * @param req
|
|
|
+ * @return
|
|
|
+ */
|
|
|
@HandleLog
|
|
|
@PostMapping("add")
|
|
|
@ResponseBody
|
|
|
@@ -73,7 +86,12 @@ public class DeviceController {
|
|
|
}
|
|
|
return deviceService.add(req);
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 修改设备
|
|
|
+ * @param req
|
|
|
+ * @return
|
|
|
+ */
|
|
|
@HandleLog
|
|
|
@PostMapping("edit")
|
|
|
@ResponseBody
|
|
|
@@ -87,6 +105,11 @@ public class DeviceController {
|
|
|
return deviceService.edit(req);
|
|
|
}
|
|
|
|
|
|
+ /**
|
|
|
+ * 根据Mac修改设备
|
|
|
+ * @param req
|
|
|
+ * @return
|
|
|
+ */
|
|
|
@HandleLog
|
|
|
@PostMapping("editMac")
|
|
|
@ResponseBody
|
|
|
@@ -98,7 +121,11 @@ public class DeviceController {
|
|
|
return deviceService.editMac(req);
|
|
|
}
|
|
|
|
|
|
-
|
|
|
+ /**
|
|
|
+ * 删除设备
|
|
|
+ * @param req
|
|
|
+ * @return
|
|
|
+ */
|
|
|
@HandleLog
|
|
|
@PostMapping("delete")
|
|
|
@ResponseBody
|
|
|
@@ -111,7 +138,12 @@ public class DeviceController {
|
|
|
}
|
|
|
return deviceService.delete(req.getId());
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 查询设备记录
|
|
|
+ * @param req
|
|
|
+ * @return
|
|
|
+ */
|
|
|
@PostMapping("searchRecord")
|
|
|
@ResponseBody
|
|
|
@Operation(summary = "查询设备记录")
|
|
|
@@ -120,7 +152,11 @@ public class DeviceController {
|
|
|
log.info("searchRecord>>:{}",req);
|
|
|
return deviceService.searchRecord(req);
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 统计各省设备数
|
|
|
+ * @return
|
|
|
+ */
|
|
|
@PostMapping("countProvinceDevice")
|
|
|
@ResponseBody
|
|
|
@Operation(summary = "统计各省设备数")
|
|
|
@@ -129,7 +165,11 @@ public class DeviceController {
|
|
|
log.info("searchRecord>>");
|
|
|
return deviceService.countProvinceDevice();
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 统计在线设备数
|
|
|
+ * @return
|
|
|
+ */
|
|
|
@PostMapping("countOnlineDevice")
|
|
|
@ResponseBody
|
|
|
@Operation(summary = "统计在线设备数")
|
|
|
@@ -138,7 +178,12 @@ public class DeviceController {
|
|
|
log.info("countOnlineDevice>>");
|
|
|
return deviceService.countOnlineDevice();
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 生成设备信息二维码
|
|
|
+ * @param req
|
|
|
+ * @return
|
|
|
+ */
|
|
|
@PostMapping("qrCode")
|
|
|
@ResponseBody
|
|
|
@Operation(summary = "生成设备信息二维码")
|
|
|
@@ -147,7 +192,12 @@ public class DeviceController {
|
|
|
log.info("qrCode>>:{}",req);
|
|
|
return deviceService.qrCode(req.getId());
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 设备用户绑定
|
|
|
+ * @param req
|
|
|
+ * @return
|
|
|
+ */
|
|
|
@PostMapping("bind")
|
|
|
@ResponseBody
|
|
|
@Operation(summary = "设备用户绑定")
|