|
@@ -645,9 +645,11 @@ public class StudentRegistrationServiceImpl extends BaseServiceImpl<Long, Studen
|
|
|
|
|
|
int paidNum = musicOneSubjectClassPlan.getPaidStudentNum() == null ? 0 : musicOneSubjectClassPlan.getPaidStudentNum();
|
|
int paidNum = musicOneSubjectClassPlan.getPaidStudentNum() == null ? 0 : musicOneSubjectClassPlan.getPaidStudentNum();
|
|
int paidZeroNum = musicOneSubjectClassPlan.getPaidZeroNum() == null ? 0 : musicOneSubjectClassPlan.getPaidZeroNum();
|
|
int paidZeroNum = musicOneSubjectClassPlan.getPaidZeroNum() == null ? 0 : musicOneSubjectClassPlan.getPaidZeroNum();
|
|
- if ((musicGroup.getCourseViewType().equals(CourseViewTypeEnum.MEMBER_FEE) && !buyCloudTeacher))
|
|
|
|
|
|
+ if ((musicGroup.getCourseViewType().equals(CourseViewTypeEnum.MEMBER_FEE) && !buyCloudTeacher && StringUtils.isBlank(maintenanceGoodsId)))
|
|
{
|
|
{
|
|
- paidZeroFlag = true;
|
|
|
|
|
|
+ if(studentRegistration.getPaymentStatus() != YES){
|
|
|
|
+ paidZeroFlag = true;
|
|
|
|
+ }
|
|
if (studentRegistration.getNoneNeedCloudTeacher().equals(1) && (oldStudentPaymentOrderList == null || oldStudentPaymentOrderList.size() == 0)) {
|
|
if (studentRegistration.getNoneNeedCloudTeacher().equals(1) && (oldStudentPaymentOrderList == null || oldStudentPaymentOrderList.size() == 0)) {
|
|
musicOneSubjectClassPlan.setPaidZeroNum(paidZeroNum + 1);
|
|
musicOneSubjectClassPlan.setPaidZeroNum(paidZeroNum + 1);
|
|
musicOneSubjectClassPlan.setPaidStudentNum(paidNum + 1);
|
|
musicOneSubjectClassPlan.setPaidStudentNum(paidNum + 1);
|
|
@@ -1180,11 +1182,13 @@ public class StudentRegistrationServiceImpl extends BaseServiceImpl<Long, Studen
|
|
studentRegistration.setMusicGroupStatus(StudentMusicGroupStatusEnum.NORMAL);
|
|
studentRegistration.setMusicGroupStatus(StudentMusicGroupStatusEnum.NORMAL);
|
|
}
|
|
}
|
|
|
|
|
|
- if (orderTypeList.contains(OrderDetailTypeEnum.CLOUD_TEACHER)
|
|
|
|
- || orderTypeList.contains(OrderDetailTypeEnum.CLOUD_TEACHER_PLUS)) {
|
|
|
|
|
|
+ if (orderTypeList.contains(OrderDetailTypeEnum.CLOUD_TEACHER) || orderTypeList.contains(OrderDetailTypeEnum.CLOUD_TEACHER_PLUS)
|
|
|
|
+ || orderTypeList.contains(OrderDetailTypeEnum.MUSICAL)) {
|
|
studentRegistration.setMusicGroupStatus(StudentMusicGroupStatusEnum.NORMAL);
|
|
studentRegistration.setMusicGroupStatus(StudentMusicGroupStatusEnum.NORMAL);
|
|
- studentRegistration.setNoneNeedCloudTeacher(1);
|
|
|
|
- studentRegistration.setHasCloudTeacher(1);
|
|
|
|
|
|
+ //studentRegistration.setNoneNeedCloudTeacher(1);
|
|
|
|
+ if (orderTypeList.contains(OrderDetailTypeEnum.CLOUD_TEACHER) || orderTypeList.contains(OrderDetailTypeEnum.CLOUD_TEACHER_PLUS)) {
|
|
|
|
+ studentRegistration.setHasCloudTeacher(1);
|
|
|
|
+ }
|
|
}
|
|
}
|
|
} else {
|
|
} else {
|
|
studentRegistration.setMusicGroupStatus(StudentMusicGroupStatusEnum.NORMAL);
|
|
studentRegistration.setMusicGroupStatus(StudentMusicGroupStatusEnum.NORMAL);
|
|
@@ -1962,6 +1966,7 @@ public class StudentRegistrationServiceImpl extends BaseServiceImpl<Long, Studen
|
|
}
|
|
}
|
|
studentRegistration.setPayingStatus(0);
|
|
studentRegistration.setPayingStatus(0);
|
|
studentRegistration.setNoneNeedCloudTeacher(1);
|
|
studentRegistration.setNoneNeedCloudTeacher(1);
|
|
|
|
+ studentRegistration.setMusicGroupStatus(StudentMusicGroupStatusEnum.NORMAL);
|
|
if (studentRegistrationDao.update(studentRegistration) <= 0) {
|
|
if (studentRegistrationDao.update(studentRegistration) <= 0) {
|
|
throw new BizException("设置失败,请重试");
|
|
throw new BizException("设置失败,请重试");
|
|
}
|
|
}
|
|
@@ -1971,16 +1976,23 @@ public class StudentRegistrationServiceImpl extends BaseServiceImpl<Long, Studen
|
|
@Override
|
|
@Override
|
|
@Transactional(rollbackFor = Exception.class)
|
|
@Transactional(rollbackFor = Exception.class)
|
|
public HttpResponseResult<Boolean> addPaidNum(Long id, boolean isContinue) {
|
|
public HttpResponseResult<Boolean> addPaidNum(Long id, boolean isContinue) {
|
|
- StudentRegistration studentRegistration = studentRegistrationDao.get(id);
|
|
|
|
|
|
+ StudentRegistration studentRegistration = studentRegistrationDao.lock(id);
|
|
if (!studentRegistration.getPayingStatus().equals(2)) {
|
|
if (!studentRegistration.getPayingStatus().equals(2)) {
|
|
throw new BizException("该学生不在审核");
|
|
throw new BizException("该学生不在审核");
|
|
}
|
|
}
|
|
- if (!studentRegistration.getPaymentStatus().equals(YES)) {
|
|
|
|
- throw new BizException("该学生状态已更新,请刷新查看");
|
|
|
|
|
|
+ if (studentRegistration.getNoneNeedCloudTeacher().equals(1)) {
|
|
|
|
+ throw new BizException("该学生已设置");
|
|
}
|
|
}
|
|
|
|
|
|
MusicGroupSubjectPlan musicOneSubjectClassPlan = musicGroupSubjectPlanService.getMusicOneSubjectClassPlan(studentRegistration.getMusicGroupId(), studentRegistration.getActualSubjectId());
|
|
MusicGroupSubjectPlan musicOneSubjectClassPlan = musicGroupSubjectPlanService.getMusicOneSubjectClassPlan(studentRegistration.getMusicGroupId(), studentRegistration.getActualSubjectId());
|
|
|
|
|
|
|
|
+ int paidNum = musicOneSubjectClassPlan.getPaidStudentNum() == null ? 0 : musicOneSubjectClassPlan.getPaidStudentNum();
|
|
|
|
+ int paidZeroNum = musicOneSubjectClassPlan.getPaidZeroNum() == null ? 0 : musicOneSubjectClassPlan.getPaidZeroNum();
|
|
|
|
+
|
|
|
|
+ if(paidZeroNum > 0){
|
|
|
|
+ throw new BizException("每个声部只能有一个免费入团名额");
|
|
|
|
+ }
|
|
|
|
+
|
|
if(!isContinue){
|
|
if(!isContinue){
|
|
if (musicOneSubjectClassPlan.getPaidStudentNum() >= musicOneSubjectClassPlan.getExpectedStudentNum()) {
|
|
if (musicOneSubjectClassPlan.getPaidStudentNum() >= musicOneSubjectClassPlan.getExpectedStudentNum()) {
|
|
return new HttpResponseResult<Boolean>(true, HttpStatus.CONTINUE, null, "乐团该声部招生人数已满,是否继续操作?");
|
|
return new HttpResponseResult<Boolean>(true, HttpStatus.CONTINUE, null, "乐团该声部招生人数已满,是否继续操作?");
|
|
@@ -1989,16 +2001,17 @@ public class StudentRegistrationServiceImpl extends BaseServiceImpl<Long, Studen
|
|
|
|
|
|
studentRegistration.setPayingStatus(0);
|
|
studentRegistration.setPayingStatus(0);
|
|
studentRegistration.setNoneNeedCloudTeacher(1);
|
|
studentRegistration.setNoneNeedCloudTeacher(1);
|
|
|
|
+ studentRegistration.setPaymentStatus(YES);
|
|
studentRegistration.setMusicGroupStatus(StudentMusicGroupStatusEnum.NORMAL);
|
|
studentRegistration.setMusicGroupStatus(StudentMusicGroupStatusEnum.NORMAL);
|
|
studentRegistrationDao.update(studentRegistration);
|
|
studentRegistrationDao.update(studentRegistration);
|
|
StudentPaymentOrder order = studentPaymentOrderService.findMusicGroupApplyOrderByStatus(studentRegistration.getUserId(), studentRegistration.getMusicGroupId(), DealStatusEnum.SUCCESS);
|
|
StudentPaymentOrder order = studentPaymentOrderService.findMusicGroupApplyOrderByStatus(studentRegistration.getUserId(), studentRegistration.getMusicGroupId(), DealStatusEnum.SUCCESS);
|
|
- order.setPaymentAccountNo("200");
|
|
|
|
- if(studentPaymentOrderService.update(order)<=0){
|
|
|
|
- throw new BizException("订单处理失败,请重试");
|
|
|
|
- }
|
|
|
|
|
|
+ if (order != null) {
|
|
|
|
+ order.setPaymentAccountNo("200");
|
|
|
|
+ if (studentPaymentOrderService.update(order) <= 0) {
|
|
|
|
+ throw new BizException("订单处理失败,请重试");
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
|
|
- int paidNum = musicOneSubjectClassPlan.getPaidStudentNum() == null ? 0 : musicOneSubjectClassPlan.getPaidStudentNum();
|
|
|
|
- int paidZeroNum = musicOneSubjectClassPlan.getPaidZeroNum() == null ? 0 : musicOneSubjectClassPlan.getPaidZeroNum();
|
|
|
|
musicOneSubjectClassPlan.setPaidZeroNum(paidZeroNum + 1);
|
|
musicOneSubjectClassPlan.setPaidZeroNum(paidZeroNum + 1);
|
|
musicOneSubjectClassPlan.setPaidStudentNum(paidNum + 1);
|
|
musicOneSubjectClassPlan.setPaidStudentNum(paidNum + 1);
|
|
int count = musicGroupSubjectPlanService.update(musicOneSubjectClassPlan);
|
|
int count = musicGroupSubjectPlanService.update(musicOneSubjectClassPlan);
|