Jelajahi Sumber

1.绑定微信添加机构冻结校验

yuanliang 1 tahun lalu
induk
melakukan
b51318e3bd

+ 9 - 9
cooleshow-user/user-tenant/src/main/java/com/yonge/cooleshow/tenant/controller/open/OpenTenantController.java

@@ -110,15 +110,15 @@ public class OpenTenantController {
             }
         }
 
-//        Long tenantId = tenantStaff.getTenantId();
-//        TenantInfo tenantInfo = tenantInfoService.getById(tenantId);
-//        if(tenantInfo == null){
-//            throw new BizException("机构不存在");
-//        }
-//        if (Boolean.FALSE.equals(tenantInfo.getEnableFlag())) {
-//            String configValue = sysConfigService.findConfigValue("customer_service_phone");
-//            throw new BizException(5004, "机构已停用,请联系客服/n" + (StringUtils.isEmpty(configValue) ? "" : configValue));
-//        }
+        Long tenantId = tenantStaff.getTenantId();
+        TenantInfo tenantInfo = tenantInfoService.getById(tenantId);
+        if(tenantInfo == null){
+            throw new BizException("机构不存在");
+        }
+        if (Boolean.FALSE.equals(tenantInfo.getEnableFlag())) {
+            // 机构冻结
+            throw new BizException(5004, openId);
+        }
         tenantStaff.setWxOpenid(openId);
         tenantStaffService.updateById(tenantStaff);
         return HttpResponseResult.succeed();