Browse Source

feat:乐团改造

Joburgess 4 năm trước cách đây
mục cha
commit
45a78574ee

+ 4 - 4
mec-biz/src/main/java/com/ym/mec/biz/service/impl/StudentRegistrationServiceImpl.java

@@ -1440,16 +1440,16 @@ public class StudentRegistrationServiceImpl extends BaseServiceImpl<Long, Studen
             throw new BizException("学员注册信息不存在");
         }
 
-        if(BigDecimal.ZERO.compareTo(amount)==0){
-            return BigDecimal.ZERO;
-        }
-
         if(BigDecimal.ZERO.compareTo(amount)>0&&amount.abs().compareTo(studentRegistration.getSurplusCourseFee())>0){
             amount = studentRegistration.getSurplusCourseFee().negate();
         }
 
         studentRegistration.setSurplusCourseFee(studentRegistration.getSurplusCourseFee().add(amount));
 
+        if(BigDecimal.ZERO.compareTo(amount)==0){
+            return BigDecimal.ZERO;
+        }
+
         StudentCourseFeeDetail studentCourseFeeDetail = new StudentCourseFeeDetail();
         studentCourseFeeDetail.setStudentRegistrationId(studentRegistration.getId());
         studentCourseFeeDetail.setAmount(amount);

+ 2 - 2
mec-biz/src/main/resources/config/mybatis/CourseScheduleStudentPaymentMapper.xml

@@ -631,8 +631,8 @@
 		LEFT JOIN course_schedule cs ON cs.id_ = cssp.course_schedule_id_
 		WHERE
 			cssp.batch_no_ IS NOT NULL
-			AND ((cs.status_ = 'OVER' AND (cssp.actual_price_ IS NULL OR cssp.actual_price_ != cssp.expect_price_))
-			OR ( cs.status_ = 'NOT_START' AND (cssp.actual_price_ IS NOT NULL AND cssp.actual_price_ &gt; 0)))
+			AND ((cs.status_ = 'OVER' AND cssp.actual_price_ IS NULL OR cssp.actual_price_ &lt; cssp.expect_price_)
+			OR ( cs.status_ = 'NOT_START' AND cssp.actual_price_ IS NOT NULL AND cssp.actual_price_ &gt; 0))
 	</select>
 	<select id="queryCourseByIdsAndStudentId" resultMap="CourseScheduleStudentPayment">
 		SELECT cssp.* FROM course_schedule_student_payment cssp