瀏覽代碼

1.激活码撤回添加错误码

yuanliang 1 年之前
父節點
當前提交
b5bfc16b4c

+ 3 - 3
cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/service/impl/TenantActivationCodeServiceImpl.java

@@ -356,10 +356,10 @@ public class TenantActivationCodeServiceImpl extends ServiceImpl<TenantActivatio
         if (!update) {
             TenantActivationCode code = this.getById(activationCode.getId());
             if (EActivationCode.WAIT.equals(code.getSendStatus())) {
-                throw new BizException("激活码已撤回");
+                throw new BizException(5101, "激活码已撤回");
             }
             if (Boolean.TRUE.equals(code.getActivationStatus())) {
-                throw new BizException("激活码已经激活");
+                throw new BizException(5102, "激活码已经激活");
             }
         }
         com.yonge.cooleshow.auth.api.entity.SysUser sysUser = sysUserService.findUserByPhone(activationCode.getActivationPhone());
@@ -376,7 +376,7 @@ public class TenantActivationCodeServiceImpl extends ServiceImpl<TenantActivatio
         Collection<TenantActivationCode> tenantActivationCodes = this.listByIds(idList);
         for (TenantActivationCode tenantActivationCode : tenantActivationCodes) {
             if (Boolean.TRUE.equals(tenantActivationCode.getActivationStatus())) {
-                throw new BizException("激活码已经被使用");
+                throw new BizException(5102, "激活码已经激活");
             }
         }
         tenantActivationCodes.removeIf(next -> Boolean.TRUE.equals(next.getActivationStatus()));