Просмотр исходного кода

add: 添加注册用户wifi信息

Your Name 1 год назад
Родитель
Сommit
3a8fecf3d1

+ 4 - 20
src/main/java/com/tuoren/forward/controller/UserConfigController.java

@@ -49,17 +49,17 @@ public class UserConfigController {
     }
     }
 
 
     /**
     /**
-     * 添加
+     * 修改添加
      * @param req
      * @param req
      * @return
      * @return
      */
      */
-    @PostMapping("add")
+    @PostMapping("config")
     @ResponseBody
     @ResponseBody
-    @Operation(summary = "添加用户配置表")
+    @Operation(summary = "修改添加用户配置表")
     @Parameter(name="token",description = "token",required = true,in = ParameterIn.HEADER)
     @Parameter(name="token",description = "token",required = true,in = ParameterIn.HEADER)
     public Result add(@RequestBody UserConfig req) throws  Exception{
     public Result add(@RequestBody UserConfig req) throws  Exception{
         log.info("addUserConfig>>:{}",req);
         log.info("addUserConfig>>:{}",req);
-        return userConfigService.add(req);
+        return userConfigService.config(req);
     }
     }
 
 
     /**
     /**
@@ -76,21 +76,5 @@ public class UserConfigController {
         return userConfigService.delete(req.getId());
         return userConfigService.delete(req.getId());
     }
     }
 
 
-    /**
-     * 根据用户id进行修改
-     * @param req
-     * @return
-     */
-    @PostMapping("update")
-    @ResponseBody
-    @Operation(summary = "修改用户配置表")
-    @Parameter(name="token",description = "token",required = true,in = ParameterIn.HEADER)
-    public Result edit(@RequestBody UserConfig req){
-        log.info("updateUserConfig>>:{}",req);
-        if(StringUtil.isEmpty(req.getId())) {
-            return Result.fail(CommonConstant.LACK_PARAM);
-        }
-        return userConfigService.edit(req);
-    }
 
 
 }
 }

+ 10 - 2
src/main/java/com/tuoren/forward/entity/UserConfig.java

@@ -1,7 +1,8 @@
 package com.tuoren.forward.entity;
 package com.tuoren.forward.entity;
 
 
+import com.alibaba.fastjson2.JSONArray;
 import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
 import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
-import com.tuoren.forward.util.WifiListDeserializer;
+//import com.tuoren.forward.util.WifiListDeserializer;
 import io.swagger.v3.oas.annotations.media.Schema;
 import io.swagger.v3.oas.annotations.media.Schema;
 import lombok.Data;
 import lombok.Data;
 
 
@@ -14,18 +15,25 @@ public class UserConfig {
     private String id;
     private String id;
 
 
     @Schema(description = "wifi信息:[{“name”:'tuoren1',“password”:'12345678'},{},{},...]")
     @Schema(description = "wifi信息:[{“name”:'tuoren1',“password”:'12345678'},{},{},...]")
-    @JsonDeserialize(using = WifiListDeserializer.class)
+//    @JsonDeserialize(using = WifiListDeserializer.class)
     private String wifi;
     private String wifi;
 
 
+
     @Schema(description = "医院数据对接服务地址")
     @Schema(description = "医院数据对接服务地址")
     private String localAddress;
     private String localAddress;
 
 
     @Schema(description = "医院数据对接服务端口")
     @Schema(description = "医院数据对接服务端口")
     private Integer localPort;
     private Integer localPort;
 
 
+    @Schema(description = "设备密钥")
+    private String deviceSecret;
+
     @Schema(description = "创建时间")
     @Schema(description = "创建时间")
     private Date createtime;
     private Date createtime;
 
 
     @Schema(description = "修改时间")
     @Schema(description = "修改时间")
     private Date modifytime;
     private Date modifytime;
+
+
+
 }
 }