|
@@ -497,13 +497,13 @@ public class MusicGroupServiceImpl extends BaseServiceImpl<String, MusicGroup> i
|
|
|
if (musicGroup.getCourseForm() == null) {
|
|
|
throw new BizException("可选课程不存在");
|
|
|
}
|
|
|
- Map<String, String> courseForm = JSON.parseObject(musicGroup.getCourseForm(), Map.class);
|
|
|
+ JSONObject courseForm = JSON.parseObject(musicGroup.getCourseForm());
|
|
|
for (String courseKey : registerPayDto.getCourseKeys()) {
|
|
|
if (courseForm.get(courseKey) == null) {
|
|
|
throw new BizException("可选课程不存在");
|
|
|
}
|
|
|
CourseFormDto courseFormDto = new CourseFormDto();
|
|
|
- JSONObject jsonObject = JSON.parseObject(musicGroup.getCourseForm());
|
|
|
+ JSONObject jsonObject = JSON.parseObject(courseForm.getString(courseKey));
|
|
|
orderAmount = orderAmount.add(jsonObject.getBigDecimal("value"));
|
|
|
courseFormDto.setType(courseKey);
|
|
|
courseFormDto.setPrice(jsonObject.getBigDecimal("value"));
|
|
@@ -703,13 +703,13 @@ public class MusicGroupServiceImpl extends BaseServiceImpl<String, MusicGroup> i
|
|
|
if (musicGroup.getCourseForm() == null) {
|
|
|
throw new BizException("可选课程不存在");
|
|
|
}
|
|
|
- Map<String, String> courseForm = JSON.parseObject(musicGroup.getCourseForm(), Map.class);
|
|
|
+ JSONObject courseForm = JSON.parseObject(musicGroup.getCourseForm());
|
|
|
for (String courseKey : registerPayDto.getCourseKeys()) {
|
|
|
if (courseForm.get(courseKey) == null) {
|
|
|
throw new BizException("可选课程不存在");
|
|
|
}
|
|
|
CourseFormDto courseFormDto = new CourseFormDto();
|
|
|
- JSONObject jsonObject = JSON.parseObject(musicGroup.getCourseForm());
|
|
|
+ JSONObject jsonObject = JSON.parseObject(courseForm.getString(courseKey));
|
|
|
orderAmount = orderAmount.add(jsonObject.getBigDecimal("value"));
|
|
|
courseFormDto.setType(courseKey);
|
|
|
courseFormDto.setPrice(jsonObject.getBigDecimal("value"));
|