Browse Source

Merge branch 'master' of http://git.dayaedu.com/yonge/mec

zouxuan 5 years ago
parent
commit
cff5bafd12

+ 20 - 0
mec-biz/src/main/java/com/ym/mec/biz/dal/dao/CourseScheduleDao.java

@@ -192,6 +192,16 @@ public interface CourseScheduleDao extends BaseDAO<Long, CourseSchedule> {
     List<CourseScheduleDto> getTeacherCourseSchedulesWithDate(@Param("classDate") Date classDate, @Param("teacherId") Long teacherId, @Param("type") String type);
     List<CourseScheduleDto> getTeacherCourseSchedulesWithDate(@Param("classDate") Date classDate, @Param("teacherId") Long teacherId, @Param("type") String type);
 
 
     /**
     /**
+     * @describe
+     * @author Joburgess
+     * @date 2019/12/26
+     * @param classDate:
+     * @param teacherId:
+     * @return java.util.List<com.ym.mec.biz.dal.dto.CourseScheduleDto>
+     */
+    List<CourseScheduleDto> getTeacherHistoryCourseSchedulesWithDate(@Param("classDate") Date classDate, @Param("teacherId") Long teacherId);
+
+    /**
      * @param params:
      * @param params:
      * @return java.util.List<com.ym.mec.biz.dal.dto.CourseScheduleDto>
      * @return java.util.List<com.ym.mec.biz.dal.dto.CourseScheduleDto>
      * @describe 根据日期获取排课
      * @describe 根据日期获取排课
@@ -257,6 +267,16 @@ public interface CourseScheduleDao extends BaseDAO<Long, CourseSchedule> {
     List<Date> getTeacherCourseScheduleDate(@Param("teacherId") Long teacherId, @Param("month") Date month, @Param("type") String type);
     List<Date> getTeacherCourseScheduleDate(@Param("teacherId") Long teacherId, @Param("month") Date month, @Param("type") String type);
 
 
     /**
     /**
+     * @describe 获取教师历史有课日期
+     * @author Joburgess
+     * @date 2019/12/26
+     * @param teacherId: 教师编号
+     * @param month: 月份
+     * @return java.util.List<java.util.Date>
+     */
+    List<Date> getTeacherHistoryCourseScheduleDate(@Param("teacherId") Integer teacherId, @Param("month") Date month);
+
+    /**
      * @param month:
      * @param month:
      * @param organId:
      * @param organId:
      * @return java.util.List<java.util.Date>
      * @return java.util.List<java.util.Date>

+ 4 - 0
mec-biz/src/main/java/com/ym/mec/biz/dal/dao/CourseScheduleStudentPaymentDao.java

@@ -91,6 +91,10 @@ public interface CourseScheduleStudentPaymentDao extends BaseDAO<Long, CourseSch
      */
      */
     int batchDeleteWithID(@Param("ids") List<Integer> ids);
     int batchDeleteWithID(@Param("ids") List<Integer> ids);
 
 
+
+//    int batchDeleteWithCourseAndUser(@Param("courseScheduleIds") List<Integer> courseScheduleIds,
+//                                     @Param("userId") Integer userId);
+
     /**
     /**
      * @param classGroupId:
      * @param classGroupId:
      * @param userId:
      * @param userId:

+ 19 - 0
mec-biz/src/main/java/com/ym/mec/biz/service/CourseScheduleService.java

@@ -113,6 +113,16 @@ public interface CourseScheduleService extends BaseService<Long, CourseSchedule>
 	List<CourseScheduleDto> getTeacherCourseSchedulesWithDate(Integer userId, Date classDate, String type);
 	List<CourseScheduleDto> getTeacherCourseSchedulesWithDate(Integer userId, Date classDate, String type);
 
 
 	/**
 	/**
+	 * @describe 根据日期获取
+	 * @author Joburgess
+	 * @date 2019/12/26
+	 * @param userId:
+	 * @param classDate:
+	 * @return java.util.List<com.ym.mec.biz.dal.dto.CourseScheduleDto>
+	 */
+	List<CourseScheduleDto> getTeacherHistoryCourseSchedulesWithDate(Integer userId, Date classDate);
+
+	/**
 	 * @Author: Joburgess
 	 * @Author: Joburgess
 	 * @Date: 2019/9/17
 	 * @Date: 2019/9/17
 	 * 根据日期获取当日排课信息
 	 * 根据日期获取当日排课信息
@@ -141,6 +151,15 @@ public interface CourseScheduleService extends BaseService<Long, CourseSchedule>
 	List<Date> getCourseScheduleDateByTeacher(Date month, String type);
 	List<Date> getCourseScheduleDateByTeacher(Date month, String type);
 
 
 	/**
 	/**
+	 * @describe
+	 * @author Joburgess
+	 * @date 2019/12/26
+	 * @param month:
+	 * @return java.util.List<java.util.Date>
+	 */
+	List<Date> getHistoryCourseScheduleDateByTeacher(Integer userId,Date month);
+
+	/**
 	 * @Author: Joburgess
 	 * @Author: Joburgess
 	 * @Date: 2019/10/11
 	 * @Date: 2019/10/11
 	 * @params [month]
 	 * @params [month]

+ 30 - 0
mec-biz/src/main/java/com/ym/mec/biz/service/impl/CourseScheduleServiceImpl.java

@@ -278,6 +278,11 @@ public class CourseScheduleServiceImpl extends BaseServiceImpl<Long, CourseSched
 	}
 	}
 
 
 	@Override
 	@Override
+	public List<Date> getHistoryCourseScheduleDateByTeacher(Integer userId,Date month) {
+		return courseScheduleDao.getTeacherHistoryCourseScheduleDate(userId,month);
+	}
+
+	@Override
 	public List<Date> getCourseScheduleDates(Date month) {
 	public List<Date> getCourseScheduleDates(Date month) {
 		SysUser user = sysUserFeignService.queryUserInfo();
 		SysUser user = sysUserFeignService.queryUserInfo();
 		if(null==user){
 		if(null==user){
@@ -389,6 +394,31 @@ public class CourseScheduleServiceImpl extends BaseServiceImpl<Long, CourseSched
 	}
 	}
 
 
 	@Override
 	@Override
+	public List<CourseScheduleDto> getTeacherHistoryCourseSchedulesWithDate(Integer userId, Date classDate) {
+		if(Objects.isNull(classDate)){
+			throw new BizException("请选择上课日期!");
+		}
+		List<CourseScheduleDto> teacherCourseSchedulesWithDate = courseScheduleDao.getTeacherHistoryCourseSchedulesWithDate(classDate, userId.longValue());
+		List<Long> courseScheduleIds = teacherCourseSchedulesWithDate.stream()
+				.filter(cs -> cs.getType().equals(CourseSchedule.CourseScheduleType.VIP) || cs.getType().equals(CourseSchedule.CourseScheduleType.DEMO))
+				.map(CourseScheduleDto::getId).collect(Collectors.toList());
+
+		Map<Integer, String> subjectNameCourseMap=new HashMap<>();
+		if(!CollectionUtils.isEmpty(courseScheduleIds)){
+			List<Map<Integer, String>> subjectNameCourseMaps = subjectDao.findSubjectNameCourseMaps(courseScheduleIds);
+			subjectNameCourseMap = MapUtil.convertMybatisMap(subjectNameCourseMaps);
+		}
+		for (CourseScheduleDto courseScheduleDto : teacherCourseSchedulesWithDate) {
+			if(Objects.nonNull(courseScheduleDto.getClassGroupId())){
+				String[] studentNums = classGroupStudentMapperDao.findCourseStudentName(courseScheduleDto.getId().intValue());
+				courseScheduleDto.setStudentNames(org.apache.commons.lang3.StringUtils.join(studentNums, ","));
+			}
+			courseScheduleDto.setSubjectName(subjectNameCourseMap.get(courseScheduleDto.getId()));
+		}
+		return teacherCourseSchedulesWithDate;
+	}
+
+	@Override
 	public void checkNewCourseSchedules(List<CourseSchedule> courseSchedules,boolean checkExistCourseSchedule){
 	public void checkNewCourseSchedules(List<CourseSchedule> courseSchedules,boolean checkExistCourseSchedule){
 		if(CollectionUtils.isEmpty(courseSchedules)){
 		if(CollectionUtils.isEmpty(courseSchedules)){
 			return;
 			return;

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

@@ -1450,7 +1450,7 @@ public class MusicGroupServiceImpl extends BaseServiceImpl<String, MusicGroup> i
         StudentPaymentOrder studentPaymentOrder = new StudentPaymentOrder();
         StudentPaymentOrder studentPaymentOrder = new StudentPaymentOrder();
         studentPaymentOrder.setGroupType(GroupType.MUSIC);
         studentPaymentOrder.setGroupType(GroupType.MUSIC);
         studentPaymentOrder.setUserId(userId);
         studentPaymentOrder.setUserId(userId);
-        studentPaymentOrder.setOrderNo(idGeneratorService.generatorId("RENEW") + "");
+        studentPaymentOrder.setOrderNo(idGeneratorService.generatorId("payment") + "");
         studentPaymentOrder.setType(OrderTypeEnum.RENEW);
         studentPaymentOrder.setType(OrderTypeEnum.RENEW);
         studentPaymentOrder.setExpectAmount(amount);
         studentPaymentOrder.setExpectAmount(amount);
         studentPaymentOrder.setActualAmount(amount);
         studentPaymentOrder.setActualAmount(amount);

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

@@ -71,7 +71,7 @@ public class StudentRechargeServiceImpl extends BaseServiceImpl<String, StudentR
 		studentRecharge.setUserId(userId);
 		studentRecharge.setUserId(userId);
 		studentRecharge.setStatus(DealStatusEnum.ING);
 		studentRecharge.setStatus(DealStatusEnum.ING);
 		studentRecharge.setTransNo(null);
 		studentRecharge.setTransNo(null);
-		studentRecharge.setOrderNo(idGeneratorService.generatorId("recharge") + "");
+		studentRecharge.setOrderNo(idGeneratorService.generatorId("payment") + "");
 		studentRechargeDao.insert(studentRecharge);
 		studentRechargeDao.insert(studentRecharge);
 
 
 		try {
 		try {

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

@@ -845,14 +845,14 @@ public class StudentRegistrationServiceImpl extends BaseServiceImpl<Long, Studen
                     studentRegistration.getParentsName(), studentPaymentOrder.getActualAmount());
                     studentRegistration.getParentsName(), studentPaymentOrder.getActualAmount());
 
 
 //            //生成课程协议
 //            //生成课程协议
-            /*contractService.transferMusicGroupCoursesContract(studentRegistration.getUserId(),studentRegistration.getMusicGroupId());
+            contractService.transferMusicGroupCoursesContract(studentRegistration.getUserId(),studentRegistration.getMusicGroupId());
             //商品协议(租赁时候有)
             //商品协议(租赁时候有)
             if(musicOneSubjectClassPlan.getKitGroupPurchaseType().equals(KitGroupPurchaseTypeEnum.LEASE)){
             if(musicOneSubjectClassPlan.getKitGroupPurchaseType().equals(KitGroupPurchaseTypeEnum.LEASE)){
                 StudentPaymentOrderDetail applyOrderMusical = studentPaymentOrderDetailService.findApplyOrderMusical(studentPaymentOrder.getId());
                 StudentPaymentOrderDetail applyOrderMusical = studentPaymentOrderDetailService.findApplyOrderMusical(studentPaymentOrder.getId());
                 if(applyOrderMusical != null && applyOrderMusical.getGoodsIdList() != null && !applyOrderMusical.getGoodsIdList().equals("")){
                 if(applyOrderMusical != null && applyOrderMusical.getGoodsIdList() != null && !applyOrderMusical.getGoodsIdList().equals("")){
                     contractService.transferGoodsContract(studentPaymentOrder.getUserId(),studentPaymentOrder.getMusicGroupId(),applyOrderMusical.getGoodsIdList(),musicOneSubjectClassPlan.getKitGroupPurchaseType());
                     contractService.transferGoodsContract(studentPaymentOrder.getUserId(),studentPaymentOrder.getMusicGroupId(),applyOrderMusical.getGoodsIdList(),musicOneSubjectClassPlan.getKitGroupPurchaseType());
                 }
                 }
-            }*/
+            }
         }
         }
 
 
 
 

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

