Bläddra i källkod

Merge remote-tracking branch 'origin/master'

zouxuan 4 år sedan
förälder
incheckning
1cf06b940f

+ 6 - 6
mec-biz/src/main/java/com/ym/mec/biz/service/impl/ClassGroupStudentMapperServiceImpl.java

@@ -462,12 +462,12 @@ public class ClassGroupStudentMapperServiceImpl extends BaseServiceImpl<Long, Cl
         //线上基础技能班,原始分班人数不能小于3人大于6人
         if (classGroup.getType().equals(ClassGroupTypeEnum.HIGH_ONLINE)) {
 
-            if (studentIds.size() < 3 && musicGroup.getStatus().equals(MusicGroupStatusEnum.PREPARE)) {
-                throw new BizException("线上基础技能班人数不能少于3人");
-            }
-            if (studentIds.size() < 3 && !musicGroup.getStatus().equals(MusicGroupStatusEnum.PREPARE) && oldNormalStudentIds.size() <= 0) {
-                throw new BizException("线上基础技能班人数不能少于3人");
-            }
+//            if (studentIds.size() < 3 && musicGroup.getStatus().equals(MusicGroupStatusEnum.PREPARE)) {
+//                throw new BizException("线上基础技能班人数不能少于3人");
+//            }
+//            if (studentIds.size() < 3 && !musicGroup.getStatus().equals(MusicGroupStatusEnum.PREPARE) && oldNormalStudentIds.size() <= 0) {
+//                throw new BizException("线上基础技能班人数不能少于3人");
+//            }
             if (studentIds.size() > 6) {
                 throw new BizException("线上基础技能班人数不能多于6人");
             }

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

@@ -21,6 +21,8 @@ import com.ym.mec.biz.dal.dao.*;
 import com.ym.mec.biz.event.source.GroupEventSource;
 import com.ym.mec.biz.service.*;
 import org.apache.commons.lang3.StringUtils;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Propagation;
@@ -244,6 +246,8 @@ public class MusicGroupServiceImpl extends BaseServiceImpl<String, MusicGroup> i
     private SubjectDao subjectDao;
     @Autowired
     private SysUserCashAccountDao sysUserCashAccountDao;
+    @Autowired
+    private ContractService contractService;
 
     @Autowired
     private StudentPreRegistrationDao studentPreRegistrationDao;
@@ -257,6 +261,8 @@ public class MusicGroupServiceImpl extends BaseServiceImpl<String, MusicGroup> i
 
     private SimpleDateFormat sdf_ymdhms = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
 
+    private final Logger logger = LoggerFactory.getLogger(this.getClass());
+
     @Override
     public BaseDAO<String, MusicGroup> getDAO() {
         return musicGroupDao;
@@ -2381,6 +2387,13 @@ public class MusicGroupServiceImpl extends BaseServiceImpl<String, MusicGroup> i
                         studentRegistration.getName(), studentPaymentOrder.getActualAmount());
             }
             studentRegistrationService.updateUserSurplusCourseFee(userId, musicGroupId, studentPaymentOrder.getExpectAmount(), "乐团续费", userId);
+
+            try {
+                contractService.transferProduceContract(userId, musicGroupId);
+            } catch (Exception e) {
+                logger.error("产品协议生成失败", e);
+            }
+
             return true;
         } else {
             if (studentPaymentOrder.getBalancePaymentAmount() != null && studentPaymentOrder.getBalancePaymentAmount().doubleValue() > 0) {