Преглед на файлове

Merge remote-tracking branch 'origin/master'

Joburgess преди 5 години
родител
ревизия
4418f2f651

+ 12 - 1
edu-user/edu-user-server/src/main/java/com/keao/edu/user/service/impl/ExamRegistrationServiceImpl.java

@@ -52,6 +52,8 @@ public class ExamRegistrationServiceImpl extends BaseServiceImpl<Long, ExamRegis
     private SysConfigDao sysConfigDao;
     @Autowired
     private ExamRegistrationPaymentService examRegistrationPaymentService;
+    @Autowired
+    private OrganizationDao organizationDao;
 
     @Override
     public BaseDAO<Long, ExamRegistration> getDAO() {
@@ -71,6 +73,14 @@ public class ExamRegistrationServiceImpl extends BaseServiceImpl<Long, ExamRegis
         if (examSubjectSong == null) {
             throw new BizException("请选择专业级别");
         }
+
+        if(examRegistration.getOrganId() == null){
+            throw new BizException("机构id不能为空");
+        }
+        Organization organization = organizationDao.get(examRegistration.getOrganId());
+        if(organization == null){
+            throw new BizException("机构不存在");
+        }
         Date nowDate = new Date();
         String orderNo = idGeneratorService.generatorId("payment") + "";
 
@@ -85,9 +95,10 @@ public class ExamRegistrationServiceImpl extends BaseServiceImpl<Long, ExamRegis
         if (examMusicTheory != null) {
             theoryLevelFee = examMusicTheory.getFee();
             examRegistration.setExamMusicTheoryLevel(examMusicTheory.getLevel());
-            amount.add(theoryLevelFee);
+            amount = amount.add(theoryLevelFee);
         }
 
+        examRegistration.setTenantId(organization.getTenantId());
         examRegistration.setStatus(StudentRegistrationStatusEnum.PAY_WAIT);
         examRegistration.setLevelFee(examSubjectSong.getRegistrationFee());
         examRegistration.setTheoryLevelFee(theoryLevelFee);

+ 3 - 1
edu-user/edu-user-server/src/main/resources/config/mybatis/ExamRegistrationPaymentMapper.xml

@@ -159,6 +159,8 @@
     </resultMap>
     <!-- 获取订单列表 -->
     <select id="getOrderPageList" resultMap="pageList">
-        SELECT * FROM exam_registration_payment
+        SELECT erp.*  FROM exam_registration_payment erp
+        LEFT JOIN sys_user su on erp.student_id_ = su.id_
+        LEFT JOIN subject s on erp.id_ = s.id_
     </select>
 </mapper>