Procházet zdrojové kódy

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

zouxuan před 5 roky
rodič
revize
4eb7f10879
42 změnil soubory, kde provedl 504 přidání a 252 odebrání
  1. 9 0
      mec-biz/src/main/java/com/ym/mec/biz/dal/dao/ClassGroupDao.java
  2. 7 0
      mec-biz/src/main/java/com/ym/mec/biz/dal/dao/CourseHomeworkDao.java
  3. 13 0
      mec-biz/src/main/java/com/ym/mec/biz/dal/dao/CourseScheduleDao.java
  4. 3 2
      mec-biz/src/main/java/com/ym/mec/biz/dal/dao/StudentPaymentOrderDao.java
  5. 1 1
      mec-biz/src/main/java/com/ym/mec/biz/dal/dao/SubjectDao.java
  6. 8 6
      mec-biz/src/main/java/com/ym/mec/biz/dal/dao/TeacherAttendanceDao.java
  7. 12 2
      mec-biz/src/main/java/com/ym/mec/biz/dal/dao/TeacherDao.java
  8. 12 8
      mec-biz/src/main/java/com/ym/mec/biz/service/CourseHomeworkService.java
  9. 0 6
      mec-biz/src/main/java/com/ym/mec/biz/service/CourseScheduleService.java
  10. 7 4
      mec-biz/src/main/java/com/ym/mec/biz/service/DemoGroupService.java
  11. 2 3
      mec-biz/src/main/java/com/ym/mec/biz/service/SubjectService.java
  12. 16 0
      mec-biz/src/main/java/com/ym/mec/biz/service/TeacherAttendanceService.java
  13. 12 1
      mec-biz/src/main/java/com/ym/mec/biz/service/TeacherService.java
  14. 2 2
      mec-biz/src/main/java/com/ym/mec/biz/service/impl/ClassGroupServiceImpl.java
  15. 38 18
      mec-biz/src/main/java/com/ym/mec/biz/service/impl/CourseHomeworkServiceImpl.java
  16. 8 23
      mec-biz/src/main/java/com/ym/mec/biz/service/impl/CourseScheduleServiceImpl.java
  17. 8 6
      mec-biz/src/main/java/com/ym/mec/biz/service/impl/DemoGroupServiceImpl.java
  18. 1 0
      mec-biz/src/main/java/com/ym/mec/biz/service/impl/StudentAttendanceServiceImpl.java
  19. 3 6
      mec-biz/src/main/java/com/ym/mec/biz/service/impl/SubjectServiceImpl.java
  20. 58 14
      mec-biz/src/main/java/com/ym/mec/biz/service/impl/TeacherAttendanceServiceImpl.java
  21. 6 2
      mec-biz/src/main/java/com/ym/mec/biz/service/impl/TeacherServiceImpl.java
  22. 43 42
      mec-biz/src/main/java/com/ym/mec/biz/service/impl/VipGroupServiceImpl.java
  23. 10 2
      mec-biz/src/main/resources/config/mybatis/ClassGroupMapper.xml
  24. 9 0
      mec-biz/src/main/resources/config/mybatis/CourseHomeworkMapper.xml
  25. 50 53
      mec-biz/src/main/resources/config/mybatis/CourseScheduleMapper.xml
  26. 4 1
      mec-biz/src/main/resources/config/mybatis/StudentPaymentOrderMapper.xml
  27. 8 0
      mec-biz/src/main/resources/config/mybatis/TeacherAttendanceMapper.xml
  28. 10 0
      mec-biz/src/main/resources/config/mybatis/TeacherMapper.xml
  29. 1 1
      mec-biz/src/main/resources/config/mybatis/VipGroupMapper.xml
  30. 4 4
      mec-client-api/src/main/java/com/ym/mec/task/TaskRemoteService.java
  31. 5 5
      mec-client-api/src/main/java/com/ym/mec/task/fallback/TaskRemoteServiceFallback.java
  32. 2 2
      mec-student/src/main/java/com/ym/mec/student/controller/MusicGroupController.java
  33. 21 5
      mec-student/src/main/java/com/ym/mec/student/controller/StudentOrderController.java
  34. 2 2
      mec-task/src/main/java/com/ym/mec/task/jobs/HomeworkNoReplyRemaindTask.java
  35. 3 2
      mec-teacher/src/main/java/com/ym/mec/teacher/controller/DemoGroupController.java
  36. 0 15
      mec-teacher/src/main/java/com/ym/mec/teacher/controller/TeacherController.java
  37. 71 0
      mec-teacher/src/main/java/com/ym/mec/teacher/controller/TeacherSchoolController.java
  38. 12 1
      mec-teacher/src/main/java/com/ym/mec/teacher/controller/TeacherSubjectController.java
  39. 4 6
      mec-teacher/src/main/java/com/ym/mec/teacher/controller/TeacherVipGroupController.java
  40. 1 1
      mec-util/src/main/java/com/ym/mec/util/collection/MapUtil.java
  41. 10 6
      mec-web/src/main/java/com/ym/mec/web/controller/TaskController.java
  42. 8 0
      mec-web/src/main/java/com/ym/mec/web/controller/TeacherController.java

+ 9 - 0
mec-biz/src/main/java/com/ym/mec/biz/dal/dao/ClassGroupDao.java

@@ -385,4 +385,13 @@ public interface ClassGroupDao extends BaseDAO<Integer, ClassGroup> {
      * @return
      */
     List<ImUserModel> findGroupTeacher(Integer groupId);
+
+    /**
+     * @describe 根据课程获取班级信息
+     * @author Joburgess
+     * @date 2019/11/4
+     * @param courseScheduleId: 课程编号
+     * @return com.ym.mec.biz.dal.entity.ClassGroup
+     */
+    ClassGroup findByCourseSchedule(Integer courseScheduleId);
 }

+ 7 - 0
mec-biz/src/main/java/com/ym/mec/biz/dal/dao/CourseHomeworkDao.java

@@ -1,8 +1,10 @@
 package com.ym.mec.biz.dal.dao;
 
+import com.ym.mec.biz.dal.dto.Mapper;
 import com.ym.mec.biz.dal.dto.TeacherHomeworkListDto;
 import com.ym.mec.biz.dal.entity.CourseHomework;
 import com.ym.mec.common.dal.BaseDAO;
+
 import org.apache.ibatis.annotations.Param;
 
 import java.util.List;
@@ -31,4 +33,9 @@ public interface CourseHomeworkDao extends BaseDAO<Long, CourseHomework> {
     CourseHomework findByTeacherAndCourseHomewok(@Param("courseHomeworkId") Long courseHomeworkId,
                                                  @Param("userId") Integer userId);
 
+    /**
+     * 查询老师未回复作业的数量
+     * @return
+     */
+    List<Mapper> queryTeacerNoReplyNum();
 }

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

@@ -38,6 +38,17 @@ public interface CourseScheduleDao extends BaseDAO<Long, CourseSchedule> {
 	int batchAddCourseSchedules(List<CourseSchedule> courseSchedules);
 
 	/**
+	 * @describe 修改课程的状态
+	 * @author Joburgess
+	 * @date 2019/11/4
+	 * @param courseScheduleId: 课程编号
+	 * @param status: 状态
+	 * @return int
+	 */
+	int updateCourscheduleStatus(@Param("courseScheduleId") Integer courseScheduleId,
+								 @Param("status") String status);
+
+	/**
 	 * @describe 批量删除课程计划
 	 * @author Joburgess
 	 * @date 2019/10/31
@@ -381,6 +392,8 @@ public interface CourseScheduleDao extends BaseDAO<Long, CourseSchedule> {
 	 */
 	void updateByMusicGroupId(@Param("musicGroupId") String musicGroupId, @Param("schoolId") Integer schoolId);
 
+
+
 	/**
 	 * 获取班级某时间后相应节数的课程
 	 *

+ 3 - 2
mec-biz/src/main/java/com/ym/mec/biz/dal/dao/StudentPaymentOrderDao.java

@@ -28,7 +28,8 @@ public interface StudentPaymentOrderDao extends BaseDAO<Long, StudentPaymentOrde
      * 根据学生vip课获取缴费订单
      */
     StudentPaymentOrder findByStudentVipGroup(@Param("vipGroupId") Long vipGroupId,
-                                              @Param("userId") Integer userId);
+                                              @Param("userId") Integer userId,
+                                              @Param("status") String status);
 
     /**
      * 查询乐团报名的订单
@@ -73,4 +74,4 @@ public interface StudentPaymentOrderDao extends BaseDAO<Long, StudentPaymentOrde
      * @return
      */
     List<UserGoodsDto> findGoodsIds(@Param("musicGroupId") String musicGroupId, @Param("userId") Integer userId);
-}
+}

+ 1 - 1
mec-biz/src/main/java/com/ym/mec/biz/dal/dao/SubjectDao.java

