Explorar el Código

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

yonge hace 4 años
padre
commit
b27a6d2449

+ 7 - 18
mec-biz/src/main/java/com/ym/mec/biz/dal/dao/CourseScheduleStudentPaymentDao.java

@@ -116,6 +116,9 @@ public interface CourseScheduleStudentPaymentDao extends BaseDAO<Long, CourseSch
                                                                               @Param("userId") Integer userId);
 
     /**
+     * @describe 统计团体下为开始课程学生数量
+     * @author Joburgess
+     * @date 2020.09.27
      * @param groupId:
      * @param groupType:
      * @return int
@@ -317,12 +320,12 @@ public interface CourseScheduleStudentPaymentDao extends BaseDAO<Long, CourseSch
     String getMidiByCourseIdAndUserId(@Param("courseScheduleId") String courseScheduleId, @Param("userId") String userId);
 
     /**
-     * @param groupType:
-     * @param groupIds:
-     * @return java.util.List<java.util.Map < java.lang.String, java.math.BigDecimal>>
      * @describe 统计课程组下的课程单价
      * @author Joburgess
      * @date 2020.06.11
+     * @param groupType:
+     * @param groupIds:
+     * @return java.util.List<java.util.Map<java.lang.String,java.math.BigDecimal>>
      */
     List<Map<String, BigDecimal>> findGroupCoursesUnitPrice(@Param("groupType") GroupType groupType,
                                                             @Param("groupIds") List<String> groupIds);
@@ -336,21 +339,6 @@ public interface CourseScheduleStudentPaymentDao extends BaseDAO<Long, CourseSch
     List<RongyunBasicUserDto> queryNoJoinStu(@Param("roomId") String roomId, @Param("courseScheduleId") String courseScheduleId);
 
     /**
-     * @param batchNo:
-     * @return java.util.List<com.ym.mec.biz.dal.entity.CourseScheduleStudentPayment>
-     * @describe 根据批次号获取学员课程缴费记录
-     * @author Joburgess
-     * @date 2020.10.30
-     */
-    List<CourseScheduleStudentPayment> findByBatchNo(@Param("batchNo") String batchNo);
-
-
-    /**
-     * 获取学生班级未开始的课程
-     */
-    List<CourseScheduleStudentPayment> getClassGroupNoStartCourse(@Param("classGroupIds") List<Integer> classGroupIds);
-
-    /**
      * @describe 获取指定学员的最后一节课时间
      * @author Joburgess
      * @date 2020/11/17 0017
@@ -390,5 +378,6 @@ public interface CourseScheduleStudentPaymentDao extends BaseDAO<Long, CourseSch
      * @return java.util.List<com.ym.mec.biz.dal.dto.StudentVipDouble11Dto>
      */
     List<StudentVipDouble11Dto> countStudentDouble11CourseTime(@Param("userIds") List<Integer> userIds,
+
                                                                @Param("specialActivityIds") List<Integer> specialActivityIds);
 }

+ 4 - 4
mec-im/src/main/java/com/ym/controller/RoomController.java

@@ -145,14 +145,14 @@ public class RoomController{
     }
 
     @RequestMapping(value = "pushDownloadExamSongMsg", method = RequestMethod.POST)
