Ver Fonte

feat:12月活动

Joburgess há 4 anos atrás
pai
commit
2d50021e0d

+ 12 - 0
mec-biz/src/main/java/com/ym/mec/biz/dal/entity/CourseScheduleStudentPaymentDto.java

@@ -2,6 +2,8 @@ package com.ym.mec.biz.dal.entity;
 
 import com.ym.mec.biz.dal.enums.CourseStatusEnum;
 
+import java.util.Date;
+
 /**
  * @Author qnc99
  * @Date 2020/12/2 0002
@@ -10,6 +12,8 @@ public class CourseScheduleStudentPaymentDto extends CourseScheduleStudentPaymen
 
     private CourseStatusEnum courseStatus;
 
+    private Date courseStartTime;
+
     public CourseStatusEnum getCourseStatus() {
         return courseStatus;
     }
@@ -17,4 +21,12 @@ public class CourseScheduleStudentPaymentDto extends CourseScheduleStudentPaymen
     public void setCourseStatus(CourseStatusEnum courseStatus) {
         this.courseStatus = courseStatus;
     }
+
+    public Date getCourseStartTime() {
+        return courseStartTime;
+    }
+
+    public void setCourseStartTime(Date courseStartTime) {
+        this.courseStartTime = courseStartTime;
+    }
 }

+ 1 - 0
mec-biz/src/main/java/com/ym/mec/biz/service/impl/CourseScheduleStudentPaymentServiceImpl.java

@@ -596,6 +596,7 @@ public class CourseScheduleStudentPaymentServiceImpl extends BaseServiceImpl<Lon
 
 		if(statusCoursesMap.containsKey(CourseStatusEnum.OVER)){
 			List<CourseScheduleStudentPaymentDto> notStartCourses = statusCoursesMap.get(CourseStatusEnum.OVER);
+			notStartCourses.sort(Comparator.comparing(CourseScheduleStudentPaymentDto::getCourseStartTime));
 			for (CourseScheduleStudentPaymentDto notStartCourse : notStartCourses) {
 				boolean isUpdate = studentRegistrationService.updateUserSurplusCourseFee(notStartCourse.getUserId(), notStartCourse.getMusicGroupId(), notStartCourse.getExpectPrice().negate(), StringUtils.join("课程结束,扣除课程费用:", notStartCourse.getCourseScheduleId()), null);
 				if(!isUpdate){

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

@@ -32,6 +32,7 @@
 
 	<resultMap id="CourseScheduleStudentPaymentDto" type="com.ym.mec.biz.dal.entity.CourseScheduleStudentPaymentDto" extends="CourseScheduleStudentPayment">
 		<result column="course_status_" property="courseStatus" typeHandler="com.ym.mec.common.dal.CustomEnumTypeHandler"/>
+		<result column="course_start_time_" property="courseStartTime"/>
 	</resultMap>
 
 	<!-- 根据主键查询一条记录 -->
@@ -623,6 +624,7 @@
 	<select id="findNeedUpdateActualPriceStudentCourses" resultMap="CourseScheduleStudentPaymentDto">
 		SELECT
 			cssp.*,
+			CONCAT(cs.class_date_,' ',cs.start_class_time_) course_start_time_,
 			cs.status_ course_status_
 		FROM
 			course_schedule_student_payment cssp