@@ -18,6 +18,7 @@ import com.ym.mec.common.entity.ImGroupMember;
 import com.ym.mec.common.entity.ImGroupModel;
 import com.ym.mec.common.entity.ImGroupModel;
 import com.ym.mec.common.exception.BizException;
 import com.ym.mec.common.exception.BizException;
 import com.ym.mec.common.page.PageInfo;
 import com.ym.mec.common.page.PageInfo;
+import com.ym.mec.common.service.IdGeneratorService;
 import com.ym.mec.common.service.impl.BaseServiceImpl;
 import com.ym.mec.common.service.impl.BaseServiceImpl;
 import com.ym.mec.im.ImFeignService;
 import com.ym.mec.im.ImFeignService;
 import com.ym.mec.thirdparty.message.MessageSenderPluginContext;
 import com.ym.mec.thirdparty.message.MessageSenderPluginContext;
@@ -112,6 +113,8 @@ public class VipGroupServiceImpl extends BaseServiceImpl<Long, VipGroup> impleme
     private TeacherService teacherService;
     private TeacherService teacherService;
 	@Autowired
 	@Autowired
 	private StudentPauseInfoDao studentPauseInfoDao;
 	private StudentPauseInfoDao studentPauseInfoDao;
+	@Autowired
+	private IdGeneratorService idGeneratorService;
 
 
 	private static final Logger LOGGER = LoggerFactory
 	private static final Logger LOGGER = LoggerFactory
 			.getLogger(VipGroup.class);
 			.getLogger(VipGroup.class);