-    public Object pushDownloadExamSongMsg(Long roomId,Integer examSongId) throws Exception {
-        roomService.pushDownloadExamSongMsg(roomId,examSongId);
+    public Object pushDownloadExamSongMsg(@RequestBody ExamSongData examSongData) throws Exception {
+        roomService.pushDownloadExamSongMsg(examSongData.getRoomId(),examSongData.getExamSongId());
         return new BaseResponse<>();
     }
 
     @RequestMapping(value = "adjustExamSong", method = RequestMethod.POST)
-    public Object adjustExamSong(Long roomId,Integer status,Integer examSongId) throws Exception {
-        roomService.adjustExamSong(roomId,status,examSongId);
+    public Object adjustExamSong(@RequestBody ExamSongData examSongData) throws Exception {
+        roomService.adjustExamSong(examSongData.getRoomId(),examSongData.getStatus(),examSongData.getExamSongId());
         return new BaseResponse<>();
     }
 

+ 31 - 0
mec-im/src/main/java/com/ym/pojo/ExamSongData.java

@@ -0,0 +1,31 @@
+package com.ym.pojo;
+
+public class ExamSongData {
+	private String roomId;
+	private Integer examSongId;
+	private Integer status;
+
+	public Integer getStatus() {
+		return status;
+	}
+
+	public void setStatus(Integer status) {
+		this.status = status;
+	}
+
+	public String getRoomId() {
+		return roomId;
+	}
+
+	public void setRoomId(String roomId) {
+		this.roomId = roomId;
+	}
+
+	public Integer getExamSongId() {
+		return examSongId;
+	}
+
+	public void setExamSongId(Integer examSongId) {
+		this.examSongId = examSongId;
+	}
+}

+ 8 - 7
mec-im/src/main/java/com/ym/service/Impl/RoomServiceImpl.java

@@ -1284,7 +1284,7 @@ public class RoomServiceImpl implements RoomService {
 
     @Override
     @Transactional(rollbackFor = Exception.class)
-    public void pushDownloadExamSongMsg(Long roomId, Integer examSongId) throws Exception {
+    public void pushDownloadExamSongMsg(String roomId, Integer examSongId) throws Exception {
         SysUser authUser = sysUserFeignService.queryUserInfo();
         ExamSongDownloadMessageMessage msg = new ExamSongDownloadMessageMessage();
         SysExamSong sysExamSong = sysExamSongDao.get(examSongId);
@@ -1293,29 +1293,30 @@ public class RoomServiceImpl implements RoomService {
         }
         msg.setSongName(sysExamSong.getName());
         msg.setUrl(sysExamSong.getUrl());
-        imHelper.publishMessage(authUser.getId().toString(), roomId.toString(), msg, 1);
+        imHelper.publishMessage(authUser.getId().toString(), roomId, msg, 1);
         //学员曲目下载状态改为未下载
         ExamSongDownloadData json = new ExamSongDownloadData();
         json.setSongName(sysExamSong.getName());
         json.setUrl(sysExamSong.getUrl());
         json.setStatus(0);
         json.setSongId(examSongId);
-        courseScheduleStudentPaymentDao.adjustExamSong(roomId,null, JSON.toJSONString(json));
+        courseScheduleStudentPaymentDao.adjustExamSong(Long.parseLong(roomId.substring(1)),null, JSON.toJSONString(json));
     }
 
     @Override
     @Transactional(rollbackFor = Exception.class)
-    public void adjustExamSong(Long roomId, Integer status,Integer examSongId) throws Exception {
+    public void adjustExamSong(String roomId, Integer status,Integer examSongId) throws Exception {
         if(roomId == null || status == null || examSongId == null){
             throw new BizException("参数校验失败");
         }
         SysUser authUser = sysUserFeignService.queryUserInfo();
-        CourseSchedule courseSchedule = courseScheduleDao.get(roomId);
+        long scheduleId = Long.parseLong(roomId.substring(1));
+        CourseSchedule courseSchedule = courseScheduleDao.get(scheduleId);
 
         //给老师发送学员曲目下载状态
         DeviceStateChangedMessage deviceResourceMessage = new DeviceStateChangedMessage(DeviceTypeEnum.ExamSong.ordinal(), status==0?false:true);
         deviceResourceMessage.setUserId(courseSchedule.getActualTeacherId().toString());
-        imHelper.publishMessage(authUser.getId().toString(), roomId.toString(), deviceResourceMessage, 1);
+        imHelper.publishMessage(authUser.getId().toString(), roomId, deviceResourceMessage, 1);
 
         SysExamSong sysExamSong = sysExamSongDao.get(examSongId);
         if(sysExamSong == null){
@@ -1326,7 +1327,7 @@ public class RoomServiceImpl implements RoomService {
         msg.setUrl(sysExamSong.getUrl());
         msg.setStatus(status);
         msg.setSongId(examSongId);
-        courseScheduleStudentPaymentDao.adjustExamSong(roomId,authUser.getId(),JSON.toJSONString(msg));
+        courseScheduleStudentPaymentDao.adjustExamSong(scheduleId,authUser.getId(),JSON.toJSONString(msg));
     }
 
     public void updateDisplay(String roomId, String senderId, String display, Integer isIncludeSender) throws Exception {

+ 2 - 2
mec-im/src/main/java/com/ym/service/RoomService.java

@@ -84,7 +84,7 @@ public interface RoomService {
      * @param roomId
      * @param examSongId
      */
-    void pushDownloadExamSongMsg(Long roomId, Integer examSongId) throws Exception;
+    void pushDownloadExamSongMsg(String roomId, Integer examSongId) throws Exception;
 
     /**
      * 修改学员伴奏下载状态
@@ -92,5 +92,5 @@ public interface RoomService {
      * @param roomId
      * @param status
      */
-    void adjustExamSong(Long roomId,Integer status,Integer examSongId) throws Exception;
+    void adjustExamSong(String roomId,Integer status,Integer examSongId) throws Exception;
 }