|
@@ -21,12 +21,14 @@ import com.ym.mec.im.ImFeignService;
|
|
|
import com.ym.mec.thirdparty.message.MessageSenderPluginContext;
|
|
|
import com.ym.mec.util.collection.MapUtil;
|
|
|
import com.ym.mec.util.date.DateUtil;
|
|
|
+import com.ym.mec.util.http.HttpUtil;
|
|
|
import org.apache.commons.lang3.StringUtils;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
|
|
|
|
import javax.annotation.Resource;
|
|
|
+import java.io.IOException;
|
|
|
import java.math.BigDecimal;
|
|
|
import java.util.*;
|
|
|
import java.util.stream.Collectors;
|
|
@@ -107,11 +109,11 @@ public class StudentRegistrationServiceImpl extends BaseServiceImpl<Long, Studen
|
|
|
throw new Exception("学员信息不存在");
|
|
|
}
|
|
|
//当前专业报名人数减一
|
|
|
-// musicGroupSubjectPlanService.addApplyStudentNum(musicGroupId,studentRegistration.getActualSubjectId(),-1);
|
|
|
+ musicGroupSubjectPlanService.addApplyStudentNum(musicGroupId,studentRegistration.getActualSubjectId(),-1);
|
|
|
//批量调剂(未缴费学员)
|
|
|
-// int i = studentRegistrationDao.batchUpdateSubject(userId, subId, musicGroupId);
|
|
|
+ int i = studentRegistrationDao.batchUpdateSubject(userId, subId, musicGroupId);
|
|
|
//修改专业已报名人数
|
|
|
-// musicGroupSubjectPlanService.addApplyStudentNum(musicGroupId,subId,1);
|
|
|
+ musicGroupSubjectPlanService.addApplyStudentNum(musicGroupId,subId,1);
|
|
|
MusicGroup musicGroup = musicGroupDao.get(musicGroupId);
|
|
|
Set<Integer> roleIds = new HashSet<>(2);
|
|
|
roleIds.add(SysUserRole.SECTION_MANAGER);
|
|
@@ -160,7 +162,7 @@ public class StudentRegistrationServiceImpl extends BaseServiceImpl<Long, Studen
|
|
|
|
|
|
@Override
|
|
|
@Transactional(rollbackFor = Exception.class)
|
|
|
- public StudentRegistration addStudent(StudentRegistration studentRegistration) {
|
|
|
+ public StudentRegistration addStudent(StudentRegistration studentRegistration) throws IOException {
|
|
|
Date date = new Date();
|
|
|
Integer userId = 0;
|
|
|
SysUser sysUser = studentRegistrationDao.getSysUserByPhone(studentRegistration.getParentsPhone());
|
|
@@ -208,7 +210,7 @@ public class StudentRegistrationServiceImpl extends BaseServiceImpl<Long, Studen
|
|
|
map.put(studentRegistration.getUserId(),studentRegistration.getParentsPhone());
|
|
|
sysMessageService.batchSendMessage(MessageSenderPluginContext.MessageSender.YIMEI,
|
|
|
MessageTypeEnum.SMS_APPLY_MESSAGE,map,null,0,"",
|
|
|
- studentRegistration.getParentsName(),subject.getName(),studentApplyUrl,
|
|
|
+ studentRegistration.getParentsName(),subject.getName(), HttpUtil.getSortUrl(studentApplyUrl),
|
|
|
DateUtil.format(musicGroup.getApplyExpireDate(),DateUtil.DATE_FORMAT_MIN),serverPhone);
|
|
|
return studentRegistration;
|
|
|
}
|
|
@@ -428,6 +430,7 @@ public class StudentRegistrationServiceImpl extends BaseServiceImpl<Long, Studen
|
|
|
} else {
|
|
|
userId = sysUser.getId();
|
|
|
}
|
|
|
+ studentRegistration.setActualSubjectId(studentRegistration.getSubjectId());
|
|
|
studentRegistration.setUserId(userId);
|
|
|
studentRegistration.setPaymentStatus(PaymentStatusEnum.YES);
|
|
|
studentRegistration.setMusicGroupStatus(ClassGroupStudentStatusEnum.NORMAL);
|