|
@@ -346,7 +346,13 @@ public class TenantActivationCodeServiceImpl extends ServiceImpl<TenantActivatio
|
|
|
.eq(TenantActivationCode::getSendStatus, EActivationCode.SEND)
|
|
|
.update();
|
|
|
if (!update) {
|
|
|
- throw new BizException("激活码已经激活");
|
|
|
+ TenantActivationCode code = this.getById(activationCode.getId());
|
|
|
+ if (EActivationCode.WAIT.equals(code.getSendStatus())) {
|
|
|
+ throw new BizException("激活码已撤回");
|
|
|
+ }
|
|
|
+ if (Boolean.TRUE.equals(code.getActivationStatus())) {
|
|
|
+ throw new BizException("激活码已经激活");
|
|
|
+ }
|
|
|
}
|
|
|
com.yonge.cooleshow.auth.api.entity.SysUser sysUser = sysUserService.findUserByPhone(activationCode.getActivationPhone());
|
|
|
if (sysUser != null) {
|