@@ -1034,7 +1037,7 @@ public class VipGroupServiceImpl extends BaseServiceImpl<Long, VipGroup> impleme
 		StudentPaymentOrder studentPaymentOrder=new StudentPaymentOrder();
 		StudentPaymentOrder studentPaymentOrder=new StudentPaymentOrder();
 		studentPaymentOrder.setUserId(user.getId());
 		studentPaymentOrder.setUserId(user.getId());
         studentPaymentOrder.setGroupType(GroupType.VIP);
         studentPaymentOrder.setGroupType(GroupType.VIP);
-		String orderNo=StringUtils.join(new String[]{user.getId().toString(),String.valueOf(System.currentTimeMillis())});
+		String orderNo=idGeneratorService.generatorId("payment") + "";
 		studentPaymentOrder.setOrderNo(orderNo);
 		studentPaymentOrder.setOrderNo(orderNo);
 		studentPaymentOrder.setStatus(DealStatusEnum.ING);
 		studentPaymentOrder.setStatus(DealStatusEnum.ING);
 		studentPaymentOrder.setType(OrderTypeEnum.SMALL_CLASS_TO_BUY);
 		studentPaymentOrder.setType(OrderTypeEnum.SMALL_CLASS_TO_BUY);
@@ -1391,8 +1394,6 @@ public class VipGroupServiceImpl extends BaseServiceImpl<Long, VipGroup> impleme
 
 
         studentPauseInfoDao.insert(studentPauseInfo);
         studentPauseInfoDao.insert(studentPauseInfo);
 
 
