Procházet zdrojové kódy

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

zouxuan před 4 roky
rodič
revize
7e3be0149e
21 změnil soubory, kde provedl 196 přidání a 30 odebrání
  1. 1 1
      mec-biz/src/main/java/com/ym/mec/biz/dal/dao/MusicGroupPaymentCalenderDao.java
  2. 9 0
      mec-biz/src/main/java/com/ym/mec/biz/dal/dao/StudentDao.java
  3. 6 6
      mec-biz/src/main/java/com/ym/mec/biz/dal/dto/WebSocketClientDetail.java
  4. 10 0
      mec-biz/src/main/java/com/ym/mec/biz/dal/entity/SysMusicCompareRecord.java
  5. 7 1
      mec-biz/src/main/java/com/ym/mec/biz/dal/enums/MessageTypeEnum.java
  6. 3 3
      mec-biz/src/main/java/com/ym/mec/biz/handler/WebSocketHandler.java
  7. 9 0
      mec-biz/src/main/java/com/ym/mec/biz/service/SysMusicCompareRecordService.java
  8. 1 1
      mec-biz/src/main/java/com/ym/mec/biz/service/impl/MusicGroupPaymentCalenderServiceImpl.java
  9. 14 1
      mec-biz/src/main/java/com/ym/mec/biz/service/impl/MusicGroupServiceImpl.java
  10. 8 3
      mec-biz/src/main/java/com/ym/mec/biz/service/impl/QuestionnaireUserResultServiceImpl.java
  11. 4 4
      mec-biz/src/main/java/com/ym/mec/biz/service/impl/SoundCompareHandler.java
  12. 73 6
      mec-biz/src/main/java/com/ym/mec/biz/service/impl/SysMusicCompareRecordServiceImpl.java
  13. 3 0
      mec-biz/src/main/resources/config/mybatis/MusicGroupPaymentCalenderMapper.xml
  14. 1 1
      mec-biz/src/main/resources/config/mybatis/QuestionnaireUserResultMapper.xml
  15. 4 0
      mec-biz/src/main/resources/config/mybatis/StudentMapper.xml
  16. 4 1
      mec-biz/src/main/resources/config/mybatis/SysMusicCompareRecordMapper.xml
  17. 4 0
      mec-client-api/src/main/java/com/ym/mec/task/TaskRemoteService.java
  18. 5 0
      mec-client-api/src/main/java/com/ym/mec/task/fallback/TaskRemoteServiceFallback.java
  19. 19 0
      mec-task/src/main/java/com/ym/mec/task/jobs/StudentWeekTrainRemindTask.java
  20. 9 0
      mec-web/src/main/java/com/ym/mec/web/controller/TaskController.java
  21. 2 2
      mec-websocket/src/main/resources/application.yml

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

@@ -50,7 +50,7 @@ public interface MusicGroupPaymentCalenderDao extends BaseDAO<Long, MusicGroupPa
      * @param status
      * @return
      */
-    List<MusicGroupPaymentCalender> queryByPaymentStatus(@Param("status") List<MusicGroupPaymentCalender.PaymentCalenderStatusEnum> status, @Param("payUserType") String payUserType);
+    List<MusicGroupPaymentCalender> queryByPaymentStatus(@Param("musicGroupId") String musicGroupId, @Param("status") List<MusicGroupPaymentCalender.PaymentCalenderStatusEnum> status, @Param("payUserType") String payUserType);
 
     /**
      * 获取缴费信息锁

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

@@ -363,4 +363,13 @@ public interface StudentDao extends com.ym.mec.common.dal.BaseDAO<Integer, Stude
      * @return
      */
     List<Map<Integer, String>> queryStudentOrganNameMap(@Param("userIdList") List<Integer> userIdList);
