zouxuan 4 年 前
コミット
8116eaf1bb

+ 4 - 0
mec-biz/src/main/java/com/ym/mec/biz/service/impl/MusicGroupServiceImpl.java

@@ -397,6 +397,10 @@ public class MusicGroupServiceImpl extends BaseServiceImpl<String, MusicGroup> i
             studentDao.insert(student);
             sysUserCashAccountDao.insert(new SysUserCashAccount(userId, "CNY"));
         } else {
+            boolean hasMemberGroup = studentRegistrationDao.checkHasMemberGroup(musicGroup.getId(), user.getId());
+            if(hasMemberGroup){
+                throw new BizException("乐团报名失败:您已在其他系统收费团");
+            }
             user.setUsername(studentPreRegistration.getUserName());
             if (!user.getUserType().contains("STUDENT")) {
                 user.setUserType(user.getUserType() + ",STUDENT");

+ 5 - 0
mec-student/src/main/java/com/ym/mec/student/controller/MusicGroupRegisterController.java

@@ -13,6 +13,7 @@ import com.ym.mec.biz.service.MusicGroupSubjectPlanService;
 import com.ym.mec.biz.service.StudentRegistrationService;
 import com.ym.mec.common.controller.BaseController;
 import com.ym.mec.common.entity.HttpResponseResult;
+import com.ym.mec.common.exception.BizException;
 import com.ym.mec.util.date.DateUtil;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiImplicitParam;
@@ -53,6 +54,10 @@ public class MusicGroupRegisterController extends BaseController {
         if (musicGroup == null) {
             return failed("乐团信息不存在");
         }
+        boolean hasMemberGroup = studentRegistrationDao.checkHasMemberGroup(musicGroup.getId(), sysUser.getId());
+        if(hasMemberGroup){
+            throw new BizException("乐团报名失败:您已在其他系统收费团");
+        }
 
         if (date.compareTo(DateUtil.getLastTimeWithDay(musicGroup.getApplyExpireDate())) > 0 && studentRegistration.getId() == null) {
             return failed("乐团已截止报名");