-        courseScheduleTeacherSalaryService.updateVipGroupCourseTeacherSalary(vipGroupId.intValue(),-1,vipGroup.getStatus());
-
         sysUserCashAccountService.appendCourseBalance(studentId, surplusCourseFee);
         sysUserCashAccountService.appendCourseBalance(studentId, surplusCourseFee);
 		classStudentMapperByUserIdAndClassGroupId.setStatus(ClassGroupStudentStatusEnum.QUIT_SCHOOL);
 		classStudentMapperByUserIdAndClassGroupId.setStatus(ClassGroupStudentStatusEnum.QUIT_SCHOOL);
 		classGroupStudentMapperDao.update(classStudentMapperByUserIdAndClassGroupId);
 		classGroupStudentMapperDao.update(classStudentMapperByUserIdAndClassGroupId);
@@ -1412,6 +1413,7 @@ public class VipGroupServiceImpl extends BaseServiceImpl<Long, VipGroup> impleme
 			vipGroupDao.update(vipGroup);
 			vipGroupDao.update(vipGroup);
 		}
 		}
 
 
+		courseScheduleTeacherSalaryService.updateVipGroupCourseTeacherSalary(vipGroupId.intValue(),-1,vipGroup.getStatus());
 	}
 	}
 
 
     @Override
     @Override
