浏览代码

Merge branch 'feature/0721-tenant'

haonan 2 年之前
父节点
当前提交
643a6ea018

+ 2 - 2
cooleshow-user/user-admin/src/main/java/com/yonge/cooleshow/admin/controller/TenantInfoController.java

@@ -54,7 +54,7 @@ public class TenantInfoController extends BaseController {
     @PostMapping("/add")
     @ApiOperation(value = "更新", notes = "传入TenantInfo")
     @PreAuthorize("@pcs.hasPermissions('tenantInfo/add')")
-    public HttpResponseResult<Boolean> add(@Validated @RequestBody TenantInfoVo.TenantInfo info) {
+    public HttpResponseResult<Boolean> add( @RequestBody TenantInfoVo.TenantInfo info) {
         return succeed(tenantInfoService.add(JSON.parseObject(info.jsonString(), TenantInfo.class)));
     }
 
@@ -64,7 +64,7 @@ public class TenantInfoController extends BaseController {
     @PostMapping("/update")
     @ApiOperation(value = "修改", notes = "传入TenantInfo")
     @PreAuthorize("@pcs.hasPermissions('tenantInfo/update')")
-    public HttpResponseResult<Boolean> update(@Valid @RequestBody TenantInfoVo.TenantInfo info) {
+    public HttpResponseResult<Boolean> update( @RequestBody TenantInfoVo.TenantInfo info) {
         return succeed(tenantInfoService.update(JSON.parseObject(info.jsonString(), TenantInfo.class)));
     }
 

+ 0 - 5
cooleshow-user/user-admin/src/main/java/com/yonge/cooleshow/admin/io/request/TenantInfoVo.java

@@ -27,7 +27,6 @@ public class TenantInfoVo {
         private Long id;
 
         @ApiModelProperty("名称")
-        @NotNull
         private String name;
 
         @ApiModelProperty("logo")
@@ -37,15 +36,12 @@ public class TenantInfoVo {
         private String briefIntroduction;
 
         @ApiModelProperty("省份编码")
-        @NotNull
         private Integer provinceCode;
 
         @ApiModelProperty("城市编码")
-        @NotNull
         private Integer cityCode;
 
         @ApiModelProperty("地区/街道")
-        @NotNull
         private Integer regionCode;
 
         @ApiModelProperty("联系人")
@@ -53,7 +49,6 @@ public class TenantInfoVo {
         private String username;
 
         @ApiModelProperty("手机号")
-        @NotNull
         @Pattern(regexp = "^1\\d{10}$", message = "手机号码格式错误")
         private String phone;
 

+ 1 - 0
cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/wrapper/TenantApplyRecordWrapper.java

@@ -188,6 +188,7 @@ public class TenantApplyRecordWrapper {
     @ApiModel("机构审核")
     public static class TenantEntry {
         @ApiModelProperty("审核理由")
+        @NotNull
         private String reason;
 
         @ApiModelProperty("是否通过")

+ 3 - 1
cooleshow-user/user-tenant/src/main/java/com/yonge/cooleshow/tenant/controller/TenantUnbindRecordController.java

@@ -66,7 +66,9 @@ public class TenantUnbindRecordController extends BaseController {
         if (sysUser == null) {
             throw new BizException("请登录");
         }
-        TenantStaff employeeVo = tenantStaffService.detail(sysUserFeignService.queryUserInfo().getId());
+        Long id = sysUserFeignService.queryUserInfo().getId();
+        TenantStaff employeeVo = tenantStaffService.lambdaQuery().eq(TenantStaff::getUserId,id)
+                .last("limit 1").one();
         if (employeeVo == null || UserLockFlag.LOCKED.equals(employeeVo.getStatus())) {
             throw new BizException("权限不足");
         }