@@ -73,7 +73,7 @@ public interface SubjectDao extends BaseDAO<Integer, Subject> {
      * @Date: 2019/9/26
      * 获取教师所属科目列表
      */
-    List<Subject> findTeacherSubjects(Long teacherId);
+    List<Subject> findTeacherSubjects(Integer teacherId);
 
     List<ConditionDto> findSubjectConditions();
 

+ 8 - 6
mec-biz/src/main/java/com/ym/mec/biz/dal/dao/TeacherAttendanceDao.java

@@ -1,14 +1,16 @@
 package com.ym.mec.biz.dal.dao;
 
+import java.util.Date;
+import java.util.List;
+import java.util.Map;
+
+import org.apache.ibatis.annotations.Param;
+
+import com.ym.mec.biz.dal.dto.Mapper;
 import com.ym.mec.biz.dal.dto.TeacherAbnormalAttendanceInfoDto;
 import com.ym.mec.biz.dal.dto.TeacherPersonalAttendanceDto;
 import com.ym.mec.biz.dal.entity.TeacherAttendance;
 import com.ym.mec.common.dal.BaseDAO;
-import org.apache.ibatis.annotations.Param;
-
-import java.util.Date;
-import java.util.List;
-import java.util.Map;
 
 public interface TeacherAttendanceDao extends BaseDAO<Long, TeacherAttendance> {
 
@@ -48,7 +50,7 @@ public interface TeacherAttendanceDao extends BaseDAO<Long, TeacherAttendance> {
      * @param minutes 分钟数
      * @return
      */
-    List<TeacherAttendance> queryNoSignOutListByOverMinutes(Integer minutes);
+    List<Mapper> queryNoSignOutListByOverMinutes(Integer minutes);
 
     /**
      * @describe 根据日期获取部门下异常签到的课程记录

+ 12 - 2
mec-biz/src/main/java/com/ym/mec/biz/dal/dao/TeacherDao.java

@@ -9,7 +9,6 @@ import org.apache.ibatis.annotations.Param;
 import java.math.BigDecimal;
 import java.util.List;
 import java.util.Map;
-import java.util.Set;
 
 public interface TeacherDao extends BaseDAO<Integer, Teacher> {
 
@@ -155,4 +154,15 @@ public interface TeacherDao extends BaseDAO<Integer, Teacher> {
      * @return
      */
     List<BasicUserDto> queryMusicGroupStudents(@Param("teacherIds") String teacherIds,@Param("search") String search);
-}
+
+    /**
+     * @describe 根据声部获取部门下的老师
+     * @author Joburgess
+     * @date 2019/11/4
+     * @param organId: 部门编号
+     * @param subjectId: 声部编号
+     * @return java.util.List<com.ym.mec.biz.dal.entity.Teacher>
+     */
+    List<Teacher> findOrganTeacherBySubject(@Param("organId") Integer organId,
+                                            @Param("subjectId") Integer subjectId);
+}

+ 12 - 8
mec-biz/src/main/java/com/ym/mec/biz/service/CourseHomeworkService.java

@@ -9,13 +9,17 @@ import java.util.Map;
 
 public interface CourseHomeworkService extends BaseService<Long, CourseHomework> {
 
-    /**
-     * @describe 根据班级获取教师布置的作业
-     * @author Joburgess
-     * @date 2019/10/20
-     * @param queryInfo:
-     * @return com.ym.mec.common.page.PageInfo
-     */
-    List<Map<String,Object>> findTeacherCourseHomeworkByClassGroup(CourseHomeworkQueryInfo queryInfo);
+	/**
+	 * @describe 根据班级获取教师布置的作业
+	 * @author Joburgess
+	 * @date 2019/10/20
+	 * @param queryInfo:
+	 * @return com.ym.mec.common.page.PageInfo
+	 */
+	List<Map<String, Object>> findTeacherCourseHomeworkByClassGroup(CourseHomeworkQueryInfo queryInfo);
 
+	/**
+	 * 作业未回复提醒
+	 */
+	void homeworkNoReplyRemind();
 }

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

@@ -200,12 +200,6 @@ public interface CourseScheduleService extends BaseService<Long, CourseSchedule>
 	boolean updateCourseScheduleToOverStatus();
 
 	/**
-	 * 推送未签到消息提醒
-	 * @return
-	 */
-	boolean pushNoSignInMessage();
-
-	/**
 	 * @describe 获取老师指定班级的排课
 	 * @author Joburgess
 	 * @date 2019/10/18

+ 7 - 4
mec-biz/src/main/java/com/ym/mec/biz/service/DemoGroupService.java

@@ -8,6 +8,7 @@ import com.ym.mec.biz.dal.page.TeacherManageDemoGroupQueryInfo;
 import com.ym.mec.common.page.PageInfo;
 import com.ym.mec.common.service.BaseService;
 
+import java.util.Date;
 import java.util.List;
 import java.util.Map;
 
@@ -56,11 +57,13 @@ public interface DemoGroupService extends BaseService<Long, DemoGroup> {
     List<EducationDemoGroupListDto> findDemoGroupStartClassTimesWithWeekByTeacherId(Long teacherID);
 
     /**
-     * @describe 获取试老师下周的试听课
+     * @describe 获取试老师指定时间段内的试听课
      * @author Joburgess
-     * @date 2019/10/28
-     * @param teacherId:
+     * @date 2019/11/4
+     * @param teacherId: 教师编号
+     * @param startTime: 开始时间
+     * @param endTime: 结束时间
      * @return java.util.Map<java.lang.String,java.lang.Object>
      */
-    Map<String,Object> findByTeacherId(Integer teacherId);
+    Map<String,Object> findByTeacherId(Integer teacherId, Date startTime, Date endTime);
 }

+ 2 - 3
mec-biz/src/main/java/com/ym/mec/biz/service/SubjectService.java

@@ -7,7 +7,6 @@ import com.ym.mec.biz.dal.entity.SubjectGoodsMapper;
 import com.ym.mec.biz.dal.page.SubjectQueryInfo;
 import com.ym.mec.common.page.PageInfo;
 import com.ym.mec.common.service.BaseService;
-import org.apache.ibatis.annotations.Param;
 
 import java.util.List;
 import java.util.Map;
@@ -65,7 +64,7 @@ public interface SubjectService extends BaseService<Integer, Subject> {
      * @Date: 2019/9/26
      * 获取教师所属科目列表
      */
-    List<Subject> findTeacherSubjects();
+    List<Subject> findTeacherSubjects(Integer userId);
 
     List<ConditionDto> findSubjectConditions();
 
@@ -85,4 +84,4 @@ public interface SubjectService extends BaseService<Integer, Subject> {
     List<Subject> findSubSubjects();
 
     List<Subject> findBySubjectByIdList(List<Integer> subjectIdList);
-}
+}

+ 16 - 0
mec-biz/src/main/java/com/ym/mec/biz/service/TeacherAttendanceService.java

@@ -3,6 +3,7 @@ package com.ym.mec.biz.service;
 import com.ym.mec.biz.dal.dto.TeacherAbnormalAttendanceInfoDto;
 import com.ym.mec.biz.dal.dto.TeacherSignOutDto;
 import com.ym.mec.biz.dal.entity.TeacherAttendance;
+import com.ym.mec.biz.dal.enums.SignStatusEnum;
 import com.ym.mec.biz.dal.page.TeacherCloseQueryInfo;
 import com.ym.mec.common.page.PageInfo;
 import com.ym.mec.common.service.BaseService;
@@ -21,6 +22,21 @@ public interface TeacherAttendanceService extends BaseService<Long, TeacherAtten
 	Map<String, Object> addTeacherAttendanceRecord(TeacherSignOutDto teacherSignOutDto);
 
 	/**
+	 * @describe 调价教师签到记录
+	 * @author Joburgess
+	 * @date 2019/11/4
+	 * @param courseScheduleId: 课程编号
+	 * @param userId: 用户编号
+	 * @param signStatus: 签到or签退
+	 * @param updateCourseScheduleStatus: 是否更新课程状态
+	 * @return void
+	 */
+	void addTeacherAttendanceRecord(Integer courseScheduleId,
+									Integer userId,
+									SignStatusEnum signStatus,
+									boolean updateCourseScheduleStatus);
+
+	/**
 	 * 获取教师个人的签到记录
 	 * @return
 	 */

+ 12 - 1
mec-biz/src/main/java/com/ym/mec/biz/service/TeacherService.java

@@ -78,6 +78,17 @@ public interface TeacherService extends BaseService<Integer, Teacher> {
     List<Teacher> findTeachers(@Param("organId") Integer organId);
 
     /**
+     * @describe 根据科目获取部门下的教师
+     * @author Joburgess
+     * @date 2019/11/4
+     * @param organId: 部门编号
+     * @param subjectId: 科目编号
+     * @return java.util.List<com.ym.mec.biz.dal.entity.Teacher>
+     */
+    List<Teacher> findOrganTeacherBySubject(@Param("organId") Integer organId,
+                                            @Param("subjectId") Integer subjectId);
+
+    /**
      * 获取教师上课结算列表
      * @param queryInfo
      * @return
@@ -121,4 +132,4 @@ public interface TeacherService extends BaseService<Integer, Teacher> {
      * @return
      */
     PageInfo<musicGroupStudentApplyDto> queryMusicGroupStudentApply(queryMusicGroupStudentQueryInfo queryInfo);
-}
+}

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

