Browse Source

添加查询,报名信息接口

周箭河 5 năm trước cách đây
mục cha
commit
1fcfe58334

+ 4 - 2
edu-user/edu-user-server/src/main/java/com/keao/edu/user/service/impl/ExamRegistrationServiceImpl.java

@@ -78,17 +78,19 @@ public class ExamRegistrationServiceImpl extends BaseServiceImpl<Long, ExamRegis
         BigDecimal amount = examSubjectSong.getRegistrationFee();
         //乐理考试级别
         ExamMusicTheory examMusicTheory = null;
+        BigDecimal theoryLevelFee = BigDecimal.ZERO;
         if (examRegistration.getExamMusicTheoryId() != null) {
             examMusicTheory = examMusicTheoryDao.get(examRegistration.getExamMusicTheoryId());
         }
         if (examMusicTheory != null) {
+            theoryLevelFee = examMusicTheory.getFee();
             examRegistration.setExamMusicTheoryLevel(examMusicTheory.getLevel());
-            amount.add(examMusicTheory.getFee());
+            amount.add(theoryLevelFee);
         }
 
         examRegistration.setStatus(StudentRegistrationStatusEnum.PAY_WAIT);
         examRegistration.setLevelFee(examSubjectSong.getRegistrationFee());
-        examRegistration.setTheoryLevelFee(examMusicTheory.getFee());
+        examRegistration.setTheoryLevelFee(theoryLevelFee);
         examRegistrationDao.insert(examRegistration);
 
         ExamRegistrationPayment examRegistrationPayment = new ExamRegistrationPayment();

+ 2 - 2
edu-user/edu-user-server/src/main/resources/config/mybatis/ExamRegistrationMapper.xml

@@ -43,8 +43,8 @@
 
 	<!-- 向数据库增加一条记录 -->
 	<insert id="insert" parameterType="com.keao.edu.user.entity.ExamRegistration" useGeneratedKeys="true" keyColumn="id" keyProperty="id">
-		INSERT INTO exam_registration (id_,examination_basic_id_,student_id_,organ_id_,subject_id_,level_,song_json_,last_exam_level_,last_exam_certificate_url_,adviser_name_,adviser_phone_,card_no_,status_,memo_,create_time_,update_time_,tenant_id_)
-		VALUES(#{id},#{examinationBasicId},#{studentId},#{organId},#{subjectId},#{level},#{songJson},#{lastExamLevel},#{lastExamCertificateUrl},#{adviserName},#{adviserPhone},#{cardNo},#{status,typeHandler=com.keao.edu.common.dal.CustomEnumTypeHandler},#{memo},NOW(), NOW(),#{tenantId})
+		INSERT INTO exam_registration (id_,examination_basic_id_,student_id_,organ_id_,subject_id_,level_,level_fee_,song_json_,exam_music_theory_level_,theory_level_fee_,last_exam_level_,last_exam_certificate_url_,adviser_name_,adviser_phone_,card_no_,status_,memo_,create_time_,update_time_,tenant_id_)
+		VALUES(#{id},#{examinationBasicId},#{studentId},#{organId},#{subjectId},#{level},#{levelFee},#{songJson},#{examMusicTheoryLevel},#{theoryLevelFee},#{lastExamLevel},#{lastExamCertificateUrl},#{adviserName},#{adviserPhone},#{cardNo},#{status,typeHandler=com.keao.edu.common.dal.CustomEnumTypeHandler},#{memo},NOW(), NOW(),#{tenantId})
 	</insert>
 
 	<!-- 根据主键查询一条记录 -->