+
+    /**
+     * @describe 获取生效中的学员编号
+     * @author Joburgess
+     * @date 2021/8/27 0027
+     * @param :
+     * @return java.util.Set<java.lang.Integer>
+     */
+    Set<Integer> getValidVipStudentIds();
 }

+ 6 - 6
mec-biz/src/main/java/com/ym/mec/biz/dal/dto/WebSocketClientDetail.java

@@ -13,16 +13,16 @@ public class WebSocketClientDetail {
 
     private WebSocketSession session;
 
-    @ApiModelProperty(value = "用户登录时间")
-    private Date loginTime;
+    @ApiModelProperty(value = "用户登录时间")
+    private long loginTime;
 
-    @ApiModelProperty(value = "用户退出或断开时间")
+    @ApiModelProperty(value = "用户退出或断开时间")
     private Date logoutTime;
 
     public WebSocketClientDetail() {
     }
 
-    public WebSocketClientDetail(WebSocketSession session, Date loginTime) {
+    public WebSocketClientDetail(WebSocketSession session, long loginTime) {
         this.session = session;
         this.loginTime = loginTime;
     }
@@ -35,11 +35,11 @@ public class WebSocketClientDetail {
         this.session = session;
     }
 
-    public Date getLoginTime() {
+    public long getLoginTime() {
         return loginTime;
     }
 
-    public void setLoginTime(Date loginTime) {
+    public void setLoginTime(long loginTime) {
         this.loginTime = loginTime;
     }
 

+ 10 - 0
mec-biz/src/main/java/com/ym/mec/biz/dal/entity/SysMusicCompareRecord.java

@@ -34,6 +34,8 @@ public class SysMusicCompareRecord {
 	/** 评分数据 */
 	private String scoreData;
 
+	private int notesDataIndex;
+
 	/** 总分 */
 	private BigDecimal score;
 
@@ -127,6 +129,14 @@ public class SysMusicCompareRecord {
 		return this.scoreData;
 	}
 
+	public int getNotesDataIndex() {
+		return notesDataIndex;
+	}
+
+	public void setNotesDataIndex(int notesDataIndex) {
+		this.notesDataIndex = notesDataIndex;
+	}
+
 	public BigDecimal getScore() {
 		return score;
 	}

+ 7 - 1
mec-biz/src/main/java/com/ym/mec/biz/dal/enums/MessageTypeEnum.java

@@ -186,7 +186,13 @@ public enum MessageTypeEnum implements BaseEnum<String, MessageTypeEnum> {
     CHILDREN_DAY_NOTICE_MSG("CHILDREN_DAY_NOTICE_MSG", "技能评测考级报名短信"),
     NO_BUY_CLOUD_TEACHER_MSG("NO_BUY_CLOUD_TEACHER_MSG", "未购买买云教练短信"),
     OA_NOTICE_PUSH("OA_NOTICE_PUSH", "待审批提醒"),
-    OA_CC_NOTICE_PUSH("OA_CC_NOTICE_PUSH", "审批抄送提醒");
+    OA_CC_NOTICE_PUSH("OA_CC_NOTICE_PUSH", "审批抄送提醒"),
+
+    //云教练
+    TRAIN_NO_RANK_STUDENT_PUSH("TRAIN_NO_RANK_STUDENT_PUSH", "云教练训练提醒"),
+    TRAIN_RANK_STUDENT_PUSH("TRAIN_RANK_STUDENT_PUSH", "云教练训练提醒"),
+    NO_TRAIN_STUDENT_PUSH("NO_TRAIN_STUDENT_PUSH", "云教练训练提醒"),
+    ;
 
     MessageTypeEnum(String code, String msg) {
         this.code = code;

+ 3 - 3
mec-biz/src/main/java/com/ym/mec/biz/handler/WebSocketHandler.java

@@ -57,7 +57,7 @@ public class WebSocketHandler extends AbstractWebSocketHandler {
     public void afterConnectionEstablished(WebSocketSession session) throws Exception {
         String phone = session.getPrincipal().getName().split(":")[1];
         LOGGER.info("{}上线", phone);
-        WS_CLIENTS.put(phone, new WebSocketClientDetail(session, new Date()));
+        WS_CLIENTS.put(phone, new WebSocketClientDetail(session, System.currentTimeMillis()));
         appMap.values().forEach(e->e.afterConnectionEstablished(session, phone));
         super.afterConnectionEstablished(session);
     }
@@ -96,7 +96,7 @@ public class WebSocketHandler extends AbstractWebSocketHandler {
     public void handleTransportError(WebSocketSession session, Throwable exception) throws Exception {
         String phone = session.getPrincipal().getName().split(":")[1];
         session.close();
-        LOGGER.info("发生了错误,移除客户端: {}", phone);
+        LOGGER.info("发生了错误,移除客户端: {}", phone, exception);
         appMap.values().forEach(e->e.afterConnectionClosed(session, phone));
         exception.printStackTrace();
         if(!WS_CLIENTS.containsKey(phone)){
@@ -109,7 +109,7 @@ public class WebSocketHandler extends AbstractWebSocketHandler {
     public void afterConnectionClosed(WebSocketSession session, CloseStatus status) throws Exception {
         super.afterConnectionClosed(session, status);
         String phone = session.getPrincipal().getName().split(":")[1];
-        LOGGER.info("{}离线: {}s", phone, (System.currentTimeMillis() - WS_CLIENTS.get(phone).getLoginTime().getTime())*1000);
+        LOGGER.info("{}离线: {}s", phone, (System.currentTimeMillis() - WS_CLIENTS.get(phone).getLoginTime())/1000);
         appMap.values().forEach(e->e.afterConnectionClosed(session, phone));
         WS_CLIENTS.remove(phone);
     }

+ 9 - 0
mec-biz/src/main/java/com/ym/mec/biz/service/SysMusicCompareRecordService.java

@@ -41,6 +41,15 @@ public interface SysMusicCompareRecordService extends BaseService<Long, SysMusic
     StatDto rankingList(SysMusicCompareRecordQueryInfo queryInfo);
 
     /**
+     * @describe 本周学员训练提醒
+     * @author Joburgess
+     * @date 2021/8/27 0027
+     * @param :
+     * @return void
+     */
+    void curWeekStudentTrainRemind();
+
+    /**
      * @describe 学员训练数据统计
      * @author Joburgess
      * @date 2021/8/12 0012

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

@@ -1488,7 +1488,7 @@ public class MusicGroupPaymentCalenderServiceImpl extends BaseServiceImpl<Long,
 		List<PaymentCalenderStatusEnum> statusList = new ArrayList<>();
 		statusList.add(PaymentCalenderStatusEnum.NO);
 		statusList.add(PaymentCalenderStatusEnum.OPEN);
-		List<MusicGroupPaymentCalender> musicGroupPaymentCalenderList = musicGroupPaymentCalenderDao.queryByPaymentStatus(statusList,PayUserType.STUDENT.getCode());
+		List<MusicGroupPaymentCalender> musicGroupPaymentCalenderList = musicGroupPaymentCalenderDao.queryByPaymentStatus(null, statusList,PayUserType.STUDENT.getCode());
 
 		List<MusicGroupPaymentCalender> updateMusicGroupPaymentCalenderList = new ArrayList<MusicGroupPaymentCalender>();
 		for (MusicGroupPaymentCalender mgpc : musicGroupPaymentCalenderList) {

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

@@ -97,6 +97,8 @@ import com.ym.mec.biz.dal.entity.ImGroup;
 import com.ym.mec.biz.dal.entity.MusicGroup;
 import com.ym.mec.biz.dal.entity.MusicGroupBuildLog;
 import com.ym.mec.biz.dal.entity.MusicGroupPaymentCalender;
+import com.ym.mec.biz.dal.entity.MusicGroupPaymentCalender.PayUserType;
+import com.ym.mec.biz.dal.entity.MusicGroupPaymentCalender.PaymentCalenderStatusEnum;
 import com.ym.mec.biz.dal.entity.MusicGroupPaymentCalender.PaymentType;
 import com.ym.mec.biz.dal.entity.MusicGroupPaymentCalenderCourseSettings;
 import com.ym.mec.biz.dal.entity.MusicGroupPaymentCalenderDetail;
@@ -3251,7 +3253,18 @@ public class MusicGroupServiceImpl extends BaseServiceImpl<String, MusicGroup> i
                 throw new BizException("会员收费乐团不可更改收费模式");
             }
             if(musicGroup.getCourseViewType() == CourseViewTypeEnum.MEMBER_FEE){
-                throw new BizException("当前乐团收费模式不可更改为会员收费");
+            	
+            	//如果有进行中的缴费,不能修改会员
+            	List<PaymentCalenderStatusEnum> statusList = new ArrayList<>();
+        		statusList.add(PaymentCalenderStatusEnum.NO);
+        		statusList.add(PaymentCalenderStatusEnum.OPEN);
+        		statusList.add(PaymentCalenderStatusEnum.AUDITING);
+        		List<MusicGroupPaymentCalender> musicGroupPaymentCalenderList = musicGroupPaymentCalenderDao.queryByPaymentStatus(musicGroupId, statusList,PayUserType.STUDENT.getCode());
+
+        		if(musicGroupPaymentCalenderList != null && musicGroupPaymentCalenderList.size() > 0){
+        			throw new BizException("存在未完结[审核中/未开启缴费/开启缴费]的缴费项目,请检查");
+        		}
+            	
             }
         }
         musicGroup.setUpdateTime(date);

+ 8 - 3
mec-biz/src/main/java/com/ym/mec/biz/service/impl/QuestionnaireUserResultServiceImpl.java

@@ -96,9 +96,14 @@ public class QuestionnaireUserResultServiceImpl extends BaseServiceImpl<Long, Qu
 			List<QuestionnaireQuestionItem> questionItemList = questionnaireQuestionItemDao.findAll(paramMap);
 			Map<Long, List<QuestionnaireQuestionItem>> questionItemMap = questionItemList.stream().collect(Collectors.groupingBy(QuestionnaireQuestionItem::getId));
 			//按学员分组
-			Map<Integer, List<QuestionnaireUserResult>> userIdMap = userResults.stream().collect(Collectors.groupingBy(QuestionnaireUserResult::getUserId));
-			List<Integer> userIdList = new ArrayList<>(userIdMap.keySet());
-			Collections.sort(userIdList);
+			Set<Integer> userIdSet = new LinkedHashSet<>();
+			for (QuestionnaireUserResult userResult : userResults) {
+				userIdSet.add(userResult.getUserId());
+			}
+			List<Integer> userIdList = new ArrayList<>(userIdSet);
+			Map<Integer, List<QuestionnaireUserResult>> userIdMap = userResults.parallelStream().collect(Collectors.groupingBy(QuestionnaireUserResult::getUserId));
+//			List<Integer> userIdList = new ArrayList<>(userIdMap.keySet());
+//			Collections.sort(userIdList);
 			Map<Integer, String> nameList;
 			if(cooperationId != null){
 				nameList = MapUtil.convertMybatisMap(questionnaireQuestionItemDao.queryUserName(cooperationId));

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

@@ -343,9 +343,9 @@ public class SoundCompareHandler implements WebSocketEventHandler {
                     }
                     cadenceValidNum++;
                     //如果频率差值在节奏误差范围内
-                    if(Math.abs(recordInfo.getFrequency()-musicXmlInfo.getFrequency())<=soundCompareConfig.integrityFrequencyRange){
-                        integrityValidNum++;
-                    }
+//                    if(Math.abs(recordInfo.getFrequency()-musicXmlInfo.getFrequency())<=soundCompareConfig.integrityFrequencyRange){
+//                        integrityValidNum++;
+//                    }
                 }
 
                 //非正常频率次数
@@ -418,7 +418,7 @@ public class SoundCompareHandler implements WebSocketEventHandler {
                     cadenceRight = true;
                 }
                 //音准、完成度
-                if (!CollectionUtils.isEmpty(measureSoundPitchInfos)){
+                if (cadenceRight && !CollectionUtils.isEmpty(measureSoundPitchInfos)){
                     //音准
                     Double avgPitch = measureSoundPitchInfos.stream().filter(pitch -> Math.abs((pitch.getFrequency()-musicXmlInfo.getFrequency()))<5).collect(Collectors.averagingDouble(pitch -> pitch.getFrequency()));
                     //音分

+ 73 - 6
mec-biz/src/main/java/com/ym/mec/biz/service/impl/SysMusicCompareRecordServiceImpl.java

@@ -3,21 +3,20 @@ package com.ym.mec.biz.service.impl;
 import com.alibaba.fastjson.JSON;
 import com.alibaba.fastjson.JSONObject;
 import com.ym.mec.auth.api.entity.SysUser;
-import com.ym.mec.biz.dal.dao.StudentDao;
-import com.ym.mec.biz.dal.dao.SysMusicCompareRecordDao;
-import com.ym.mec.biz.dal.dao.SysMusicScoreDao;
-import com.ym.mec.biz.dal.dao.TeacherDao;
+import com.ym.mec.biz.dal.dao.*;
 import com.ym.mec.biz.dal.dto.*;
 import com.ym.mec.biz.dal.entity.IndexBaseMonthData;
 import com.ym.mec.biz.dal.entity.SysMusicCompareRecord;
 import com.ym.mec.biz.dal.entity.SysMusicScore;
-import com.ym.mec.biz.dal.enums.FeatureType;
-import com.ym.mec.biz.dal.enums.IndexDataType;
+import com.ym.mec.biz.dal.enums.*;
 import com.ym.mec.biz.dal.page.SysMusicCompareRecordQueryInfo;
+import com.ym.mec.biz.service.SysConfigService;
+import com.ym.mec.biz.service.SysMessageService;
 import com.ym.mec.biz.service.SysMusicCompareRecordService;
 import com.ym.mec.common.dal.BaseDAO;
 import com.ym.mec.common.page.PageInfo;
 import com.ym.mec.common.service.impl.BaseServiceImpl;
+import com.ym.mec.thirdparty.message.MessageSenderPluginContext;
 import com.ym.mec.util.collection.MapUtil;
 import com.ym.mec.util.date.DateUtil;
 import io.swagger.models.auth.In;
@@ -43,6 +42,11 @@ public class SysMusicCompareRecordServiceImpl extends BaseServiceImpl<Long, SysM
 	private TeacherDao teacherDao;
 	@Autowired
 	private StudentDao studentDao;
+	@Autowired
+	private SysMessageService sysMessageService;
+
+	@Autowired
+	private SysConfigDao sysConfigDao;
 
 	@Override
 	public BaseDAO<Long, SysMusicCompareRecord> getDAO() {
@@ -101,6 +105,9 @@ public class SysMusicCompareRecordServiceImpl extends BaseServiceImpl<Long, SysM
 		}else{
 			userLastEvaluationData = sysMusicCompareRecordDao.getUserLastEvaluationData(userId);
 		}
+		if(Objects.isNull(userLastEvaluationData)){
+			return null;
+		}
 		if(StringUtils.isBlank(userLastEvaluationData.getScoreData())){
 			return null;
 		}
@@ -166,6 +173,63 @@ public class SysMusicCompareRecordServiceImpl extends BaseServiceImpl<Long, SysM
 	}
 
 	@Override
+	public void curWeekStudentTrainRemind() {
+		Set<Integer> validVipStudentIds = studentDao.getValidVipStudentIds();
+		LocalDate monday = LocalDate.now().with(DateUtil.weekFields.dayOfWeek(), DayOfWeek.MONDAY.getValue());
+		LocalDate sunday = LocalDate.now().with(DateUtil.weekFields.dayOfWeek(), DayOfWeek.SUNDAY.getValue());
+		List<MusicCompareRankingDto> userTrainStat = sysMusicCompareRecordDao.getUserTrainStat(monday.toString(), sunday.toString(), null);
+
+		Set<Integer> trainStudentIds = new HashSet<>();
+		Set<Integer> ranStudentIds = new HashSet<>();
+
+		if(!CollectionUtils.isEmpty(userTrainStat)){
+			trainStudentIds = userTrainStat.stream().map(MusicCompareRankingDto::getUserId).collect(Collectors.toSet());
+			//时长榜
+			Set<Integer> collect1 = userTrainStat.stream().sorted(Comparator.comparing(MusicCompareRankingDto::getTrainTime, Comparator.reverseOrder())).limit(10).map(MusicCompareRankingDto::getUserId).collect(Collectors.toSet());
+			ranStudentIds.addAll(collect1);
+			Set<Integer> collect2 = userTrainStat.stream().sorted(Comparator.comparing(MusicCompareRankingDto::getTrainDays, Comparator.reverseOrder())).limit(10).map(MusicCompareRankingDto::getUserId).collect(Collectors.toSet());
+			ranStudentIds.addAll(collect2);
+		}
+		List<MusicCompareRankingDto> userTrainStat3 = sysMusicCompareRecordDao.getUserTrainStat(monday.toString(), sunday.toString(), HeardLevelEnum.BEGINNER);
+		if(!CollectionUtils.isEmpty(userTrainStat3)){
+			Set<Integer> collect3 = userTrainStat3.stream().sorted(Comparator.comparing(MusicCompareRankingDto::getScore, Comparator.reverseOrder())).limit(10).map(MusicCompareRankingDto::getUserId).collect(Collectors.toSet());
+			ranStudentIds.addAll(collect3);
+		}
+		List<MusicCompareRankingDto> userTrainStat4 = sysMusicCompareRecordDao.getUserTrainStat(monday.toString(), sunday.toString(), HeardLevelEnum.ADVANCED);
+		if(!CollectionUtils.isEmpty(userTrainStat4)){
+			Set<Integer> collect4 = userTrainStat4.stream().sorted(Comparator.comparing(MusicCompareRankingDto::getScore, Comparator.reverseOrder())).limit(10).map(MusicCompareRankingDto::getUserId).collect(Collectors.toSet());
+			ranStudentIds.addAll(collect4);
+		}
+		List<MusicCompareRankingDto> userTrainStat5 = sysMusicCompareRecordDao.getUserTrainStat(monday.toString(), sunday.toString(), HeardLevelEnum.PERFORMER);
+		if(!CollectionUtils.isEmpty(userTrainStat5)){
+			Set<Integer> collect5 = userTrainStat5.stream().sorted(Comparator.comparing(MusicCompareRankingDto::getScore, Comparator.reverseOrder())).limit(10).map(MusicCompareRankingDto::getUserId).collect(Collectors.toSet());
+			ranStudentIds.addAll(collect5);
+		}
+
+		Map<Integer, String> userMap1 = new HashMap<>();
+		Map<Integer, String> userMap2 = new HashMap<>();
+		Map<Integer, String> userMap3 = new HashMap<>();
+		for (Integer studentId : validVipStudentIds) {
+			if (trainStudentIds.contains(studentId) && !ranStudentIds.contains(studentId)){
+				userMap1.put(studentId, studentId.toString());
+			}
+			if(ranStudentIds.contains(studentId)){
+				userMap2.put(studentId, studentId.toString());
+			}
+			if(!trainStudentIds.contains(studentId)){
+				userMap3.put(studentId, studentId.toString());
+			}
+		}
+		String baseApiUrl = sysConfigDao.findConfigValue("base_api_url");
+		sysMessageService.batchSendMessage(MessageSenderPluginContext.MessageSender.JIGUANG, MessageTypeEnum.TRAIN_NO_RANK_STUDENT_PUSH,userMap1,
+				null, 0, "5?"+baseApiUrl+"/#/cloudRanking", "STUDENT");
+		sysMessageService.batchSendMessage(MessageSenderPluginContext.MessageSender.JIGUANG, MessageTypeEnum.TRAIN_RANK_STUDENT_PUSH,userMap2,
+				null, 0, "5?"+baseApiUrl+"/#/cloudRanking", "STUDENT");
+		sysMessageService.batchSendMessage(MessageSenderPluginContext.MessageSender.JIGUANG, MessageTypeEnum.NO_TRAIN_STUDENT_PUSH,userMap3,
+				null, 0, "5?"+baseApiUrl+"/#/cloudRanking", "STUDENT");
+	}
+
+	@Override
 	public Map<String, Object> studentTrainData(SysMusicCompareRecordQueryInfo queryInfo) {
 		StudentTrainOverviewDto userTrainOverView = new StudentTrainOverviewDto();
 
@@ -216,6 +280,9 @@ public class SysMusicCompareRecordServiceImpl extends BaseServiceImpl<Long, SysM
 			trainNumData.add(new IndexBaseMonthData(trainDate, null, new BigDecimal(data.getTrainNum())));
 		}
 
+		trainNumData.sort(Comparator.comparing(IndexBaseMonthData::getMonth));
+		trainTimeData.sort(Comparator.comparing(IndexBaseMonthData::getMonth));
+
 		userTrainChartResult.add(new IndexBaseDto(IndexDataType.CLOUD_STUDY_TRAIN_TIME, trainTimeData));
 		userTrainChartResult.add(new IndexBaseDto(IndexDataType.CLOUD_STUDY_TRAIN_NUM, trainNumData));
 

+ 3 - 0
mec-biz/src/main/resources/config/mybatis/MusicGroupPaymentCalenderMapper.xml

@@ -318,6 +318,9 @@
         	<if test="payUserType != null">
                 AND pay_user_type_ = #{payUserType}
         	</if>
+        	<if test="musicGroupId != null">
+                AND music_group_id_ = #{musicGroupId}
+        	</if>
         </where>
     </select>
 

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

@@ -41,7 +41,7 @@
 				AND qur.active_type_ = #{activeType}
 			</if>
 		</where>
-		ORDER BY su.organ_id_,qur.create_time_,qur.user_id_,qur.id_
+		ORDER BY su.organ_id_,qur.create_time_ DESC,qur.user_id_,qur.id_
 	</select>
 	
 	<!-- 向数据库增加一条记录 -->

+ 4 - 0
mec-biz/src/main/resources/config/mybatis/StudentMapper.xml

@@ -1217,6 +1217,10 @@
         </foreach>
     </select>
 
+    <select id="getValidVipStudentIds" resultType="java.lang.Integer">
+        SELECT user_id_ FROM student WHERE member_rank_setting_id_ IS NOT NULl OR experience_member_rank_setting_id_ IS NOT NULL
+    </select>
+
     <update id="updateGrade"><![CDATA[
         UPDATE student SET current_grade_num_=current_grade_num_+1
         WHERE current_grade_num_>=1

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

@@ -14,6 +14,7 @@
 		<result column="sys_music_score_name_" property="sysMusicScoreName" />
 		<result column="behavior_id_" property="behaviorId"/>
 		<result column="score_data_" property="scoreData" />
+		<result column="notes_data_index_" property="notesDataIndex"/>
 		<result column="score_" property="score" />
 		<result column="intonation_" property="intonation" />
 		<result column="cadence_" property="cadence" />
@@ -120,7 +121,9 @@
 	<!-- 分页查询 -->
 	<select id="queryPage" resultMap="SysMusicCompareRecord" parameterType="map">
 		SELECT
-			smcr.id_, smcr.user_id_, smcr.sys_music_score_id_,smcr.heard_level_, smcr.score_, smcr.intonation_, smcr.cadence_,
+			smcr.id_, smcr.user_id_, smcr.sys_music_score_id_, smcr.heard_level_,
+			LOCATE('musicalNotesPlayStats', smcr.score_data_) notes_data_index_,
+		       smcr.score_, smcr.intonation_, smcr.cadence_,
 		       smcr.integrity_, smcr.record_file_path_, smcr.client_id_, smcr.device_type_, smcr.play_time_,
 		       smcr.monday_, smcr.create_time_,
 			sms.name_ sys_music_score_name_

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

@@ -219,4 +219,8 @@ public interface TaskRemoteService {
 	/** 清理学员云教练连续使用天数 */
 	@GetMapping("task/cleanStudentCloudStudySequenceDays")
 	void cleanStudentCloudStudySequenceDays();
+
+	/** 本周学员训练提醒 */
+	@GetMapping("task/curWeekStudentTrainRemind")
+	void curWeekStudentTrainRemind();
 }

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

@@ -272,4 +272,9 @@ public class TaskRemoteServiceFallback implements TaskRemoteService {
 	public void cleanStudentCloudStudySequenceDays() {
 		logger.error("清理学员云教练连续使用天数失败");
 	}
+
+	@Override
+	public void curWeekStudentTrainRemind() {
+		logger.error("本周学员训练提醒失败");
+	}
 }

+ 19 - 0
mec-task/src/main/java/com/ym/mec/task/jobs/StudentWeekTrainRemindTask.java

@@ -0,0 +1,19 @@
+package com.ym.mec.task.jobs;
+
+import com.ym.mec.task.TaskRemoteService;
+import com.ym.mec.task.core.BaseTask;
+import com.ym.mec.task.core.TaskException;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+@Service
+public class StudentWeekTrainRemindTask extends BaseTask {
+
+	@Autowired
+	private TaskRemoteService taskRemoteService;
+
+	@Override
+	public void execute() throws TaskException {
+		taskRemoteService.curWeekStudentTrainRemind();
+	}
+}

+ 9 - 0
mec-web/src/main/java/com/ym/mec/web/controller/TaskController.java

@@ -131,6 +131,9 @@ public class TaskController extends BaseController {
 	@Autowired
 	private MusicGroupSchoolTermCourseDetailService musicGroupSchoolTermCourseDetailService;
 
+	@Autowired
+	private SysMusicCompareRecordService sysMusicCompareRecordService;
+
 	@GetMapping(value = "/syncImHistoryMessageTask")
 	// 同步即时通讯聊天记录
 	public void syncImHistoryMessageTask(String date) throws Exception {
@@ -491,4 +494,10 @@ public class TaskController extends BaseController {
 	public void cleanStudentCloudStudySequenceDays(){
 		studentService.cleanStudentCloudStudySequenceDays();
 	}
+
+	@ApiOperation("本周学员训练提醒")
+	@GetMapping(value = "/curWeekStudentTrainRemind")
+	public void curWeekStudentTrainRemind(){
+		sysMusicCompareRecordService.curWeekStudentTrainRemind();
+	}
 }

+ 2 - 2
mec-websocket/src/main/resources/application.yml

@@ -80,8 +80,8 @@ spring:
 
 mybatis:
   mapperLocations: classpath:config/mybatis/*.xml
-  configuration:
-    log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
+#  configuration:
+#    log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
 
 swagger:
   base-package: com.ym.mec.web.controller