@@ -1457,7 +1459,6 @@ public class VipGroupServiceImpl extends BaseServiceImpl<Long, VipGroup> impleme
 			throw new BizException("未找到休学信息");
 			throw new BizException("未找到休学信息");
 		}
 		}
 		Map<String, Object> courseInfo = JSON.parseObject(studentPauseInfo.getCoursesJson(), Map.class);
 		Map<String, Object> courseInfo = JSON.parseObject(studentPauseInfo.getCoursesJson(), Map.class);
-        Integer[] teachModeSequence=JSON.parseArray(courseInfo.get("teaChModeSequence").toString(), Integer.class).stream().toArray(Integer[]::new);
 		List<BigDecimal> coursePrices = (List<BigDecimal>) courseInfo.get("coursePriceInfo");
 		List<BigDecimal> coursePrices = (List<BigDecimal>) courseInfo.get("coursePriceInfo");
 		coursePrices.sort(Comparator.naturalOrder());
 		coursePrices.sort(Comparator.naturalOrder());
 		Collections.reverse(coursePrices);
 		Collections.reverse(coursePrices);
@@ -1527,6 +1528,7 @@ public class VipGroupServiceImpl extends BaseServiceImpl<Long, VipGroup> impleme
 		studentPauseInfoDao.update(studentPauseInfo);
 		studentPauseInfoDao.update(studentPauseInfo);
         vipGroup.setStatus(VipGroupStatusEnum.PROGRESS);
         vipGroup.setStatus(VipGroupStatusEnum.PROGRESS);
         vipGroupDao.update(vipGroup);
         vipGroupDao.update(vipGroup);
+		courseScheduleTeacherSalaryService.updateVipGroupCourseTeacherSalary(vipGroup.getId().intValue(),1,vipGroup.getStatus());
 	}
 	}
 
 
     @Override
     @Override

+ 3 - 8
mec-biz/src/main/resources/config/mybatis/ClassGroupTeacherSalaryMapper.xml

@@ -74,10 +74,10 @@
         #{onlineClassesSalary,jdbcType=DECIMAL},
         #{onlineClassesSalary,jdbcType=DECIMAL},
       </if>
       </if>
       <if test="createTime != null">
       <if test="createTime != null">
-        #{createTime,jdbcType=TIMESTAMP},
+        NOW(),
       </if>
       </if>
       <if test="updateTime != null">
       <if test="updateTime != null">
-        #{updateTime,jdbcType=TIMESTAMP},
+        NOW(),
       </if>
       </if>
     </trim>
     </trim>
   </insert>
   </insert>
@@ -106,12 +106,7 @@
       <if test="onlineClassesSalary != null">
       <if test="onlineClassesSalary != null">
         online_classes_salary_ = #{onlineClassesSalary,jdbcType=DECIMAL},
         online_classes_salary_ = #{onlineClassesSalary,jdbcType=DECIMAL},
       </if>
       </if>
-      <if test="createTime != null">
-        create_time_ = #{createTime,jdbcType=TIMESTAMP},
-      </if>
-      <if test="updateTime != null">
-        update_time_ = #{updateTime,jdbcType=TIMESTAMP},
-      </if>
+      update_time_ = NOW()
     </set>
     </set>
     where id_ = #{id,jdbcType=BIGINT}
     where id_ = #{id,jdbcType=BIGINT}
   </update>
   </update>

+ 55 - 0
mec-biz/src/main/resources/config/mybatis/CourseScheduleMapper.xml

@@ -532,6 +532,40 @@
         ORDER BY start_class_time_
         ORDER BY start_class_time_
     </select>
     </select>
 
 
