|
@@ -1,6 +1,7 @@
|
|
|
package com.ym.mec.biz.service.impl;
|
|
|
|
|
|
import com.alibaba.fastjson.JSON;
|
|
|
+import com.alibaba.fastjson.serializer.SerializerFeature;
|
|
|
import com.ym.mec.auth.api.client.SysUserFeignService;
|
|
|
import com.ym.mec.auth.api.entity.SysUser;
|
|
|
import com.ym.mec.auth.api.entity.SysUserRole;
|
|
@@ -916,16 +917,24 @@ public class StudentManageServiceImpl implements StudentManageService {
|
|
|
if(!activityCourseDetailDto.getMusicTheory().equals(0) && !activityCourseDetailDto.getMusicTheory().equals(1)){
|
|
|
throw new BizException("修改失败:排课次数异常");
|
|
|
}
|
|
|
- SysUser sysUser = sysUserFeignService.queryUserById(student.getUserId());
|
|
|
- if(sysUser == null){
|
|
|
- throw new BizException("请登录");
|
|
|
- }
|
|
|
- OrganizationDegreeCourseFee degreeCourseFee = organizationDegreeCourseFeeDao.getByOrganId(sysUser.getOrganId());
|
|
|
- if(degreeCourseFee == null){
|
|
|
- throw new BizException("学员所在分部未配置考级价格");
|
|
|
+ if(activityCourseDetailDto.getMusicTheory().equals(1)){
|
|
|
+ String activityCourseDetail = student.getActivityCourseDetail();
|
|
|
+ if(StringUtils.isNotEmpty(activityCourseDetail)){
|
|
|
+ ActivityCourseDetailDto detailDto = JSON.parseObject(activityCourseDetail, ActivityCourseDetailDto.class);
|
|
|
+ if(detailDto.getMusicTheory() == null || detailDto.getMusicTheory().equals(0)){
|
|
|
+ SysUser sysUser = sysUserFeignService.queryUserById(student.getUserId());
|
|
|
+ if(sysUser == null){
|
|
|
+ throw new BizException("请登录");
|
|
|
+ }
|
|
|
+ OrganizationDegreeCourseFee degreeCourseFee = organizationDegreeCourseFeeDao.getByOrganId(sysUser.getOrganId());
|
|
|
+ if(degreeCourseFee == null){
|
|
|
+ throw new BizException("学员所在分部未配置考级价格");
|
|
|
+ }
|
|
|
+ activityCourseDetailDto.setMusicTheoryPrice(degreeCourseFee.getTheory());
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
- activityCourseDetailDto.setMusicTheoryPrice(degreeCourseFee.getTheory());
|
|
|
- student.setActivityCourseDetail(JSON.toJSONString(activityCourseDetailDto));
|
|
|
+ student.setActivityCourseDetail(JSON.toJSONString(activityCourseDetailDto, SerializerFeature.WriteMapNullValue));
|
|
|
studentDao.update(student);
|
|
|
}
|
|
|
}
|