From 6d213aaf0040dc8f309d6847a584d09b662abc37 Mon Sep 17 00:00:00 2001
From: jinpengyong <jpy123456>
Date: Fri, 01 Mar 2024 09:59:10 +0800
Subject: [PATCH] fix:手持设备补充提交
---
screen-api/src/main/java/com/moral/api/controller/HandDeviceController.java | 33 +++------------------------------
1 files changed, 3 insertions(+), 30 deletions(-)
diff --git a/screen-api/src/main/java/com/moral/api/controller/HandDeviceController.java b/screen-api/src/main/java/com/moral/api/controller/HandDeviceController.java
index 4903b6a..fd03a5d 100644
--- a/screen-api/src/main/java/com/moral/api/controller/HandDeviceController.java
+++ b/screen-api/src/main/java/com/moral/api/controller/HandDeviceController.java
@@ -10,26 +10,20 @@
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
-
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
-
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.validation.Valid;
-
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.moral.api.entity.Device;
import com.moral.api.entity.HandDevice;
import com.moral.api.pojo.query.handdevice.HandDevicePageCond;
-import com.moral.api.service.DeviceService;
import com.moral.api.service.HandDeviceService;
-import com.moral.api.service.SpecialDeviceService;
import com.moral.api.utils.EasyExcelUtils;
import com.moral.api.utils.NoModelWriteData;
import com.moral.constant.PageResult;
-import com.moral.constant.ResponseCodeEnum;
import com.moral.constant.ResultMessage;
import com.moral.util.WebUtils;
@@ -49,12 +43,6 @@
@Autowired
private HandDeviceService handDeviceService;
-
- @Autowired
- private DeviceService deviceService;
-
- @Autowired
- private SpecialDeviceService specialDeviceService;
@PostMapping("/page")
@ApiOperation("������")
@@ -81,24 +69,9 @@
@PostMapping("/update")
@ApiOperation("������������������")
- public ResultMessage update(@RequestBody Device device){
- if (device.getId() == null) {
- return ResultMessage.fail(ResponseCodeEnum.PARAMETERS_IS_MISSING.getCode(),
- ResponseCodeEnum.PARAMETERS_IS_MISSING.getMsg());
- }
- /* if (device.getMac() != null) {
- //������mac���������������,���������������������������������������������
- QueryWrapper<Device> queryWrapper = new QueryWrapper<>();
- queryWrapper.eq("mac", device.getMac()).eq("is_delete", Constants.NOT_DELETE);
-
- QueryWrapper<SpecialDevice> specialDeviceQueryWrapper = new QueryWrapper<>();
- specialDeviceQueryWrapper.eq("mac", device.getMac()).eq("is_delete", Constants.NOT_DELETE);
- if (deviceService.getOne(queryWrapper) != null || specialDeviceService.getOne(specialDeviceQueryWrapper) != null) {
- return ResultMessage.fail(ResponseCodeEnum.MAC_IS_EXIST.getCode(), ResponseCodeEnum.MAC_IS_EXIST.getMsg());
- }
- }*/
- handDeviceService.update(device);
- return ResultMessage.ok();
+ public ResultMessage update(@RequestBody HandDevice handDevice){
+ HandDevice handDevice1 = handDeviceService.update(handDevice);
+ return ResultMessage.ok(handDevice1);
}
@GetMapping("/details")
--
Gitblit v1.8.0