Browse Source

获得电池类型

jaikuai 3 years ago
parent
commit
80e9092d34

+ 2 - 0
src/main/java/cn/fastfun/controller/api/ApiSysUserController.java

@@ -7,6 +7,7 @@ import com.bridge.service.JpaService;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
 import io.swagger.annotations.ApiParam;
+import org.springframework.util.DigestUtils;
 import org.springframework.web.bind.annotation.RequestBody;
 import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.RequestMethod;
@@ -37,6 +38,7 @@ public class ApiSysUserController {
     @ApiOperation(value = "保存信息")
     @RequestMapping(value = "save", method = RequestMethod.POST)
     public ApiDTO save(@RequestBody @ApiParam(name = "系统账号对象", value = "传入json格式", required = true) SysUser entity) {
+        if (null != entity) entity.setUserPass(DigestUtils.md5DigestAsHex(entity.getUserPass().getBytes()));
         return ApiDTO.ok("保存成功", sysUserService.save(entity));
     }
 

+ 2 - 0
src/main/java/cn/fastfun/controller/param/DeviceBathQueryParam.java

@@ -3,4 +3,6 @@ package cn.fastfun.controller.param;
 import com.bridge.dto.QueryParam;
 
 public class DeviceBathQueryParam extends QueryParam {
+
+
 }