|
@@ -180,7 +180,7 @@ public class StudentRegistrationServiceImpl extends BaseServiceImpl<Long, Studen
|
|
|
contractService.register(userId, sysUser.getRealName(), sysUser.getIdCardNo(), sysUser.getPhone());
|
|
|
//注册到融云
|
|
|
if(StringUtils.isEmpty(sysUser.getAvatar())){
|
|
|
- sysUser.setAvatar(sysConfigDao.findConfigValue("user_default_head_url"));
|
|
|
+ sysUser.setAvatar(sysConfigDao.findConfigValue(SysConfigService.USER_DEFAULT_HEAD_URL));
|
|
|
}
|
|
|
ImResult register = imFeignService.register(new ImUserModel(userId.toString(), sysUser.getUsername(), sysUser.getAvatar()));
|
|
|
sysUser.setImToken(register.getToken());
|
|
@@ -194,14 +194,14 @@ public class StudentRegistrationServiceImpl extends BaseServiceImpl<Long, Studen
|
|
|
//增加报名学生数
|
|
|
musicGroupSubjectPlanService.addApplyStudentNum(studentRegistration.getMusicGroupId(), studentRegistration.getSubjectId(),1);
|
|
|
//报名成功后,发送短信
|
|
|
- String studentApplyUrl = sysConfigDao.findConfigValue("student_apply_url" + studentRegistration.getMusicGroupId());
|
|
|
+ String studentApplyUrl = sysConfigDao.findConfigValue(SysConfigService.STUDENT_APPLY_URL + studentRegistration.getMusicGroupId());
|
|
|
String content = sysMessageConfigDao.findContent(MessageTypeEnum.SMS_APPLY_MESSAGE.getCode());
|
|
|
Subject subject = subjectDao.get(studentRegistration.getActualSubjectId());
|
|
|
MusicGroup musicGroup = musicGroupDao.get(studentRegistration.getMusicGroupId());
|
|
|
String format = DateUtil.format(musicGroup.getApplyExpireDate(), DateUtil.DATE_FORMAT_MIN);
|
|
|
sysMessageService.sendMessage(MessageSenderPluginContext.MessageSender.YIMEI,sysUser.getId(),"",
|
|
|
MessageFormatter.arrayFormat(content, studentRegistration.getParentsName(),subject.getName(),
|
|
|
- studentApplyUrl,musicGroup.getApplyExpireDate(),format,sysConfigDao.findConfigValue("server_phone")),
|
|
|
+ studentApplyUrl,musicGroup.getApplyExpireDate(),format,sysConfigDao.findConfigValue(SysConfigService.SERVER_PHONE)),
|
|
|
studentRegistration.getParentsPhone(),date,0,null);
|
|
|
return studentRegistration;
|
|
|
}
|
|
@@ -399,6 +399,7 @@ public class StudentRegistrationServiceImpl extends BaseServiceImpl<Long, Studen
|
|
|
sysUser.setUsername(studentRegistration.getName());
|
|
|
sysUser.setGender(studentRegistration.getGender());
|
|
|
sysUser.setUserType(SysUserType.STUDENT);
|
|
|
+ sysUser.setIdCardNo(studentRegistration.getIdCardNo());
|
|
|
teacherDao.addSysUser(sysUser);
|
|
|
userId = sysUser.getId();
|
|
|
//添加用户现金账户
|
|
@@ -406,6 +407,9 @@ public class StudentRegistrationServiceImpl extends BaseServiceImpl<Long, Studen
|
|
|
//添加用户电子签章账户
|
|
|
contractService.register(userId, sysUser.getRealName(), sysUser.getIdCardNo(), sysUser.getPhone());
|
|
|
//注册到融云
|
|
|
+ if(StringUtils.isEmpty(sysUser.getAvatar())){
|
|
|
+ sysUser.setAvatar(sysConfigDao.findConfigValue(SysConfigService.USER_DEFAULT_HEAD_URL));
|
|
|
+ }
|
|
|
ImResult register = imFeignService.register(new ImUserModel(userId.toString(), sysUser.getUsername(), sysUser.getAvatar()));
|
|
|
sysUser.setImToken(register.getToken());
|
|
|
teacherDao.updateUser(sysUser);
|
|
@@ -514,7 +518,18 @@ public class StudentRegistrationServiceImpl extends BaseServiceImpl<Long, Studen
|
|
|
|
|
|
@Override
|
|
|
public List<StudentRegistration> findMusicGroupNoClassGroupStudent(String musicGroupId, Integer actualSubjectId) {
|
|
|
- return studentRegistrationDao.findMusicGroupNoClassGroupStudent(musicGroupId, actualSubjectId);
|
|
|
+ //获取所有声部
|
|
|
+ List<Subject> subjectList = subjectService.findAll(new HashMap<>());
|
|
|
+ List<StudentRegistration> classGroupStuList = studentRegistrationDao.findMusicGroupNoClassGroupStudent(musicGroupId, actualSubjectId);
|
|
|
+ for (StudentRegistration studentRegistration : classGroupStuList) {
|
|
|
+ for (Subject subject : subjectList) {
|
|
|
+ if (studentRegistration.getActualSubjectId().equals(subject.getId())) {
|
|
|
+ studentRegistration.setSubjectName(subject.getName());
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return classGroupStuList;
|
|
|
}
|
|
|
|
|
|
@Override
|