+    <select id="getTeacherHistoryCourseSchedulesWithDate" resultMap="courseScheduleDto">
+        SELECT
+            cs.id_ seal_class_id_,
+            cg.name_,
+            su.username_ teacher_name_,
+            cs.type_,
+            cs.id_,
+            cs.class_group_id_,
+            cs.class_date_,
+            CONCAT(cs.class_date_,' ',cs.start_class_time_) start_class_time_,
+            CONCAT(cs.class_date_,' ',cs.end_class_time_) end_class_time_,
+            cs.status_,
+            csts.user_id_ actual_teacher_id_,
+            csts.teacher_role_,
+            cs.schoole_id_,
+            s.name_ school_name_,
+            if(ta.sign_in_status_ IS NULL,0,1) sign_in_status_,
+            if(ta.sign_out_status_ IS NULL,0,1) sign_out_status_,
+            cs.teach_mode_
+        FROM
+            course_schedule_teacher_salary csts
+            LEFT JOIN course_schedule cs ON csts.course_schedule_id_=cs.id_
+            LEFT JOIN sys_user su ON csts.user_id_ = su.id_
+            LEFT JOIN class_group cg ON cs.class_group_id_ = cg.id_
+            LEFT JOIN school s ON cs.schoole_id_ = s.id_
+            LEFT JOIN teacher_attendance ta ON cs.id_=ta.course_schedule_id_ AND ta.teacher_id_=#{teacherId}
+        WHERE
+            (cs.del_flag_ != 1 OR cs.del_flag_ IS NULL)
+            AND cs.class_date_ = DATE_FORMAT(#{classDate},'%Y%m%d')
+            AND csts.user_id_ = #{teacherId} AND cg.del_flag_ = 0
+            AND CONCAT( cs.class_date_, ' ', cs.start_class_time_ )&lt;NOW()
+        ORDER BY start_class_time_
+    </select>
+
     <select id="getCourseScheduleDateByMonth" resultType="java.util.Date">
     <select id="getCourseScheduleDateByMonth" resultType="java.util.Date">
         SELECT
         SELECT
         cs.class_date_
         cs.class_date_
@@ -694,6 +728,27 @@
         GROUP BY cs.class_date_
         GROUP BY cs.class_date_
     </select>
     </select>
 
 
+    <select id="getTeacherHistoryCourseScheduleDate" resultType="java.util.Date">
+        SELECT
+        cs.class_date_
+        FROM
+        course_schedule_teacher_salary csts
+        LEFT JOIN course_schedule cs ON csts.course_schedule_id_=cs.id_
+        LEFT JOIN class_group cg ON cs.class_group_id_ = cg.id_
+        WHERE
+        (cs.del_flag_ != 1 OR cs.del_flag_ IS NULL)
+        AND CONCAT(cs.class_date_,' ',cs.start_class_time_) &lt; NOW()
+        AND csts.user_id_ = #{teacherId}
+        AND cg.del_flag_ = 0
+        <if test="month==null">
+            AND DATE_FORMAT( NOW(), '%Y%m' ) = DATE_FORMAT( cs.class_date_, '%Y%m' )
+        </if>
+        <if test="month!=null">
+            AND DATE_FORMAT( #{month}, '%Y%m' ) = DATE_FORMAT( cs.class_date_, '%Y%m' )
+        </if>
+        GROUP BY cs.class_date_
+    </select>
+
     <select id="getCourseScheduleDate" resultType="java.util.Date">
     <select id="getCourseScheduleDate" resultType="java.util.Date">
         SELECT
         SELECT
         cs.class_date_
         cs.class_date_

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

@@ -163,7 +163,15 @@
 		AND cs.class_group_id_ = #{classGroupId}
 		AND cs.class_group_id_ = #{classGroupId}
     </select>
     </select>
 	<select id="findNotStartCourseStudentPaymentIdsWithClassGroupAndStudent" resultType="int">
 	<select id="findNotStartCourseStudentPaymentIdsWithClassGroupAndStudent" resultType="int">
-		SELECT id_ FROM course_schedule_student_payment WHERE class_group_id_=#{classGroupId} AND user_id_=#{userId}
+		SELECT
+			cssp.id_
+		FROM
+			course_schedule_student_payment cssp
+			LEFT JOIN course_schedule cs ON cs.id_=cssp.course_schedule_id_
+		WHERE
+			cssp.class_group_id_ = #{classGroupId}
+			AND cssp.user_id_=#{userId}
+			AND CONCAT(cs.class_date_,' ',cs.start_class_time_)>NOW()
 	</select>
 	</select>
 
 
     <select id="findVipGroupCoursePrice" resultType="java.math.BigDecimal">
     <select id="findVipGroupCoursePrice" resultType="java.math.BigDecimal">

+ 1 - 1
mec-biz/src/main/resources/config/mybatis/CourseScheduleTeacherSalaryMapper.xml

@@ -202,7 +202,7 @@
 			LEFT JOIN course_schedule cs ON vg.id_ = cs.music_group_id_
 			LEFT JOIN course_schedule cs ON vg.id_ = cs.music_group_id_
 			LEFT JOIN course_schedule_teacher_salary csts ON cs.id_ = csts.course_schedule_id_
 			LEFT JOIN course_schedule_teacher_salary csts ON cs.id_ = csts.course_schedule_id_
 			<include refid="vipGroupSalaryQueryCondition"/>
 			<include refid="vipGroupSalaryQueryCondition"/>
-		ORDER BY id_
+		ORDER BY class_date_
 		<include refid="global.limit"/>
 		<include refid="global.limit"/>
 	</select>
 	</select>
 	<select id="countVipGroupSalarys" resultType="int">
 	<select id="countVipGroupSalarys" resultType="int">

+ 31 - 0
mec-teacher/src/main/java/com/ym/mec/teacher/controller/TeacherCourseScheduleController.java

@@ -37,6 +37,7 @@ public class TeacherCourseScheduleController extends BaseController {
     private StudentAttendanceService studentAttendanceService;
     private StudentAttendanceService studentAttendanceService;
     @Autowired
     @Autowired
     private SysUserFeignService sysUserFeignService;
     private SysUserFeignService sysUserFeignService;
+
     @ApiOperation(value = "根据月份获取该月有课的日期")
     @ApiOperation(value = "根据月份获取该月有课的日期")
     @GetMapping("/getCourseScheduleDateByMonth")
     @GetMapping("/getCourseScheduleDateByMonth")
     public Object getCourseScheduleDateByMonth(@ApiParam(value = "月份", required = true) @RequestParam Date month,
     public Object getCourseScheduleDateByMonth(@ApiParam(value = "月份", required = true) @RequestParam Date month,
@@ -65,6 +66,36 @@ public class TeacherCourseScheduleController extends BaseController {
         return succeed(result);
         return succeed(result);
     }
     }
 
 
+    @ApiOperation(value = "根据月份获取该月历史有课的日期")
+    @GetMapping("/getHistoryCourseScheduleDateByMonth")
+    public Object getHistoryCourseScheduleDateByTeacher(@ApiParam(value = "月份", required = true) @RequestParam Date month) {
+        SysUser user = sysUserFeignService.queryUserInfo();
+        if(null==user){
+            return failed(HttpStatus.FORBIDDEN, "请登录");
+        }
+        if(Objects.isNull(month)){
+            return failed(HttpStatus.FORBIDDEN, "请指定日期!");
+        }
+        return succeed(scheduleService.getHistoryCourseScheduleDateByTeacher(user.getId(),month));
+    }
+
+    @ApiOperation(value = "根据日期获取当日历史课程")
+    @GetMapping("/getHistoryCourseSchedulesWithDate")
+    public Object getHistoryCourseSchedulesWithDate(@ApiParam(value = "日期", required = true) Date date){
+        if(Objects.isNull(date)){
+            return failed("请指定日期!");
+        }
+        SysUser user = sysUserFeignService.queryUserInfo();
+        if(null==user){
+            return failed(HttpStatus.FORBIDDEN, "请登录");
+        }
+        List<CourseScheduleDto> teacherCourseSchedulesWithDate = scheduleService.getTeacherHistoryCourseSchedulesWithDate(user.getId(),date);
+        Map<String,Object> result = new HashMap<>();
+        result.put("rows",teacherCourseSchedulesWithDate);
+        result.put("appealDaysRange",1);
+        return succeed(result);
+    }
+
     @ApiOperation(value = "根据课程ID查询打卡界面课程详情")
     @ApiOperation(value = "根据课程ID查询打卡界面课程详情")
     @GetMapping("/getCurrentCourseDetail")
     @GetMapping("/getCurrentCourseDetail")
     public Object getCurrentCourseDetail(Long courseID){
     public Object getCurrentCourseDetail(Long courseID){