Newspaper há 1 ano atrás
pai
commit
ae9356a47d

+ 3 - 2
snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/user/controller/BizUserController.java

@@ -262,9 +262,10 @@ public class BizUserController {
     @ApiOperationSupport(order = 12)
     @ApiOperation("更新平台类别")
     @GetMapping("/biz/user/updatePlatformType")
-    public CommonResult<String> updatePlatformType(@Valid BizUserPlatformParam bizUserPlatformParam) {
+    public CommonResult<BizUser> updatePlatformType(@Valid BizUserPlatformParam bizUserPlatformParam) {
         bizUserService.updatePlatformType(bizUserPlatformParam);
-        return CommonResult.ok();
+        BizUser user = bizUserService.getById(bizUserPlatformParam.getId());
+        return CommonResult.data(user);
     }
 
     /**

+ 2 - 1
snowy-plugin/snowy-plugin-biz/src/main/java/vip/xiaonuo/biz/modular/user/param/BizUserPlatformParam.java

@@ -17,6 +17,7 @@ import lombok.Getter;
 import lombok.Setter;
 
 import javax.validation.constraints.NotBlank;
+import javax.validation.constraints.NotNull;
 
 /**
  * 人员Id参数
@@ -35,6 +36,6 @@ public class BizUserPlatformParam {
 
     /** 平台类型 */
     @ApiModelProperty(value = "平台类型 1:企业 2:牧场", required = true)
-    @NotBlank(message = "platformType不能为空")
+    @NotNull(message = "platformType不能为空")
     private Integer platformType;
 }