@@ -704,9 +704,9 @@ public class ClassGroupServiceImpl extends BaseServiceImpl<Integer, ClassGroup>
                 teacherClassGroupDto.setStudentNames(StringUtils.join(studentNums, ","));
                 if (teacherClassGroupDto.getOffLineClassesNum() > 0 && teacherClassGroupDto.getOffLineClassesNum() <= 0) {
                     teacherClassGroupDto.setClassMode(1);
-                } else if (teacherClassGroupDto.getOffLineClassesNum() > 0 && teacherClassGroupDto.getOffLineClassesNum() > 0) {
+                } else if (teacherClassGroupDto.getOnlineClassesNum() > 0 && teacherClassGroupDto.getOffLineClassesNum() > 0) {
                     teacherClassGroupDto.setClassMode(3);
-                } else if (teacherClassGroupDto.getOnlineClassesNum() < 0 && teacherClassGroupDto.getOffLineClassesNum() >= 0) {
+                } else if (teacherClassGroupDto.getOnlineClassesNum() <= 0 && teacherClassGroupDto.getOffLineClassesNum() > 0) {
                     teacherClassGroupDto.setClassMode(2);
                 } else {
                     teacherClassGroupDto.setClassMode(0);

+ 38 - 18
mec-biz/src/main/java/com/ym/mec/biz/service/impl/CourseHomeworkServiceImpl.java

@@ -1,34 +1,41 @@
 package com.ym.mec.biz.service.impl;
 
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.stream.Collectors;
+
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import org.springframework.util.CollectionUtils;
+
 import com.ym.mec.auth.api.client.SysUserFeignService;
 import com.ym.mec.biz.dal.dao.CourseHomeworkDao;
+import com.ym.mec.biz.dal.dto.Mapper;
 import com.ym.mec.biz.dal.dto.TeacherHomeworkListDto;
 import com.ym.mec.biz.dal.entity.CourseHomework;
+import com.ym.mec.biz.dal.enums.MessageTypeEnum;
 import com.ym.mec.biz.dal.page.CourseHomeworkQueryInfo;
 import com.ym.mec.biz.service.CourseHomeworkService;
 import com.ym.mec.biz.service.CourseScheduleService;
+import com.ym.mec.biz.service.SysMessageService;
 import com.ym.mec.common.dal.BaseDAO;
 import com.ym.mec.common.service.impl.BaseServiceImpl;
+import com.ym.mec.thirdparty.message.MessageSenderPluginContext.MessageSender;
 import com.ym.mec.util.collection.MapUtil;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Service;
-import org.springframework.util.CollectionUtils;
-
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.stream.Collectors;
 
 @Service
-public class CourseHomeworkServiceImpl extends BaseServiceImpl<Long, CourseHomework>  implements CourseHomeworkService {
-	
+public class CourseHomeworkServiceImpl extends BaseServiceImpl<Long, CourseHomework> implements CourseHomeworkService {
+
 	@Autowired
 	private CourseHomeworkDao courseHomeworkDao;
 	@Autowired
 	private CourseScheduleService courseScheduleService;
 	@Autowired
 	private SysUserFeignService sysUserFeignService;
+	@Autowired
+	private SysMessageService sysMessageService;
 
 	@Override
 	public BaseDAO<Long, CourseHomework> getDAO() {
@@ -36,16 +43,16 @@ public class CourseHomeworkServiceImpl extends BaseServiceImpl<Long, CourseHomew
 	}
 
 	@Override
-	public List<Map<String,Object>> findTeacherCourseHomeworkByClassGroup(CourseHomeworkQueryInfo queryInfo) {
+	public List<Map<String, Object>> findTeacherCourseHomeworkByClassGroup(CourseHomeworkQueryInfo queryInfo) {
 		Map<String, Object> params = new HashMap<>();
 		MapUtil.populateMap(params, queryInfo);
 		List<TeacherHomeworkListDto> dataList = null;
-		List<Map<String,Object>> result=new ArrayList<>();
+		List<Map<String, Object>> result = new ArrayList<>();
 		int count = courseHomeworkDao.countByClassGroupAndTeacher(params);
 		if (count > 0) {
 			dataList = courseHomeworkDao.findByClassGroupAndTeacher(params);
 			List<Integer> courseScheduleIds = dataList.stream().map(TeacherHomeworkListDto::getCourseScheduleId).collect(Collectors.toList());
-			if(!CollectionUtils.isEmpty(courseScheduleIds)){
+			if (!CollectionUtils.isEmpty(courseScheduleIds)) {
 				Map<Integer, Integer> courseScheduleCurrentTimes = courseScheduleService.findCourseScheduleCurrentTimes(courseScheduleIds);
 				dataList.forEach(teacherHomeworkListDto -> {
 					teacherHomeworkListDto.setCurrentClassTimes(courseScheduleCurrentTimes.get(teacherHomeworkListDto.getCourseScheduleId()));
@@ -54,13 +61,26 @@ public class CourseHomeworkServiceImpl extends BaseServiceImpl<Long, CourseHomew
 		}
 		if (count != 0) {
 			Map<String, List<TeacherHomeworkListDto>> collect = dataList.stream().collect(Collectors.groupingBy(TeacherHomeworkListDto::getDay));
-			for(String key:collect.keySet()){
-				Map<String,Object> r=new HashMap<>();
-				r.put("day",key);
-				r.put("list",collect.get(key));
+			for (String key : collect.keySet()) {
+				Map<String, Object> r = new HashMap<>();
+				r.put("day", key);
+				r.put("list", collect.get(key));
 				result.add(r);
 			}
 		}
 		return result;
 	}
+
+	@Override
+	public void homeworkNoReplyRemind() {
+		List<Mapper> list = courseHomeworkDao.queryTeacerNoReplyNum();
+
+		for (Mapper mapper : list) {
+			Map<Integer, String> receivers = new HashMap<Integer, String>();
+			Integer userId = (Integer) mapper.getKey();
+			receivers.put(userId, userId + "");
+
+			sysMessageService.batchSendMessage(MessageSender.JIGUANG, MessageTypeEnum.TEACHER_PUSH_JOB_WAIT_REPLY, receivers, null, 0, "", mapper.getValue());
+		}
+	}
 }

+ 8 - 23
mec-biz/src/main/java/com/ym/mec/biz/service/impl/CourseScheduleServiceImpl.java

@@ -744,21 +744,6 @@ public class CourseScheduleServiceImpl extends BaseServiceImpl<Long, CourseSched
 	}
 
 	@Override
-	public boolean pushNoSignInMessage() {
-		Integer minutes = Integer.parseInt(sysConfigDao.findConfigValue(SysConfigService.SIGN_OUT_MESSAGE_PUSH_MINUTE));
-
-		List<CourseSchedule> list = courseScheduleDao.queryNoSignInListByBeforeMinutes(minutes);
-
-		Map<Integer, String> receivers = new HashMap<Integer, String>();
-		for (CourseSchedule sf : list) {
-			receivers.put(sf.getTeacherId(), sf.getTeacherId() + "");
-		}
-
-		sysMessageService.batchSendMessage(MessageSender.JIGUANG, MessageTypeEnum.TEACHER_PUSH_SIGN_IN_MESSAGE, receivers, null, 0, "");
-		return true;
-	}
-
-	@Override
 	public PageInfo queryTeacherClassCourseSchedule(CourseScheduleQueryInfo queryInfo) {
 		SysUser user = sysUserFeignService.queryUserInfo();
 		if(null==user){
@@ -788,14 +773,14 @@ public class CourseScheduleServiceImpl extends BaseServiceImpl<Long, CourseSched
 				dataList = courseScheduleDao.queryTeacherClassCourseSchedule(params);
 			}else{
 				dataList = courseScheduleDao.queryTeacherHistoryClassCourseSchedule(params);
-				List<Integer> courseIds = dataList.stream().map(teacherClassCourseSchudeleDto -> teacherClassCourseSchudeleDto.getCourseScheduleId().intValue()).collect(Collectors.toList());
-				List<Map<Integer, Integer>> currentClassTimesByCourses = studentAttendanceDao.getCurrentClassTimesByCourses(courseIds);
-				if(!CollectionUtils.isEmpty(currentClassTimesByCourses)){
-					Map<Integer, Integer> currentClassTimesWithCourse = MapUtil.convertMybatisMap(currentClassTimesByCourses);
-					dataList.forEach(e->{
-						e.setCurrentClassTimes(currentClassTimesWithCourse.get(e.getCourseScheduleId()));
-					});
-				}
+			}
+			List<Integer> courseIds = dataList.stream().map(teacherClassCourseSchudeleDto -> teacherClassCourseSchudeleDto.getCourseScheduleId().intValue()).collect(Collectors.toList());
+			List<Map<Integer, Integer>> currentClassTimesByCourses = studentAttendanceDao.getCurrentClassTimesByCourses(courseIds);
+			if(!CollectionUtils.isEmpty(currentClassTimesByCourses)){
+				Map<Integer, Integer> currentClassTimesWithCourse = MapUtil.convertMybatisMap(currentClassTimesByCourses);
+				dataList.forEach(e->{
+					e.setCurrentClassTimes(currentClassTimesWithCourse.get(e.getCourseScheduleId()));
+				});
 			}
 		}
 		if (count == 0) {

+ 8 - 6
mec-biz/src/main/java/com/ym/mec/biz/service/impl/DemoGroupServiceImpl.java

@@ -260,17 +260,19 @@ public class DemoGroupServiceImpl extends BaseServiceImpl<Long, DemoGroup>  impl
 	}
 
 	@Override
-	public Map<String,Object> findByTeacherId(Integer teacherId) {
+	public Map<String,Object> findByTeacherId(Integer teacherId,Date startTime,Date endTime) {
 		Date now=new Date();
-		//下周一日期
-		Date nextMonday= DateUtil.getNextWeekMonday(now);
-		//下周日日期
-		Date nextSunday=DateUtil.getNextWeekSunday(now);
+		if(Objects.isNull(startTime)||Objects.isNull(endTime)){
+			//下周一日期
+			startTime= DateUtil.getNextWeekMonday(now);
+			//下周日日期
+			endTime=DateUtil.getNextWeekSunday(now);
+		}
 
 		Map<String,Object> result=new HashMap<>();
 
 		//当前教师下周的试听课计划
-		List<DemoGroupCoursesPlan> nextWeekDemoGroupCoursePlan = demoGroupCoursesPlanDao.findByDateZone(nextMonday, nextSunday, teacherId);
+		List<DemoGroupCoursesPlan> nextWeekDemoGroupCoursePlan = demoGroupCoursesPlanDao.findByDateZone(startTime, endTime, teacherId);
 		if(CollectionUtils.isEmpty(nextWeekDemoGroupCoursePlan)){
 			result.put("baseInfo",new Object());
 			result.put("list",new ArrayList<>());

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

@@ -109,6 +109,7 @@ public class StudentAttendanceServiceImpl extends BaseServiceImpl<Long, StudentA
 		Map<StudentAttendanceStatusEnum, List<StudentAttendance>> studentAttendanceGroupByStatus = studentAttendances.stream().collect(Collectors.groupingBy(StudentAttendance::getStatus));
 		Integer studentNum=studentAttendanceGroupByStatus.get(StudentAttendanceStatusEnum.NORMAL)==null?0:studentAttendanceGroupByStatus.get(StudentAttendanceStatusEnum.NORMAL).size();
 		Integer leaveStudentNum=studentAttendanceGroupByStatus.get(StudentAttendanceStatusEnum.LEAVE)==null?0:studentAttendanceGroupByStatus.get(StudentAttendanceStatusEnum.LEAVE).size();
+		courseSchedule.setStatus(CourseStatusEnum.UNDERWAY);
 		courseSchedule.setStudentNum(studentNum);
 		courseSchedule.setLeaveStudentNum(leaveStudentNum);
 		courseScheduleDao.update(courseSchedule);

+ 3 - 6
mec-biz/src/main/java/com/ym/mec/biz/service/impl/SubjectServiceImpl.java

@@ -1,6 +1,5 @@
 package com.ym.mec.biz.service.impl;
 
-import com.ym.mec.auth.api.client.SysUserFeignService;
 import com.ym.mec.biz.dal.dao.StudentRegistrationDao;
 import com.ym.mec.biz.dal.dao.SubjectDao;
 import com.ym.mec.biz.dal.dao.SubjectGoodsMapperDao;
@@ -32,8 +31,6 @@ public class SubjectServiceImpl extends BaseServiceImpl<Integer, Subject>  imple
     private StudentRegistrationDao studentRegistrationDao;
     @Autowired
     private SubjectGoodsMapperDao subjectGoodsMapperDao;
-    @Autowired
-    private SysUserFeignService sysUserFeignService;
 
     @Override
     public BaseDAO<Integer, Subject> getDAO() {
@@ -140,8 +137,8 @@ public class SubjectServiceImpl extends BaseServiceImpl<Integer, Subject>  imple
     }
 
     @Override
-    public List<Subject> findTeacherSubjects() {
-        return subjectDao.findTeacherSubjects(sysUserFeignService.queryUserInfo().getId().longValue());
+    public List<Subject> findTeacherSubjects(Integer userId) {
+        return subjectDao.findTeacherSubjects(userId);
     }
 
     @Override
@@ -172,4 +169,4 @@ public class SubjectServiceImpl extends BaseServiceImpl<Integer, Subject>  imple
     public List<Subject> findBySubjectByIdList(List<Integer> subjectIdList) {
         return subjectDao.findBySubjectByIdList(StringUtils.join(subjectIdList,","));
     }
-}
+}

+ 58 - 14
mec-biz/src/main/java/com/ym/mec/biz/service/impl/TeacherAttendanceServiceImpl.java

@@ -3,17 +3,12 @@ package com.ym.mec.biz.service.impl;
 import com.ym.mec.auth.api.client.SysUserFeignService;
 import com.ym.mec.auth.api.entity.SysUser;
 import com.ym.mec.biz.dal.dao.*;
-import com.ym.mec.biz.dal.dto.TeacherAbnormalAttendanceInfoDto;
-import com.ym.mec.biz.dal.dto.TeacherAttendanceDto;
-import com.ym.mec.biz.dal.dto.TeacherPersonalAttendanceDto;
-import com.ym.mec.biz.dal.dto.TeacherSignOutDto;
+import com.ym.mec.biz.dal.dto.*;
+import com.ym.mec.biz.dal.entity.ClassGroup;
 import com.ym.mec.biz.dal.entity.CourseHomework;
 import com.ym.mec.biz.dal.entity.StudentCourseHomework;
 import com.ym.mec.biz.dal.entity.TeacherAttendance;
-import com.ym.mec.biz.dal.enums.MessageTypeEnum;
-import com.ym.mec.biz.dal.enums.ParamEnum;
-import com.ym.mec.biz.dal.enums.SignStatusEnum;
-import com.ym.mec.biz.dal.enums.YesOrNoEnum;
+import com.ym.mec.biz.dal.enums.*;
 import com.ym.mec.biz.dal.page.TeacherCloseQueryInfo;
 import com.ym.mec.biz.service.*;
 import com.ym.mec.common.dal.BaseDAO;
@@ -51,6 +46,8 @@ public class TeacherAttendanceServiceImpl extends BaseServiceImpl<Long, TeacherA
 	private SysConfigDao sysConfigDao;
 	@Autowired
 	private SysMessageService sysMessageService;
+	@Autowired
+	private ClassGroupDao classGroupDao;
 
 	@Override
 	public BaseDAO<Long, TeacherAttendance> getDAO() {
@@ -159,6 +156,52 @@ public class TeacherAttendanceServiceImpl extends BaseServiceImpl<Long, TeacherA
 	}
 
 	@Override
+	public void addTeacherAttendanceRecord(Integer courseScheduleId, Integer userId, SignStatusEnum signStatus, boolean updateCourseScheduleStatus) {
+		TeacherAttendance teacherAttendance=teacherAttendanceDao.findByTeacherAttendanceInfo(userId.longValue(),courseScheduleId.longValue());
+		ClassGroup classGroup = classGroupDao.findByCourseSchedule(courseScheduleId);
+		boolean isAttendance=false;
+		Date now=new Date();
+
+		if(Objects.isNull(teacherAttendance)){
+			teacherAttendance=new TeacherAttendance();
+			teacherAttendance.setTeacherId(userId);
+			teacherAttendance.setClassGroupId(classGroup.getId());
+			teacherAttendance.setMusicGroupId(classGroup.getMusicGroupId());
+			teacherAttendance.setCourseScheduleId(courseScheduleId.longValue());
+		}else{
+			isAttendance=true;
+		}
+		switch (signStatus){
+			case SIGN_IN:
+				teacherAttendance.setSignInTime(now);
+				teacherAttendance.setSignInStatus(YesOrNoEnum.YES);
+				int currentClassTimes = teacherAttendanceDao.countClassTime(classGroup.getId().longValue());
+				classGroup.setCurrentClassTimes(currentClassTimes);
+				if(updateCourseScheduleStatus){
+					courseScheduleDao.updateCourscheduleStatus(courseScheduleId,CourseStatusEnum.UNDERWAY.getCode());
+				}
+				break;
+			case SIGN_OUT:
+				teacherAttendance.setSignOutTime(now);
+				teacherAttendance.setSignOutStatus(YesOrNoEnum.YES);
+				if(updateCourseScheduleStatus){
+					courseScheduleDao.updateCourscheduleStatus(courseScheduleId,CourseStatusEnum.OVER.getCode());
+				}
+				break;
+			default:
+
+				break;
+		}
+		if(isAttendance){
+			if(SignStatusEnum.SIGN_OUT.equals(signStatus)){
+				teacherAttendanceDao.update(teacherAttendance);
+			}
+		}else{
+			teacherAttendanceDao.insert(teacherAttendance);
+		}
+	}
+
+	@Override
 	public PageInfo getTeacherPersonalAttendances(TeacherCloseQueryInfo queryInfo) {
 		PageInfo<TeacherPersonalAttendanceDto> pageInfo = new PageInfo<>(queryInfo.getPage(), queryInfo.getRows());
 		Map<String, Object> params = new HashMap<String, Object>();
@@ -183,14 +226,15 @@ public class TeacherAttendanceServiceImpl extends BaseServiceImpl<Long, TeacherA
 		
 		Integer minutes = Integer.parseInt(sysConfigDao.findConfigValue(SysConfigService.SIGN_OUT_MESSAGE_PUSH_MINUTE));;
 
-		List<TeacherAttendance> list = teacherAttendanceDao.queryNoSignOutListByOverMinutes(minutes);
+		List<Mapper> list = teacherAttendanceDao.queryNoSignOutListByOverMinutes(minutes);
 
-		Map<Integer, String> receivers = new HashMap<Integer, String>();
-		for (TeacherAttendance sf : list) {
-			receivers.put(sf.getTeacherId(), sf.getTeacherId() + "");
-		}
+		for (Mapper mapper : list) {
+			Map<Integer, String> receivers = new HashMap<Integer, String>();
+			Integer userId = (Integer) mapper.getKey();
+			receivers.put(userId, userId + "");
 
-		sysMessageService.batchSendMessage(MessageSender.JIGUANG, MessageTypeEnum.TEACHER_PUSH_SIGN_OUT_MESSAGE, receivers, null, 0, "");
+			sysMessageService.batchSendMessage(MessageSender.JIGUANG, MessageTypeEnum.TEACHER_PUSH_SIGN_OUT_MESSAGE, receivers, null, 0,"", mapper.getValue());
+		}
 		return true;
 	}
 

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

@@ -11,7 +11,6 @@ import com.ym.mec.biz.dal.page.MusicGroupTeacherAttendanceQueryInfo;
 import com.ym.mec.biz.dal.page.TeacherCloseQueryInfo;
 import com.ym.mec.biz.dal.page.TeacherQueryInfo;
 import com.ym.mec.biz.dal.page.queryMusicGroupStudentQueryInfo;
-import com.ym.mec.biz.service.ContractService;
 import com.ym.mec.biz.service.TeacherService;
 import com.ym.mec.common.dal.BaseDAO;
 import com.ym.mec.common.entity.ImGroupModel;
@@ -202,6 +201,11 @@ public class TeacherServiceImpl extends BaseServiceImpl<Integer, Teacher>  imple
     }
 
 	@Override
+	public List<Teacher> findOrganTeacherBySubject(Integer organId, Integer subjectId) {
+		return teacherDao.findOrganTeacherBySubject(organId,subjectId);
+	}
+
+	@Override
 	public PageInfo<TeacherCloseDto> queryCloses(TeacherCloseQueryInfo queryInfo) {
 		PageInfo<TeacherCloseDto> pageInfo = new PageInfo<>(queryInfo.getPage(), queryInfo.getRows());
 		Map<String, Object> params = new HashMap<>();
@@ -359,4 +363,4 @@ public class TeacherServiceImpl extends BaseServiceImpl<Integer, Teacher>  imple
 		return teacher;
 	}
 
-}
+}

+ 43 - 42
mec-biz/src/main/java/com/ym/mec/biz/service/impl/VipGroupServiceImpl.java

@@ -729,20 +729,21 @@ public class VipGroupServiceImpl extends BaseServiceImpl<Long, VipGroup> impleme
 			throw new BizException("该课程已结束报名!");
 		}
 
-		StudentPaymentOrder byStudentVipGroup = studentPaymentOrderDao.findByStudentVipGroup(vipGroupBuyParams.getVipGroupId(), user.getId());
+		StudentPaymentOrder successOrder = studentPaymentOrderDao.findByStudentVipGroup(vipGroupBuyParams.getVipGroupId(),
+				user.getId(),
+				DealStatusEnum.SUCCESS.getMsg());
 
-		if(Objects.nonNull(byStudentVipGroup)){
+		if(Objects.nonNull(successOrder)){
+			throw new BizException("您已购买过此课程");
+		}
 
-			//生成回调地址
-			Map payMap = payService.getPayMap(
-					vipGroup.getTotalPrice(),
-					byStudentVipGroup.getOrderNo(),
-					"https://47.99.212.176:8000/api-student/studentOrder/notify",
-					"http://mstudev.dayaedu.com/#/paymentResult",
-					"vip课购买",
-					vipGroup.getName());
+		StudentPaymentOrder byStudentVipGroup = studentPaymentOrderDao.findByStudentVipGroup(vipGroupBuyParams.getVipGroupId(),
+				user.getId(),
+				DealStatusEnum.ING.getMsg());
 
-			return payMap;
+		if(Objects.nonNull(byStudentVipGroup)){
+			byStudentVipGroup.setStatus(DealStatusEnum.CLOSE);
+			studentPaymentOrderDao.update(byStudentVipGroup);
 		}
 
 		VipGroupClassGroupMapper vipGroupClassGroupMapper = vipGroupClassGroupMapperDao.findByVipGroupId(vipGroup.getId());
@@ -791,8 +792,8 @@ public class VipGroupServiceImpl extends BaseServiceImpl<Long, VipGroup> impleme
 		Map payMap = payService.getPayMap(
 				vipGroup.getTotalPrice(),
 				orderNo,
-				"https://dyme.utools.club/api-student/studentOrder/notify",
-				"https://dyme.utools.club/paymentresult",
+				"http://mstudev.dayaedu.com/api-student/studentOrder/notify",
+				"http://mstudev.dayaedu.com/#/paymentresult?orderNo="+orderNo,
 				"vip课购买",
 				vipGroup.getName());
 		//将学员加入vip班级群组
@@ -872,7 +873,7 @@ public class VipGroupServiceImpl extends BaseServiceImpl<Long, VipGroup> impleme
 	public void applyRefund(Long vipGroupId,Integer studentId) {
 
 		StudentApplyRefunds studentApplyRefunds=new StudentApplyRefunds();
-		StudentPaymentOrder studentPaymentOrder = studentPaymentOrderDao.findByStudentVipGroup(vipGroupId,studentId);
+		StudentPaymentOrder studentPaymentOrder = studentPaymentOrderDao.findByStudentVipGroup(vipGroupId,studentId,DealStatusEnum.SUCCESS.getMsg());
 		if(null==studentPaymentOrder){
 			throw new BizException("未找到相关订单信息!");
 		}
@@ -891,9 +892,6 @@ public class VipGroupServiceImpl extends BaseServiceImpl<Long, VipGroup> impleme
 		studentApplyRefunds.setOrigPaymentOrderId(studentPaymentOrder.getId());
 		studentApplyRefunds.setUserId(studentId.intValue());
 		studentApplyRefundsDao.insert(studentApplyRefunds);
-		//学员退出班级群
-//		ImGroupMember[] imGroupMembers = new ImGroupMember[]{new ImGroupMember(studentId.toString())};
-//		imFeignService.groupJoin(new ImGroupModel(classGroup.getId().toString(), imGroupMembers, classGroup.getName()));
 	}
 
 	@Transactional(rollbackFor = Exception.class)
@@ -919,30 +917,33 @@ public class VipGroupServiceImpl extends BaseServiceImpl<Long, VipGroup> impleme
 		studentApplyRefunds.setRemark(remark);
 		studentApplyRefundsDao.update(studentApplyRefunds);
 		switch (studentApplyRefunds.getStatus()) {
-		case PASS:
-			sysUserCashAccountService.updateBalance(studentApplyRefunds.getUserId(), studentApplyRefunds.getActualAmount());
-			SysUserCashAccount sysUserCashAccount = sysUserCashAccountService.get(studentApplyRefunds.getUserId().intValue());
-			SysUserCashAccountDetail sysUserCashAccountDetail = new SysUserCashAccountDetail();
-			sysUserCashAccountDetail.setUserId(studentApplyRefunds.getUserId());
-			sysUserCashAccountDetail.setType(PlatformCashAccountDetailTypeEnum.REFUNDS);
-			sysUserCashAccountDetail.setStatus(DealStatusEnum.SUCCESS);
-			sysUserCashAccountDetail.setAmount(amount);
-			sysUserCashAccountDetail.setBalance(sysUserCashAccount.getBalance());
-			sysUserCashAccountDetail.setAttribute(studentApplyRefunds.getId().toString());
-			sysUserCashAccountDetailDao.insert(sysUserCashAccountDetail);
-
-			ClassGroupStudentMapper classStudentMapperByUserIdAndClassGroupId = classGroupStudentMapperDao.findClassStudentMapperByUserIdAndClassGroupId(studentPaymentOrder.getUserId(),
-					studentPaymentOrder.getClassGroupId());
-
-			classStudentMapperByUserIdAndClassGroupId.setStatus(ClassGroupStudentStatusEnum.LEAVE);
-			classGroupStudentMapperDao.update(classStudentMapperByUserIdAndClassGroupId);
-
-			break;
-		case REJECT:
-
-			break;
-		default:
-			throw new BizException("审核状态错误!");
+			case PASS:
+				sysUserCashAccountService.updateBalance(studentApplyRefunds.getUserId(), studentApplyRefunds.getActualAmount());
+				SysUserCashAccount sysUserCashAccount = sysUserCashAccountService.get(studentApplyRefunds.getUserId().intValue());
+				SysUserCashAccountDetail sysUserCashAccountDetail = new SysUserCashAccountDetail();
+				sysUserCashAccountDetail.setUserId(studentApplyRefunds.getUserId());
+				sysUserCashAccountDetail.setType(PlatformCashAccountDetailTypeEnum.REFUNDS);
+				sysUserCashAccountDetail.setStatus(DealStatusEnum.SUCCESS);
+				sysUserCashAccountDetail.setAmount(amount);
+				sysUserCashAccountDetail.setBalance(sysUserCashAccount.getBalance());
+				sysUserCashAccountDetail.setAttribute(studentApplyRefunds.getId().toString());
+				sysUserCashAccountDetailDao.insert(sysUserCashAccountDetail);
+
+				ClassGroupStudentMapper classStudentMapperByUserIdAndClassGroupId = classGroupStudentMapperDao.findClassStudentMapperByUserIdAndClassGroupId(studentPaymentOrder.getUserId(),
+						studentPaymentOrder.getClassGroupId());
+
+				classStudentMapperByUserIdAndClassGroupId.setStatus(ClassGroupStudentStatusEnum.LEAVE);
+				classGroupStudentMapperDao.update(classStudentMapperByUserIdAndClassGroupId);
+
+				//学员退出班级群
+				ImGroupMember[] imGroupMembers = new ImGroupMember[]{new ImGroupMember(studentApplyRefunds.getUserId().toString())};
+				imFeignService.groupJoin(new ImGroupModel(studentPaymentOrder.getClassGroupId().toString(), imGroupMembers, null));
+				break;
+			case REJECT:
+
+				break;
+			default:
+				throw new BizException("审核状态错误!");
 		}
 	}
 
@@ -1034,7 +1035,7 @@ public class VipGroupServiceImpl extends BaseServiceImpl<Long, VipGroup> impleme
 		}
 		Map<Integer, BigDecimal> studentSurplusClassFees = MapUtil.convertMybatisMap(maps);
     	for(Integer userId:studentSurplusClassFees.keySet()){
-			StudentPaymentOrder studentPaymentOrder = studentPaymentOrderDao.findByStudentVipGroup(vipGroupId,userId);
+			StudentPaymentOrder studentPaymentOrder = studentPaymentOrderDao.findByStudentVipGroup(vipGroupId,userId,DealStatusEnum.SUCCESS.getMsg());
 			if(null==studentPaymentOrder){
 				throw new BizException("未找到相关订单信息!");
 			}

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

@@ -254,7 +254,7 @@
         </where>
     </select>
     <select id="findVipStuNames" resultType="map">
-        SELECT cg.music_group_id_ 'key',GROUP_CONCAT(su.real_name_) 'value'
+        SELECT cg.music_group_id_ 'key',GROUP_CONCAT(su.username_) 'value'
         FROM class_group cg
         LEFT JOIN class_group_student_mapper cgsm ON cg.id_ = cgsm.class_group_id_
         LEFT JOIN sys_user su ON cgsm.user_id_ = su.id_
@@ -612,7 +612,7 @@
         <result column="payment_status_" property="paymentStatus" typeHandler="com.ym.mec.common.dal.CustomEnumTypeHandler"/>
     </resultMap>
     <select id="queryStudentVipCourses" resultMap="CourseListDto">
-        SELECT cg.id_ class_group_id_,vg.name_ music_group_name_,su.real_name_,
+        SELECT cg.id_ class_group_id_,vg.name_ music_group_name_,su.username_,
         cg.current_class_times_,cg.total_class_times_,vg.single_class_minutes_,
         IF(vg.online_classes_num_ IS NULL,0,vg.online_classes_num_) online_classes_num_,
         IF(vg.offline_classes_num_ IS NULL,0,vg.offline_classes_num_) offline_classes_num_,
@@ -671,4 +671,12 @@
                 #{classGroupId}
             </foreach>
     </select>
+    <select id="findByCourseSchedule" resultMap="ClassGroup">
+        SELECT
+            cg.*
+        FROM
+            course_schedule cs
+            LEFT JOIN class_group cg ON cs.class_group_id_=cg.id_
+        WHERE cs.id_=#{courseScheduleId}
+    </select>
 </mapper>

+ 9 - 0
mec-biz/src/main/resources/config/mybatis/CourseHomeworkMapper.xml

@@ -37,6 +37,11 @@
 		<result column="status_" property="status" typeHandler="com.ym.mec.common.dal.CustomEnumTypeHandler"/>
 		<result column="is_replied_" property="isReplied" typeHandler="com.ym.mec.common.dal.CustomEnumTypeHandler"/>
 	</resultMap>
+    
+    <resultMap type="com.ym.mec.biz.dal.dto.Mapper" id="Mapper">
+    	<result column="key_" property="key"/>
+    	<result column="value_" property="value"/>
+    </resultMap>
 	
 	<!-- 根据主键查询一条记录 -->
 	<select id="get" resultMap="CourseHomework" >
@@ -205,4 +210,8 @@
 			LEFT JOIN course_schedule_teacher_salary csts ON ch.course_schedule_id_=csts.course_schedule_id_
 			WHERE ch.id_=#{courseHomeworkId} AND csts.user_id_=#{userId}
 	</select>
+	
+	<select id="queryTeacerNoReplyNum" resultMap="Mapper">
+		select cs.actual_teacher_id_ key_,count(1) value_ from student_course_homework sch left join course_schedule cs on sch.course_schedule_id_ = cs.id_ where csh.is_replied_ = 0 group by cs.actual_teacher_id_
+	</select>
 </mapper>

+ 50 - 53
mec-biz/src/main/resources/config/mybatis/CourseScheduleMapper.xml

@@ -811,49 +811,49 @@
     
     <update id="batchUpdate" parameterType="java.util.List">
     	<foreach collection="list" item="item" index="index" open="" close="" separator=";">
-        UPDATE course_schedule
-        <set>
-            <if test="item.classDate != null">
-                class_date_ = #{item.classDate},
-            </if>
-            <if test="item.endClassTime != null">
-                end_class_time_ = #{item.endClassTime},
-            </if>
-            <if test="item.status != null">
-                status_ = #{item.status,typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler},
-            </if>
-            <if test="item.type != null">
-                type_ = #{item.type,typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler},
-            </if>
-            <if test="item.actualTeacherId != null">
-                actual_teacher_id_ = #{item.actualTeacherId},
-            </if>
-            <if test="item.subsidy != null">
-                subsidy_ = #{item.subsidy},
-            </if>
-            <if test="item.classGroupId != null">
-                class_group_id_ = #{item.classGroupId},
-            </if>
-            <if test="item.startClassTime != null">
-                start_class_time_ = #{item.startClassTime},
-            </if>
-            <if test="item.teacherId != null">
-                teacher_id_ = #{item.teacherId},
-            </if>
-            <if test="item.updateTime != null">
-                update_time_ = #{item.updateTime},
-            </if>
-            <if test="item.studentNum != null">
-                student_num_ = #{item.studentNum},
-            </if>
-            <if test="item.leaveStudentNum != null">
-                leave_student_num_ = #{item.leaveStudentNum},
-            </if>
-            <if test="item.schoolId != null">
-                school_id_ = #{item.choolId},
-            </if>
-        </set>
-        WHERE id_ = #{item.id}
+            UPDATE course_schedule
+            <set>
+                <if test="item.classDate != null">
+                    class_date_ = #{item.classDate},
+                </if>
+                <if test="item.endClassTime != null">
+                    end_class_time_ = #{item.endClassTime},
+                </if>
+                <if test="item.status != null">
+                    status_ = #{item.status,typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler},
+                </if>
+                <if test="item.type != null">
+                    type_ = #{item.type,typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler},
+                </if>
+                <if test="item.actualTeacherId != null">
+                    actual_teacher_id_ = #{item.actualTeacherId},
+                </if>
+                <if test="item.subsidy != null">
+                    subsidy_ = #{item.subsidy},
+                </if>
+                <if test="item.classGroupId != null">
+                    class_group_id_ = #{item.classGroupId},
+                </if>
+                <if test="item.startClassTime != null">
+                    start_class_time_ = #{item.startClassTime},
+                </if>
+                <if test="item.teacherId != null">
+                    teacher_id_ = #{item.teacherId},
+                </if>
+                <if test="item.updateTime != null">
+                    update_time_ = #{item.updateTime},
+                </if>
+                <if test="item.studentNum != null">
+                    student_num_ = #{item.studentNum},
+                </if>
+                <if test="item.leaveStudentNum != null">
+                    leave_student_num_ = #{item.leaveStudentNum},
+                </if>
+                <if test="item.schoolId != null">
+                    school_id_ = #{item.choolId},
+                </if>
+            </set>
+            WHERE id_ = #{item.id}
         </foreach>
     </update>
     <update id="updateByMusicGroupId">
@@ -861,6 +861,11 @@
         WHERE cs.class_group_id_ IN (SELECT cg.id_ FROM class_group cg WHERE cg.music_group_id_ = #{musicGroupId})
     </update>
 
+    <update id="updateCourscheduleStatus">
+        UPDATE course_schedule SET status_ = #{status}
+        WHERE id_=#{courseScheduleId}
+    </update>
+
     <select id="queryNoSignInListByBeforeMinutes" resultMap="CourseSchedule">
         SELECT cs.* FROM course_schedule cs left join teacher_attendance ta on ta.course_schedule_id_ = cs.id_ WHERE ta.sign_in_time_ is null and SUBTIME(start_class_time_, CONCAT(#{minutes},'00')) &lt; CURRENT_TIME()
     </select>
@@ -915,7 +920,7 @@
             LEFT JOIN class_group cg ON  cs.class_group_id_=cg.id_
             LEFT JOIN sys_user su ON cs.actual_teacher_id_ = su.id_
         <include refid="teacherClassCourseScheduleQueryCondition"/>
-        ORDER BY cs.id_
+        ORDER BY start_class_time_
         <include refid="global.limit"/>
     </select>
 
@@ -1099,17 +1104,9 @@
     	select cssp.user_id_ key_,count(1) value_ from course_schedule cs right join course_schedule_student_payment cssp on cs.id_ = cssp.course_schedule_id_ where class_date_ = date(DATE_ADD(now(),INTERVAL 1 DAY)) group by cssp.user_id_
     </select>
     
-    <select id="queryStudentNotStartCourseScheduleIn90Mins" resultMap="Mapper">
+    <select id="queryNotStartCourseScheduleIn90Mins" resultMap="Mapper">
     	select cssp.user_id_ key_,cs.name_ value_ from course_schedule cs right join course_schedule_student_payment cssp on cs.id_ = cssp.course_schedule_id_ where CONCAT( cs.class_date_, ' ', cs.start_class_time_ ) &lt; DATE_ADD(now(),INTERVAL 90 MINUTE) and cs.status_ = 'NOT_START'
     </select>
-    
-    <select id="queryTeacherCoursesTimesOfTomorrow" resultMap="Mapper">
-    	select csts.user_id_ key_,u.real_name_ value_ from course_schedule cs right join course_schedule_teacher_salary csts on cs.id_ = csts.course_schedule_id_ left join sys_user u on csts.user_id_ = u.id_ where class_date_ = date(DATE_ADD(now(),INTERVAL 1 DAY)) group by csts.user_id_
-    </select>
-    
-    <select id="queryTeacherNotStartCourseScheduleIn30Mins" resultMap="Mapper">
-    	select csts.user_id_ key_,cs.name_ value_ from course_schedule cs right join course_schedule_teacher_salary csts on cs.id_ = csts.course_schedule_id_ where CONCAT( cs.class_date_, ' ', cs.start_class_time_ ) &lt; DATE_ADD(now(),INTERVAL 30 MINUTE) and cs.status_ = 'NOT_START'
-    </select>
 
     <resultMap id="IntegerAndIntegerListDto" type="com.ym.mec.biz.dal.dto.IntegerAndIntegerListDto">
         <result property="id" column="id_"/>

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

@@ -192,7 +192,10 @@
         FROM
         student_vip_group_payment svgp
         LEFT JOIN student_payment_order spo ON svgp.student_payment_order_id_=spo.id_
-        WHERE svgp.user_id_=#{userId} AND svgp.vip_group_id_=#{vipGroupId} AND spo.status_='ING' and spo.type_ = 'SMALL_CLASS_TO_BUY'
+        WHERE svgp.user_id_=#{userId}
+        AND svgp.vip_group_id_=#{vipGroupId}
+        AND spo.status_=#{status}
+        and spo.type_ = 'SMALL_CLASS_TO_BUY'
     </select>
     <!-- 查询报名订单 -->
     <select id="findMusicGroupApplyOrderByStatus" resultMap="StudentPaymentOrder">

+ 8 - 0
mec-biz/src/main/resources/config/mybatis/TeacherAttendanceMapper.xml

@@ -19,6 +19,11 @@
         <result column="remark_" property="remark"/>
         <result column="create_time_" property="createTime"/>
     </resultMap>
+    
+    <resultMap type="com.ym.mec.biz.dal.dto.Mapper" id="Mapper">
+    	<result column="key_" property="key"/>
+    	<result column="value_" property="value"/>
+    </resultMap>
 
     <!-- 根据主键查询一条记录 -->
     <select id="get" resultMap="TeacherAttendance">
@@ -227,4 +232,7 @@
         </if>
     </select>
 
+    <select id="queryNoSignOutListByOverMinutes" resultMap="Mapper">
+        SELECT ta.teacher_id_ key_,u.real_name_ value_ FROM course_schedule cs right join teacher_attendance ta on ta.course_schedule_id_ = cs.id_ left join sys_user u on ta.teacher_id_ = u.id_ WHERE ta.sign_out_status_ = 0 and date(cs.class_date_) = date(now()) and SUBTIME(cs.end_class_time_, CONCAT(#{minutes},'00')) &lt; CURRENT_TIME()
+    </select>
 </mapper>

+ 10 - 0
mec-biz/src/main/resources/config/mybatis/TeacherMapper.xml

@@ -454,6 +454,16 @@
         </if>
         GROUP BY t.id_
     </select>
+    <select id="findOrganTeacherBySubject" resultType="com.ym.mec.biz.dal.entity.Teacher">
+        SELECT su.* FROM teacher t
+        LEFT JOIN sys_user su on t.id_ = su.id_ WHERE 1=1
+        <if test="organId != null">
+            AND t.organ_id_ = #{organId}
+        </if>
+        <if test="subjectId != null">
+            AND FIND_IN_SET(#{subjectId},t.subjectId)
+        </if>
+    </select>
 
     <sql id="queryCloses">
         <where>

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

@@ -270,7 +270,7 @@
             vg.status_!=3
             AND vg.audit_status_='PASS'
             AND vg.status_=1
-            AND (select count(1) as num from student_vip_group_payment where vg.id_ = vip_group_id_ AND user_id_=#{userId}) = 0
+            AND (select count(1) as num from student_payment_order where vg.id_ = music_group_id_ AND user_id_=#{userId} AND status_='SUCCESS') = 0
             <if test="subjectId!=null">
                AND FIND_IN_SET(#{subjectId},cg.subject_id_list_)
             </if>

+ 4 - 4
mec-client-api/src/main/java/com/ym/mec/task/TaskRemoteService.java

@@ -18,10 +18,6 @@ public interface TaskRemoteService {
 	@GetMapping(value = "task/updateCourseScheduleToOverStatus")
 	boolean updateCourseScheduleToOverStatus();
 
-	@GetMapping("task/pushNoSignInMessage")
-	// 推送未签到消息提醒
-	public void pushNoSignInMessage();
-
 	@GetMapping("task/pushNoSignOutMessage")
 	// 推送未签退消息提醒
 	public void pushNoSignOutMessage();
@@ -49,4 +45,8 @@ public interface TaskRemoteService {
 	@GetMapping("task/teacherSignInRemind")
 	// 老师上课提醒
 	public void teacherSignInRemind();
+
+	@GetMapping("task/homeworkNoReplyRemind")
+	// 老师未回复作业提醒
+	public void homeworkNoReplyRemind();
 }

+ 5 - 5
mec-client-api/src/main/java/com/ym/mec/task/fallback/TaskRemoteServiceFallback.java

@@ -28,11 +28,6 @@ public class TaskRemoteServiceFallback implements TaskRemoteService {
 	}
 
 	@Override
-	public void pushNoSignInMessage() {
-		logger.info("推送未签到消息提醒的服务调用失败");
-	}
-
-	@Override
 	public void pushNoSignOutMessage() {
 		logger.info("推送未签退消息提醒的服务调用失败");
 	}
@@ -67,4 +62,9 @@ public class TaskRemoteServiceFallback implements TaskRemoteService {
 		logger.info("老师上课提醒的服务调用失败");
 	}
 
+	@Override
+	public void homeworkNoReplyRemind() {
+		logger.info("老师未回复作业提醒的服务调用失败");
+	}
+
 }

+ 2 - 2
mec-student/src/main/java/com/ym/mec/student/controller/MusicGroupController.java

@@ -240,8 +240,8 @@ public class MusicGroupController extends BaseController {
         Map payMap = payService.getPayMap(
                 orderAmount,
                 orderNo,
-                "http://47.99.212.176:8000/studentOrder/notify",
-                "http://mstudev.dayaedu.com/#/paymentResult",
+                "http://mstudev.dayaedu.com/api-student/studentOrder/notify",
+                "http://mstudev.dayaedu.com/#/paymentresult?orderNo="+orderNo,
                 "测试订单",
                 "测试订单");
 

+ 21 - 5
mec-student/src/main/java/com/ym/mec/student/controller/StudentOrderController.java

@@ -7,20 +7,22 @@ import com.ym.mec.biz.service.MusicGroupService;
 import com.ym.mec.biz.service.StudentPaymentOrderService;
 import com.ym.mec.biz.service.StudentRegistrationService;
 import com.ym.mec.biz.service.VipGroupService;
+import com.ym.mec.common.controller.BaseController;
 import com.ym.mec.thirdparty.union.NotifyMsg;
 import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import org.apache.commons.lang.StringUtils;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.web.bind.annotation.ModelAttribute;
-import org.springframework.web.bind.annotation.PostMapping;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RestController;
+import org.springframework.web.bind.annotation.*;
+
+import java.util.Objects;
 
 @RequestMapping("studentOrder")
 @Api(tags = "订单回调")
 @RestController
-public class StudentOrderController {
+public class StudentOrderController extends BaseController {
     private static final Logger logger = LoggerFactory.getLogger(StudentOrderController.class);
     @Autowired
     private StudentPaymentOrderService studentPaymentOrderService;
@@ -75,4 +77,18 @@ public class StudentOrderController {
     }
 
 
+    @ApiOperation(value = "查询订单状态")
+    @GetMapping("/checkOrderStatus")
+    public Object checkOrderStatus(String orderNo){
+        if(StringUtils.isBlank(orderNo)){
+            return failed("请指定订单");
+        }
+        StudentPaymentOrder orderByOrderNo = studentPaymentOrderService.findOrderByOrderNo(orderNo);
+        if(Objects.isNull(orderByOrderNo)){
+            return failed("未找到指定订单");
+        }
+        return succeed(orderByOrderNo.getStatus());
+    }
+
+
 }

+ 2 - 2
mec-task/src/main/java/com/ym/mec/task/jobs/PushNoSignInMessage.java → mec-task/src/main/java/com/ym/mec/task/jobs/HomeworkNoReplyRemaindTask.java

@@ -6,13 +6,13 @@ import com.ym.mec.task.TaskRemoteService;
 import com.ym.mec.task.core.BaseTask;
 import com.ym.mec.task.core.TaskException;
 
-public class PushNoSignInMessage  extends BaseTask {
+public class HomeworkNoReplyRemaindTask extends BaseTask {
 
 	@Autowired
 	private TaskRemoteService taskRemoteService;
 
 	@Override
 	public void execute() throws TaskException {
-		taskRemoteService.pushNoSignInMessage();
+		taskRemoteService.homeworkNoReplyRemind();
 	}
 }

+ 3 - 2
mec-teacher/src/main/java/com/ym/mec/teacher/controller/DemoGroupController.java

@@ -13,6 +13,7 @@ import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.http.HttpStatus;
 import org.springframework.web.bind.annotation.*;
 
+import java.util.Date;
 import java.util.Objects;
 
 /**
@@ -58,12 +59,12 @@ public class DemoGroupController extends BaseController {
 
     @ApiOperation(value = "获取指定老师试听课")
     @GetMapping("/findByTeacherId")
-    public Object findByTeacherId(){
+    public Object findByTeacherId(Date startTime, Date endTime){
         SysUser user = sysUserFeignService.queryUserInfo();
         if(Objects.isNull(user)){
             return failed(HttpStatus.FORBIDDEN,"请登录");
         }
-        return succeed(demoGroupService.findByTeacherId(user.getId()));
+        return succeed(demoGroupService.findByTeacherId(user.getId(),startTime,endTime));
     }
 
 }

+ 0 - 15
mec-teacher/src/main/java/com/ym/mec/teacher/controller/TeacherController.java

@@ -8,7 +8,6 @@ import com.ym.mec.biz.dal.page.TeacherQueryInfo;
 import com.ym.mec.biz.dal.page.VipClassQueryInfo;
 import com.ym.mec.biz.dal.page.queryMusicGroupStudentQueryInfo;
 import com.ym.mec.biz.service.ClassGroupService;
-import com.ym.mec.biz.service.SchoolService;
 import com.ym.mec.biz.service.TeacherService;
 import com.ym.mec.common.controller.BaseController;
 import com.ym.mec.common.page.QueryInfo;
@@ -16,7 +15,6 @@ import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
 import io.swagger.annotations.ApiParam;
 import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.http.HttpStatus;
 import org.springframework.web.bind.annotation.GetMapping;
 import org.springframework.web.bind.annotation.PostMapping;
 import org.springframework.web.bind.annotation.RequestMapping;
@@ -37,9 +35,6 @@ public class TeacherController extends BaseController {
     @Autowired
     private SysUserFeignService sysUserFeignService;
 
-    @Autowired
-    private SchoolService schoolService;
-
     @ApiOperation(value = "修改教师个人中心信息")
     @PostMapping("/update")
     public Object update(Teacher teacher) {
@@ -118,16 +113,6 @@ public class TeacherController extends BaseController {
         return succeed(teacherService.findTeacherNoPay(teacherId));
     }
 
-    @ApiOperation(value = "获取教师vip课教学点")
-    @GetMapping("/findVipSchoolByTeacher")
-    public Object findVipSchoolByTeacher(){
-        SysUser sysUser = sysUserFeignService.queryUserInfo();
-        if(sysUser == null){
-            return failed(HttpStatus.FORBIDDEN,"请登录");
-        }
-        return succeed(schoolService.findVipSchoolByTeacher(sysUser.getId()));
-    }
-
     @ApiOperation(value = "获取乐团学院学员报名列表")
     @GetMapping("queryStudentApply")
     public Object queryMusicGroupStudentApply(queryMusicGroupStudentQueryInfo queryInfo) {

+ 71 - 0
mec-teacher/src/main/java/com/ym/mec/teacher/controller/TeacherSchoolController.java

@@ -0,0 +1,71 @@
+package com.ym.mec.teacher.controller;
+
+import com.ym.mec.auth.api.client.SysUserFeignService;
+import com.ym.mec.auth.api.entity.SysUser;
+import com.ym.mec.biz.dal.entity.School;
+import com.ym.mec.biz.service.SchoolService;
+import com.ym.mec.common.controller.BaseController;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import io.swagger.annotations.ApiParam;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.http.HttpStatus;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+import java.util.Date;
+
+/**
+ * @Author Joburgess
+ * @Date 2019/11/4
+ */
+
+@RequestMapping("school")
+@Api(tags = "教师教学点服务")
+@RestController
+public class TeacherSchoolController extends BaseController {
+
+    @Autowired
+    private SchoolService schoolService;
+    @Autowired
+    private SysUserFeignService sysUserFeignService;
+
+    @ApiOperation(value = "新增学校")
+    @PostMapping("/add")
+    public Object add(School school){
+        SysUser sysUser = sysUserFeignService.queryUserInfo();
+        if(sysUser == null){
+            return failed(HttpStatus.FORBIDDEN,"请登录");
+        }
+        school.setUserId(sysUser.getId());
+        schoolService.insert(school);
+        return succeed();
+    }
+
+    @ApiOperation(value = "删除学校")
+    @PostMapping("/del")
+    public Object del(@ApiParam(value = "学校编号", required = true) Integer id){
+        schoolService.delete(id);
+        return succeed();
+    }
+
+    @ApiOperation(value = "修改学校")
+    @PostMapping("/update")
+    public Object update(School school){
+        school.setUpdateTime(new Date());
+        schoolService.update(school);
+        return succeed();
+    }
+
+    @ApiOperation(value = "获取教师vip课教学点")
+    @GetMapping("/findVipSchoolByTeacher")
+    public Object findVipSchoolByTeacher(){
+        SysUser sysUser = sysUserFeignService.queryUserInfo();
+        if(sysUser == null){
+            return failed(HttpStatus.FORBIDDEN,"请登录");
+        }
+        return succeed(schoolService.findVipSchoolByTeacher(sysUser.getId()));
+    }
+}

+ 12 - 1
mec-teacher/src/main/java/com/ym/mec/teacher/controller/TeacherSubjectController.java

@@ -1,14 +1,19 @@
 package com.ym.mec.teacher.controller;
 
+import com.ym.mec.auth.api.client.SysUserFeignService;
+import com.ym.mec.auth.api.entity.SysUser;
 import com.ym.mec.biz.service.SubjectService;
 import com.ym.mec.common.controller.BaseController;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
 import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.http.HttpStatus;
 import org.springframework.web.bind.annotation.GetMapping;
 import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.RestController;
 
+import java.util.Objects;
+
 /**
  * @Author Joburgess
  * @Date 2019/9/26
@@ -20,11 +25,17 @@ public class TeacherSubjectController extends BaseController {
 
     @Autowired
     private SubjectService subjectService;
+    @Autowired
+    private SysUserFeignService sysUserFeignService;
 
     @ApiOperation(value = "获取教师所在科目列表")
     @GetMapping("/findTeacherSubjets")
     public Object findTeacherSubjets(){
-        return succeed(subjectService.findTeacherSubjects());
+        SysUser sysUser = sysUserFeignService.queryUserInfo();
+        if(Objects.isNull(sysUser)){
+            return failed(HttpStatus.FORBIDDEN,"请登录");
+        }
+        return succeed(subjectService.findTeacherSubjects(sysUser.getId()));
     }
 
     @ApiOperation(value = "获取子集科目列表")

+ 4 - 6
mec-teacher/src/main/java/com/ym/mec/teacher/controller/TeacherVipGroupController.java

@@ -4,18 +4,14 @@ import com.ym.mec.auth.api.client.SysUserFeignService;
 import com.ym.mec.auth.api.entity.SysUser;
 import com.ym.mec.biz.dal.dto.VipGroupApplyDto;
 import com.ym.mec.biz.dal.dto.VipGroupCostCountParamsDto;
+import com.ym.mec.biz.service.SchoolService;
 import com.ym.mec.biz.service.VipGroupService;
 import com.ym.mec.common.controller.BaseController;
-
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
-
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.http.HttpStatus;
-import org.springframework.web.bind.annotation.PostMapping;
-import org.springframework.web.bind.annotation.RequestBody;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RestController;
+import org.springframework.web.bind.annotation.*;
 
 import java.util.Objects;
 
@@ -33,6 +29,8 @@ public class TeacherVipGroupController extends BaseController {
 
 	@Autowired
 	private SysUserFeignService sysUserFeignService;
+	@Autowired
+	private SchoolService schoolService;
 
 	@ApiOperation("vip课申请")
 	@PostMapping("/vipGroupApply")

+ 1 - 1
mec-util/src/main/java/com/ym/mec/util/collection/MapUtil.java

@@ -116,4 +116,4 @@ public class MapUtil {
 		});
 		return result;
 	}
-}
+}

+ 10 - 6
mec-web/src/main/java/com/ym/mec/web/controller/TaskController.java

@@ -5,6 +5,7 @@ import org.springframework.web.bind.annotation.GetMapping;
 import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.RestController;
 
+import com.ym.mec.biz.service.CourseHomeworkService;
 import com.ym.mec.biz.service.CourseScheduleService;
 import com.ym.mec.biz.service.CourseScheduleTeacherSalaryService;
 import com.ym.mec.biz.service.MusicGroupStudentFeeService;
@@ -34,6 +35,9 @@ public class TaskController extends BaseController {
 
 	@Autowired
 	private StudentCourseHomeworkService studentCourseHomeworkService;
+	
+	@Autowired
+	private CourseHomeworkService courseHomeworkService;
 
 	@GetMapping("/refreshPaymentFeeStatus")
 	// 刷新付费状态
@@ -59,12 +63,6 @@ public class TaskController extends BaseController {
 		courseScheduleService.updateCourseScheduleToOverStatus();
 	}
 
-	@GetMapping("/pushNoSignInMessage")
-	// 推送未签到消息提醒
-	public void pushNoSignInMessage() {
-		courseScheduleService.pushNoSignInMessage();
-	}
-
 	@GetMapping("/pushNoSignOutMessage")
 	// 推送未签退消息提醒
 	public void pushNoSignOutMessage() {
@@ -101,4 +99,10 @@ public class TaskController extends BaseController {
 		courseScheduleService.teacherSignInRemind();
 	}
 
+	@GetMapping("/homeworkNoReplyRemind")
+	// 老师未回复作业提醒
+	public void homeworkNoReplyRemind() {
+		courseHomeworkService.homeworkNoReplyRemind();
+	}
+
 }

+ 8 - 0
mec-web/src/main/java/com/ym/mec/web/controller/TeacherController.java

@@ -73,6 +73,14 @@ public class TeacherController extends BaseController {
         return succeed(teacherService.findTeachers(organId));
     }
 
+    @ApiOperation(value = "根据科目获取部门下的教师")
+    @GetMapping("/findOrganTeacherBySubject")
+    @PreAuthorize("@pcs.hasPermissions('teacher/findOrganTeacherBySubject')")
+    public HttpResponseResult findOrganTeacherBySubject(Integer subjecId) {
+        Integer organId = sysUserFeignService.queryUserInfo().getOrganId();
+        return succeed(teacherService.findOrganTeacherBySubject(organId,subjecId));
+    }
+
     @ApiOperation(value = "获取乐团所有老师")
     @GetMapping("/findMusicGroupTeachers")
     @PreAuthorize("@pcs.hasPermissions('teacher/findMusicGroupTeachers')")