Browse Source

1.解绑审核修改 2.学生激活码添加校验

yuanliang 1 year ago
parent
commit
1e524a8d8e

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

@@ -183,7 +183,7 @@ public class TenantActivationCodeServiceImpl extends ServiceImpl<TenantActivatio
         if (code == null) {
             throw new BizException("激活码不存在");
         }
-        if (Boolean.TRUE.equals(code.getActivationStatus())) {
+        if (Boolean.TRUE.equals(code.getActivationStatus()) || EActivationCode.SEND.equals(code.getSendStatus())) {
             throw new BizException("激活码已经被使用");
         }
 
@@ -202,8 +202,6 @@ public class TenantActivationCodeServiceImpl extends ServiceImpl<TenantActivatio
         }
         Long tenantAlbumPurchaseId = code.getTenantAlbumPurchaseId();
         TenantAlbumPurchase purchase = tenantAlbumPurchaseMapper.selectById(tenantAlbumPurchaseId);
-        Integer purchaseCycle = purchase.getPurchaseCycle();
-
 
         addUserTenantAlbumRecord(student.getUserId(), purchase, null);
 

+ 1 - 1
cooleshow-user/user-teacher/src/main/java/com/yonge/cooleshow/teacher/controller/TeacherController.java

@@ -223,7 +223,6 @@ public class TeacherController extends BaseController {
         }
 
         TenantUnbindRecord one = tenantUnbindRecordService.lambdaQuery()
-                .eq(TenantUnbindRecord::getTenantId, user.getTenantId())
                 .eq(TenantUnbindRecord::getUserType, "TEACHER")
                 .eq(TenantUnbindRecord::getUserId, user.getId())
                 .last("limit 1").one();
@@ -237,6 +236,7 @@ public class TeacherController extends BaseController {
         tenantUnbindRecord.setUserId(user.getId());
         tenantUnbindRecord.setUserName(user.getRealName());
         tenantUnbindRecord.setPhone(user.getPhone());
+        tenantUnbindRecord.setStatus(ETenantUnBindAuditStatus.DOING);
 
         String subjectId = teacher.getSubjectId();
         if (StringUtils.isNotEmpty(subjectId)) {