|
@@ -1,10 +1,22 @@
|
|
|
package com.huimv.receive.controller;
|
|
|
|
|
|
|
|
|
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
|
+import com.huimv.receive.common.utils.Result;
|
|
|
+import com.huimv.receive.common.utils.ResultCode;
|
|
|
+import com.huimv.receive.entity.BaseDevice;
|
|
|
+import com.huimv.receive.entity.BaseLocation;
|
|
|
+import com.huimv.receive.service.IBaseDeviceService;
|
|
|
+import com.huimv.receive.service.IBaseLocationService;
|
|
|
+import org.springframework.beans.factory.annotation.Autowired;
|
|
|
+import org.springframework.web.bind.annotation.PostMapping;
|
|
|
+import org.springframework.web.bind.annotation.RequestBody;
|
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
|
|
|
import org.springframework.web.bind.annotation.RestController;
|
|
|
|
|
|
+import java.util.Map;
|
|
|
+
|
|
|
/**
|
|
|
* <p>
|
|
|
* 前端控制器
|
|
@@ -14,7 +26,21 @@ import org.springframework.web.bind.annotation.RestController;
|
|
|
* @since 2023-09-04
|
|
|
*/
|
|
|
@RestController
|
|
|
-@RequestMapping("/base-device")
|
|
|
+@RequestMapping("/baseDevice")
|
|
|
public class BaseDeviceController {
|
|
|
+ @Autowired
|
|
|
+ private IBaseDeviceService baseDeviceService;
|
|
|
+
|
|
|
+
|
|
|
+ @PostMapping("/addDevice")
|
|
|
+ public Result addDevice(@RequestBody BaseDevice baseDevice){
|
|
|
+ return baseDeviceService.addDevice(baseDevice);
|
|
|
+ }
|
|
|
+
|
|
|
+ @PostMapping("/updateDevice")
|
|
|
+ public Result updateDevice(@RequestBody BaseDevice baseDevice){
|
|
|
+ return baseDeviceService.updateDevice(baseDevice);
|
|
|
+ }
|
|
|
+
|
|
|
|
|
|
}
|