From a376a001494a12c04b6a2a04bf797cbd7198d1f7 Mon Sep 17 00:00:00 2001
From: zss <zss@example.com>
Date: 星期三, 13 九月 2023 10:51:00 +0800
Subject: [PATCH] 修改1.0   9.13

---
 standard-server/src/main/java/com/yuanchu/mom/controller/TechnologyController.java |   26 ++++++++++++++------------
 1 files changed, 14 insertions(+), 12 deletions(-)

diff --git a/standard-server/src/main/java/com/yuanchu/mom/controller/TechnologyController.java b/standard-server/src/main/java/com/yuanchu/mom/controller/TechnologyController.java
index 1314d76..9ac1511 100644
--- a/standard-server/src/main/java/com/yuanchu/mom/controller/TechnologyController.java
+++ b/standard-server/src/main/java/com/yuanchu/mom/controller/TechnologyController.java
@@ -45,12 +45,9 @@
     }
 
     @ApiOperation("鍙充笂瑙掓柊澧�-->宸ヨ壓璺嚎")
-    @ApiImplicitParams(value = {
-            @ApiImplicitParam(name = "specificationsId", value = "鍨嬪彿id", dataTypeClass = Integer.class, required = true)
-    })
     @PostMapping("/add")
-    public Result<?> addTechnology(Integer specificationsId, @Validated @RequestBody TechnologyDto technologyDto) {
-        technologyService.addTechnology(specificationsId, technologyDto);
+    public Result<?> addTechnology(@Validated @RequestBody TechnologyDto technologyDto) {
+        technologyService.addTechnology(technologyDto);
         return Result.success("娣诲姞宸ヨ壓銆�" + technologyDto.getName() + "銆戞垚鍔�");
     }
 
@@ -69,17 +66,22 @@
         return Result.fail("鏇存柊澶辫触");
     }
 
-    @ApiOperation("娣诲姞鍚屼竴涓瀷鍙峰伐鑹鸿矾绾跨殑鐗堟湰")
+    @ApiOperation("閫夋嫨璁惧缁�,榧犳爣绉诲紑淇濆瓨")
     @ApiImplicitParams(value = {
-            @ApiImplicitParam(name = "specificationsId", value = "鍨嬪彿id", dataTypeClass = Integer.class, required = true),
-            @ApiImplicitParam(name = "version", value = "褰撳墠鐗堟湰", dataTypeClass = Integer.class, required = true)
+            @ApiImplicitParam(name = "id", value = "宸ヨ壓璺嚎id", dataTypeClass = Integer.class, required = true),
+            @ApiImplicitParam(name = "deviceGroup", value = "璁惧缁�", dataTypeClass = String.class, required = true)
+
     })
-    @PostMapping("/addVersion")
-    public Result<?> addVersion(Integer specificationsId ,Integer version) {
-        Integer version1 = technologyService.addVersion(specificationsId,version);
-        return Result.success("娣诲姞鍨嬪彿"+specificationsId+"鐨勫伐鑹鸿矾绾跨増鏈�"+version1+"鎴愬姛");
+    @PostMapping("/writeDevice")
+    public Result<?> writeDevice(Integer id, String deviceGroup) {
+        Integer write = technologyService.writeDevice(id, deviceGroup);
+        if (write >= 1) {
+            return Result.success("鏇存柊鎴愬姛");
+        }
+        return Result.fail("鏇存柊澶辫触");
     }
 
+
     @ApiOperation(value = "鍒犻櫎")
     @ApiImplicitParams(value = {
             @ApiImplicitParam(name = "id", value = "宸ヨ壓璺嚎id", dataTypeClass = Integer.class,required = true)

--
Gitblit v1.9.3