Bläddra i källkod

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

liujunchi 3 år sedan
förälder
incheckning
0f12df1dff
67 ändrade filer med 1569 tillägg och 570 borttagningar
  1. 70 0
      cooleshow-user/user-admin/src/main/java/com/yonge/cooleshow/admin/controller/PianoRoomSettingsController.java
  2. 3 3
      cooleshow-user/user-admin/src/main/java/com/yonge/cooleshow/admin/controller/VipCardRecordController.java
  3. 6 0
      cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/dao/CourseGroupDao.java
  4. 4 1
      cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/dao/CourseScheduleDao.java
  5. 29 0
      cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/dao/CourseScheduleRecordDao.java
  6. 19 15
      cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/dao/CourseScheduleStudentDao.java
  7. 2 2
      cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/dao/CourseScheduleStudentMusicSheetDao.java
  8. 5 1
      cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/dao/CourseScheduleStudentPaymentDao.java
  9. 39 0
      cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/dao/PianoRoomSettingsDao.java
  10. 23 0
      cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/dao/PianoRoomTimeDao.java
  11. 0 14
      cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/dao/PinaoRoomTimeDao.java
  12. 8 0
      cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/dao/StudentDao.java
  13. 5 1
      cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/dao/UserBindingTeacherDao.java
  14. 3 1
      cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/dao/VipCardRecordDao.java
  15. 0 9
      cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/dto/ImNetworkControlDeviceNotifyMessage.java
  16. 8 8
      cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/dto/ImNetworkCustomMessage.java
  17. 10 10
      cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/dto/ImNetworkDeviceControlDto.java
  18. 5 5
      cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/dto/ImNetworkDeviceStateChangedMessage.java
  19. 24 0
      cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/dto/PianoRoomSettingsDto.java
  20. 14 0
      cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/dto/search/PianoRoomSettingsSearch.java
  21. 114 0
      cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/entity/CourseScheduleRecord.java
  22. 54 54
      cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/entity/CourseScheduleStudent.java
  23. 5 5
      cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/entity/CourseScheduleStudentMusicSheet.java
  24. 123 0
      cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/entity/PianoRoomSettings.java
  25. 1 1
      cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/entity/PianoRoomTime.java
  26. 2 1
      cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/enums/GoodTypeEnum.java
  27. 5 1
      cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/service/CourseScheduleService.java
  28. 33 0
      cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/service/PianoRoomSettingsService.java
  29. 2 2
      cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/service/PianoRoomTimeService.java
  30. 17 4
      cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/service/StudentService.java
  31. 24 17
      cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/service/VipCardRecordService.java
  32. 108 46
      cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/service/impl/CourseScheduleServiceImpl.java
  33. 52 41
      cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/service/impl/ImNetworkRoomServiceImpl.java
  34. 41 0
      cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/service/impl/PianoRoomSettingsServiceImpl.java
  35. 20 0
      cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/service/impl/PianoRoomTimeServiceImpl.java
  36. 0 20
      cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/service/impl/PinaoRoomTimeServiceImpl.java
  37. 56 2
      cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/service/impl/StudentServiceImpl.java
  38. 4 6
      cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/service/impl/VipCardRecordServiceImpl.java
  39. 34 0
      cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/vo/CourseCompleteVo.java
  40. 114 0
      cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/vo/CourseScheduleRecordVo.java
  41. 83 0
      cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/vo/CourseScheduleStudentVo.java
  42. 24 0
      cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/vo/PianoRoomSettingsVo.java
  43. 2 2
      cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/vo/PianoRoomTimeVo.java
  44. 8 1
      cooleshow-user/user-biz/src/main/resources/config/mybatis/CourseGroupMapper.xml
  45. 8 4
      cooleshow-user/user-biz/src/main/resources/config/mybatis/CourseScheduleMapper.xml
  46. 71 0
      cooleshow-user/user-biz/src/main/resources/config/mybatis/CourseScheduleRecordMapper.xml
  47. 0 10
      cooleshow-user/user-biz/src/main/resources/config/mybatis/CourseScheduleStudentMapper.xml
  48. 4 4
      cooleshow-user/user-biz/src/main/resources/config/mybatis/CourseScheduleStudentMusicSheetDao.xml
  49. 20 5
      cooleshow-user/user-biz/src/main/resources/config/mybatis/CourseScheduleStudentPaymentMapper.xml
  50. 1 1
      cooleshow-user/user-biz/src/main/resources/config/mybatis/ImNetworkRoomMemberMapper.xml
  51. 53 0
      cooleshow-user/user-biz/src/main/resources/config/mybatis/PianoRoomSettingsMapper.xml
  52. 26 0
      cooleshow-user/user-biz/src/main/resources/config/mybatis/PianoRoomTimeDao.xml
  53. 0 12
      cooleshow-user/user-biz/src/main/resources/config/mybatis/PinaoRoomTimeMapper.xml
  54. 21 0
      cooleshow-user/user-biz/src/main/resources/config/mybatis/StudentMapper.xml
  55. 48 1
      cooleshow-user/user-biz/src/main/resources/config/mybatis/UserBindingTeacherMapper.xml
  56. 10 4
      cooleshow-user/user-biz/src/main/resources/config/mybatis/VipCardRecordMapper.xml
  57. 2 0
      cooleshow-user/user-classroom/src/main/java/com/yonge/cooleshow/classroom/controller/ImNetworkRoomController.java
  58. 1 1
      cooleshow-user/user-student/src/main/java/com/yonge/cooleshow/student/config/ResourceServerConfig.java
  59. 9 0
      cooleshow-user/user-student/src/main/java/com/yonge/cooleshow/student/controller/MemberPriceSettingsController.java
  60. 0 2
      cooleshow-user/user-student/src/main/java/com/yonge/cooleshow/student/controller/StudentController.java
  61. 3 3
      cooleshow-user/user-student/src/main/java/com/yonge/cooleshow/student/controller/VipCardRecordController.java
  62. 58 0
      cooleshow-user/user-student/src/main/java/com/yonge/cooleshow/student/open/OpenClient.java
  63. 0 166
      cooleshow-user/user-teacher/src/main/java/com/yonge/cooleshow/teacher/controller/ImNetworkRoomController.java
  64. 0 29
      cooleshow-user/user-teacher/src/main/java/com/yonge/cooleshow/teacher/controller/ImNetworkRoomMemberController.java
  65. 31 3
      cooleshow-user/user-teacher/src/main/java/com/yonge/cooleshow/teacher/controller/TeacherCourseScheduleController.java
  66. 0 24
      toolset/toolset-payment/src/main/resources/apiclient_cert.pem
  67. 0 28
      toolset/toolset-payment/src/main/resources/apiclient_key.pem

+ 70 - 0
cooleshow-user/user-admin/src/main/java/com/yonge/cooleshow/admin/controller/PianoRoomSettingsController.java

@@ -0,0 +1,70 @@
+package com.yonge.cooleshow.admin.controller;
+
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.yonge.cooleshow.auth.api.client.SysUserFeignService;
+import com.yonge.cooleshow.auth.api.entity.SysUser;
+import com.yonge.toolset.base.page.PageInfo;
+import com.yonge.cooleshow.common.controller.BaseController;
+import com.yonge.cooleshow.common.entity.HttpResponseResult;
+import com.yonge.cooleshow.biz.dal.support.PageUtil;
+
+import com.yonge.toolset.utils.string.StringUtil;
+import io.swagger.annotations.*;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.http.HttpStatus;
+import org.springframework.web.bind.annotation.*;
+
+import javax.validation.Valid;
+
+import com.yonge.cooleshow.biz.dal.vo.PianoRoomSettingsVo;
+import com.yonge.cooleshow.biz.dal.dto.search.PianoRoomSettingsSearch;
+import com.yonge.cooleshow.biz.dal.entity.PianoRoomSettings;
+import com.yonge.cooleshow.biz.dal.service.PianoRoomSettingsService;
+
+import java.util.Date;
+
+@RestController
+@RequestMapping("/pianoRoomSettings")
+@Api(value = "琴房时长价格配置", tags = "")
+public class PianoRoomSettingsController extends BaseController {
+
+    @Autowired
+    private PianoRoomSettingsService pianoRoomSettingsService;
+    @Autowired
+    private SysUserFeignService sysUserFeignService;
+
+    /**
+     * 查询单条
+     */
+    @GetMapping("/detail/{id}")
+    @ApiOperation(value = "详情", notes = "传入id")
+    public HttpResponseResult<PianoRoomSettingsVo> detail(@PathVariable("id") Long id) {
+        return succeed(pianoRoomSettingsService.detail(id));
+    }
+
+    /**
+     * 查询分页
+     */
+    @PostMapping("/page")
+    @ApiOperation(value = "查询分页", notes = "传入pianoRoomSettingsSearch")
+    public HttpResponseResult<PageInfo<PianoRoomSettingsVo>> page(@RequestBody PianoRoomSettingsSearch query) {
+        IPage<PianoRoomSettingsVo> pages = pianoRoomSettingsService.selectPage(PageUtil.getPage(query), query);
+        return succeed(PageUtil.pageInfo(pages));
+    }
+
+    /**
+     * 修改
+     */
+    @PostMapping("/update")
+    @ApiOperation(value = "修改", notes = "传入pianoRoomSettings")
+    public HttpResponseResult update(@Valid @RequestBody PianoRoomSettings pianoRoomSettings) {
+        SysUser user = sysUserFeignService.queryUserInfo();
+        if (user == null || user.getId() == null) {
+            return failed(HttpStatus.FORBIDDEN, "请登录");
+        }
+        pianoRoomSettings.setUpdateBy(user.getId());
+        pianoRoomSettings.setUpdateTime(new Date());
+        return status(pianoRoomSettingsService.updateById(pianoRoomSettings));
+    }
+
+}

+ 3 - 3
cooleshow-user/user-admin/src/main/java/com/yonge/cooleshow/admin/controller/VipCardRecordController.java

@@ -24,10 +24,10 @@ public class VipCardRecordController extends BaseController {
 	/**
      * 查询单条
      */
-    @GetMapping("/detail/{id}")
+    @GetMapping("/detail/{orderDetilId")
     @ApiOperation(value = "详情", notes = "传入id")
-    public HttpResponseResult<VipCardRecordVo> detail(@PathVariable("id") Long id) {
-    	return succeed(vipCardRecordService.detail(id));
+    public HttpResponseResult<VipCardRecordVo> detail(@PathVariable("orderDetilId") Long orderDetilId) {
+    	return succeed(vipCardRecordService.detail(orderDetilId));
 	}
     
     /**

+ 6 - 0
cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/dao/CourseGroupDao.java

@@ -179,5 +179,11 @@ public interface CourseGroupDao extends BaseMapper<CourseGroup> {
      * @return
      */
     CourseGroupInfoVo selectGroupInfoVo(Long groupId);
+
+    /**
+     * 批量更新组状态
+     * @param list
+     */
+    void updateBatch(List<Long> list);
 }
 

+ 4 - 1
cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/dao/CourseScheduleDao.java

@@ -218,11 +218,14 @@ public interface CourseScheduleDao extends BaseMapper<CourseSchedule> {
     void updateStartTime(List<CourseSchedule> list);
 
     //更新课程状态
-    void updateEndTime(List<CourseSchedule> list);
+    void updateEndTime(List<CourseScheduleStudentVo> list);
 
     //根据日期查课程id
     List<Long> selectIdList(String day);
 
     //更新老师课酬
     void updateTeacherSalary(List<Long> list);
+
+    //查询已完成课时
+    List<CourseCompleteVo> selectComplete();
 }

+ 29 - 0
cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/dao/CourseScheduleRecordDao.java

@@ -0,0 +1,29 @@
+package com.yonge.cooleshow.biz.dal.dao;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.yonge.cooleshow.biz.dal.entity.CourseScheduleRecord;
+import com.yonge.cooleshow.biz.dal.vo.CourseScheduleRecordVo;
+import org.apache.ibatis.annotations.Param;
+
+import java.util.List;
+import java.util.Map;
+
+/**
+ * @Author: cy
+ * @Date: 2022/5/30
+ */
+public interface CourseScheduleRecordDao extends BaseMapper<CourseScheduleRecord> {
+    //统计人数&时长
+    List<CourseScheduleRecord> sumCourseTime();
+
+    //批量添加
+    void insertBatch(@Param("recordList") List<CourseScheduleRecord> recordList);
+
+    //消耗时长
+    Long countTimeByTeacherId(@Param("teacherId")Long teacherId,@Param("month") String month);
+
+    //消耗时长详情
+    IPage<CourseScheduleRecordVo> selectConsumeTimeList(Page<CourseScheduleRecordVo> pageInfo, @Param("param") Map<String, Object> param);
+}

+ 19 - 15
cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/dao/CourseScheduleStudentDao.java

@@ -1,15 +1,19 @@
-package com.yonge.cooleshow.biz.dal.dao;
-
-import com.baomidou.mybatisplus.core.mapper.BaseMapper;
-import com.yonge.cooleshow.biz.dal.entity.CourseScheduleStudent;
-
-import java.util.List;
-
-/**
- * @Author: cy
- * @Date: 2022/5/27
- */
-public interface CourseScheduleStudentDao extends BaseMapper<CourseScheduleStudent> {
-    //批量添加学员
-    void insertBatch(List<CourseScheduleStudent> list);
-}
+//package com.yonge.cooleshow.biz.dal.dao;
+//
+//import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+//import com.yonge.cooleshow.biz.dal.entity.CourseScheduleStudent;
+//import com.yonge.cooleshow.biz.dal.vo.CourseScheduleStudentVo;
+//
+//import java.util.List;
+//
+///**
+// * @Author: cy
+// * @Date: 2022/5/27
+// */
+//public interface CourseScheduleStudentDao extends BaseMapper<CourseScheduleStudent> {
+//    //批量添加学员
+//    void insertBatch(List<CourseScheduleStudent> list);
+//
+//    //查询课程对应的老师学员
+//    List<CourseScheduleStudentVo> selectUser();
+//}

+ 2 - 2
cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/dao/CourseScheduleStudentMusicSheetDao.java

@@ -22,10 +22,10 @@ public interface CourseScheduleStudentMusicSheetDao extends BaseMapper<CourseSch
                                                                           @Param("userType") Integer userType);
     //开启原音播放
     void openPlayStatus(@Param("scheduleId") Long scheduleId,
-                       @Param("musicScoreAccompanimentId") Integer musicScoreAccompanimentId,
+                       @Param("musicSheetAccompanimentId") Integer musicSheetAccompanimentId,
                        @Param("userId") Long userId);
     void openAccompanimentPlayStatus(@Param("scheduleId") Long scheduleId,
-                                    @Param("musicScoreAccompanimentId") Integer musicScoreAccompanimentId,
+                                    @Param("musicSheetAccompanimentId") Integer musicSheetAccompanimentId,
                                     @Param("userId") Long userId);
     //关闭伴奏
     void closePlayStatus(@Param("courseId") Long courseId,@Param("userId") Long userId);

+ 5 - 1
cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/dao/CourseScheduleStudentPaymentDao.java

@@ -3,6 +3,7 @@ package com.yonge.cooleshow.biz.dal.dao;
 import com.baomidou.mybatisplus.core.mapper.BaseMapper;
 import com.yonge.cooleshow.biz.dal.entity.CourseScheduleStudentPayment;
 import com.yonge.cooleshow.biz.dal.vo.CourseScheduleStudentPaymentVo;
+import com.yonge.cooleshow.biz.dal.vo.CourseScheduleStudentVo;
 import com.yonge.cooleshow.biz.dal.vo.LiveCourseInfoVo;
 import org.apache.ibatis.annotations.Param;
 
@@ -65,7 +66,7 @@ public interface CourseScheduleStudentPaymentDao extends BaseMapper<CourseSchedu
     String getMusicSheetByCourseIdAndUserId(@Param("courseScheduleId") Long courseScheduleId, @Param("userId") Long userId);
 
     //调整节拍器
-    void adjustPlayMidi(@Param("courseScheduleId") long courseScheduleId, @Param("userId") Long userId, @Param("content") String content);
+    void adjustPlayMidi(@Param("courseScheduleId") long courseScheduleId, @Param("userId") String userId, @Param("content") String content);
 
     //调整伴奏
     void adjustExamSong(@Param("courseScheduleId") long courseScheduleId, @Param("userId") Long userId, @Param("examSongJson") String examSongJson);
@@ -84,5 +85,8 @@ public interface CourseScheduleStudentPaymentDao extends BaseMapper<CourseSchedu
      * @date 2022/5/7 16:44
      */
     void adjustPlayMidiAndMusicSheet(Long scheduleId, Long userId, String content, String musicSheetJson);
+
+    //查询报课学员
+    List<CourseScheduleStudentVo> selectUser();
 }
 

+ 39 - 0
cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/dao/PianoRoomSettingsDao.java

@@ -0,0 +1,39 @@
+package com.yonge.cooleshow.biz.dal.dao;
+
+import java.util.List;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.yonge.cooleshow.biz.dal.dto.search.MemberPriceSettingsSearch;
+import com.yonge.cooleshow.biz.dal.vo.MemberPriceSettingsVo;
+import org.apache.ibatis.annotations.Param;
+import com.yonge.cooleshow.biz.dal.entity.PianoRoomSettings;
+import com.yonge.cooleshow.biz.dal.vo.PianoRoomSettingsVo;
+import com.yonge.cooleshow.biz.dal.dto.search.PianoRoomSettingsSearch;
+
+
+public interface PianoRoomSettingsDao extends BaseMapper<PianoRoomSettings>{
+	/**
+	 * 查询详情
+     * @author liweifan
+     * @date 2022-05-30 15:54:20
+     * @return: com.yonge.cooleshow.biz.dal.vo.PianoRoomSettingsVo
+	 */
+	PianoRoomSettingsVo detail(@Param("id") Long id);
+	/**
+	 * 分页查询
+	 * @author liweifan
+	 * @date 2022-04-25 14:34:49
+	 * @return: com.yonge.cooleshow.biz.dal.vo.MemberPriceSettingsVo
+	 */
+	List<PianoRoomSettingsVo> selectPage(@Param("page") IPage page, @Param("param") PianoRoomSettingsSearch param);
+	/***
+	 * 查询集合
+	 * @author liweifan
+	 * @param: param
+	 * @updateTime 2022/4/25 14:58
+	 * @return: java.util.List<com.yonge.cooleshow.biz.dal.vo.MemberPriceSettingsVo>
+	 */
+	List<PianoRoomSettingsVo> selectList(@Param("param") PianoRoomSettingsSearch param);
+
+}

+ 23 - 0
cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/dao/PianoRoomTimeDao.java

@@ -0,0 +1,23 @@
+package com.yonge.cooleshow.biz.dal.dao;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.yonge.cooleshow.biz.dal.entity.PianoRoomTime;
+import com.yonge.cooleshow.biz.dal.vo.CourseScheduleStudentVo;
+import com.yonge.cooleshow.biz.dal.vo.PianoRoomTimeVo;
+
+import java.util.List;
+
+/**
+ * @Author: cy
+ * @Date: 2022/5/26
+ */
+public interface PianoRoomTimeDao extends BaseMapper<PianoRoomTime> {
+    //查询琴房剩余时长、冻结时长、统计学员人数
+    PianoRoomTimeVo selectRemainTime(Long teacherId);
+
+    //更新结课时间
+    void updateEndTime(List<CourseScheduleStudentVo> list);
+
+    //释放冻结时间
+    void updateBatch(List<PianoRoomTime> list);
+}

+ 0 - 14
cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/dao/PinaoRoomTimeDao.java

@@ -1,14 +0,0 @@
-package com.yonge.cooleshow.biz.dal.dao;
-
-import com.baomidou.mybatisplus.core.mapper.BaseMapper;
-import com.yonge.cooleshow.biz.dal.entity.PinaoRoomTime;
-import com.yonge.cooleshow.biz.dal.vo.PinaoRoomTimeVo;
-
-/**
- * @Author: cy
- * @Date: 2022/5/26
- */
-public interface PinaoRoomTimeDao extends BaseMapper<PinaoRoomTime> {
-    //查询琴房剩余时长、冻结时长、统计学员人数
-    PinaoRoomTimeVo selectRemainTime(Long teacherId);
-}

+ 8 - 0
cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/dao/StudentDao.java

@@ -21,6 +21,14 @@ public interface StudentDao extends BaseMapper<Student> {
      * @return: com.yonge.cooleshow.biz.dal.vo.StudentVo
      */
     StudentVo detail(@Param("userId") Long userId);
+    /***
+     * 查询详情
+     * @author liweifan
+     * @param: phone
+     * @updateTime 2022/3/24 18:14
+     * @return: com.yonge.cooleshow.biz.dal.vo.StudentVo
+     */
+    StudentVo detailByPhone(@Param("phone")String phone);
 
     /**
      * 自定义分页

+ 5 - 1
cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/dao/UserBindingTeacherDao.java

@@ -5,6 +5,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.yonge.cooleshow.biz.dal.entity.UserBindingTeacher;
 import com.yonge.cooleshow.biz.dal.vo.CourseStudentVo;
+import com.yonge.cooleshow.biz.dal.vo.TeacherVo;
 import org.apache.ibatis.annotations.Param;
 
 import java.util.Map;
@@ -15,5 +16,8 @@ import java.util.Map;
  */
 public interface UserBindingTeacherDao extends BaseMapper<UserBindingTeacher> {
     //查询学员
-    IPage<CourseStudentVo> selectStudent(Page<CourseStudentVo> pageInfo,@Param("param") Map<String, Object> param);
+    IPage<CourseStudentVo> selectStudent(Page<CourseStudentVo> pageInfo, @Param("param") Map<String, Object> param);
+    //查询绑定的老师
+    TeacherVo getBindTeacherByPhone(@Param("phone") String phone);
+
 }

+ 3 - 1
cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/dao/VipCardRecordDao.java

@@ -11,6 +11,7 @@ import com.yonge.cooleshow.biz.dal.dto.search.VipCardRecordSearch;
 
 
 public interface VipCardRecordDao extends BaseMapper<VipCardRecord> {
+
     /**
      * 查询详情
      *
@@ -18,7 +19,7 @@ public interface VipCardRecordDao extends BaseMapper<VipCardRecord> {
      * @date 2022-03-30 13:53:51
      * @return: com.yonge.cooleshow.biz.dal.vo.VipCardRecordVo
      */
-    VipCardRecordVo detail(@Param("id") Long id, @Param("userId") Long userId);
+    VipCardRecordVo detail(@Param("orderDetilId") Long orderDetilId, @Param("userId") Long userId);
 
     /**
      * 分页查询
@@ -44,4 +45,5 @@ public interface VipCardRecordDao extends BaseMapper<VipCardRecord> {
      * @return: java.util.List<com.yonge.cooleshow.biz.dal.vo.VipCardRecordVo>
      */
     List<VipCardRecordVo> selectExpireRecord();
+
 }

+ 0 - 9
cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/dto/ImNetworkControlDeviceNotifyMessage.java

@@ -6,7 +6,6 @@ import com.yonge.cooleshow.biz.dal.entity.BaseMessage;
 public class ImNetworkControlDeviceNotifyMessage extends BaseMessage {
 
     private int action;
-//    private String ticket;
     private int type;
     private String opUserId;
     private String opUserName;
@@ -23,14 +22,6 @@ public class ImNetworkControlDeviceNotifyMessage extends BaseMessage {
         this.action = action;
     }
 
-//    public String getTicket() {
-//        return ticket;
-//    }
-//
-//    public void setTicket(String ticket) {
-//        this.ticket = ticket;
-//    }
-
     public int getType() {
         return type;
     }

+ 8 - 8
cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/dto/ImNetworkCustomMessage.java

@@ -8,7 +8,7 @@ public class ImNetworkCustomMessage extends BaseMessage {
     @ApiModelProperty(value = "节拍器开关",required = true)
     private boolean enable;
 
-    @ApiModelProperty(value = "消息类型",required = true)
+    @ApiModelProperty(value = "消息类型(移动端定义,具体的类型不太清楚)",required = true)
     private int customType;
 
     @ApiModelProperty(value = "速度",required = true)
@@ -17,18 +17,18 @@ public class ImNetworkCustomMessage extends BaseMessage {
     @ApiModelProperty(value = "音量",required = true)
     private int playVolume;
 
-    @ApiModelProperty(value = "用户",required = false)
+    @ApiModelProperty(value = "学员编号列表,都还分割",required = true)
     private String userId;
 
-    @ApiModelProperty(value = "课程编号",required = true)
-    private Long courseScheduleId;
+    @ApiModelProperty(value = "房间号(课程编号",required = true)
+    private Long roomId;
 
-    public Long getCourseScheduleId() {
-        return courseScheduleId;
+    public Long getRoomId() {
+        return roomId;
     }
 
-    public void setCourseScheduleId(Long courseScheduleId) {
-        this.courseScheduleId = courseScheduleId;
+    public void setRoomId(Long roomId) {
+        this.roomId = roomId;
     }
 
     public int getPlayVolume() {

+ 10 - 10
cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/dto/ImNetworkDeviceControlDto.java

@@ -23,10 +23,10 @@ public class ImNetworkDeviceControlDto {
 	private Integer status;
 
 	@ApiModelProperty(value = "原音",required = true)
-	private Integer examSongId;
+	private Integer musicSheetId;
 
 	@ApiModelProperty(value = "伴奏",required = true)
-	private Integer musicScoreAccompanimentId;
+	private Integer musicSheetAccompanimentId;
 
 	@ApiModelProperty(value = "伴奏音量",required = true)
 	private Integer soundVolume = 100;
@@ -79,20 +79,20 @@ public class ImNetworkDeviceControlDto {
 		this.status = status;
 	}
 
-	public Integer getExamSongId() {
-		return examSongId;
+	public Integer getMusicSheetId() {
+		return musicSheetId;
 	}
 
-	public void setExamSongId(Integer examSongId) {
-		this.examSongId = examSongId;
+	public void setMusicSheetId(Integer musicSheetId) {
+		this.musicSheetId = musicSheetId;
 	}
 
-	public Integer getMusicScoreAccompanimentId() {
-		return musicScoreAccompanimentId;
+	public Integer getMusicSheetAccompanimentId() {
+		return musicSheetAccompanimentId;
 	}
 
-	public void setMusicScoreAccompanimentId(Integer musicScoreAccompanimentId) {
-		this.musicScoreAccompanimentId = musicScoreAccompanimentId;
+	public void setMusicSheetAccompanimentId(Integer musicSheetAccompanimentId) {
+		this.musicSheetAccompanimentId = musicSheetAccompanimentId;
 	}
 
 	public Integer getSoundVolume() {

+ 5 - 5
cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/dto/ImNetworkDeviceStateChangedMessage.java

@@ -6,7 +6,7 @@ import com.yonge.cooleshow.biz.dal.entity.BaseMessage;
 public class ImNetworkDeviceStateChangedMessage extends BaseMessage {
     private boolean enable;
     private int type;
-    private Integer musicScoreAccompanimentId;
+    private Integer musicSheetAccompanimentId;
     private String userId;
     private String userName;
     private Integer soundVolume = 100;
@@ -32,12 +32,12 @@ public class ImNetworkDeviceStateChangedMessage extends BaseMessage {
         this.type = type;
     }
 
-    public Integer getMusicScoreAccompanimentId() {
-        return musicScoreAccompanimentId;
+    public Integer getMusicSheetAccompanimentId() {
+        return musicSheetAccompanimentId;
     }
 
-    public void setMusicScoreAccompanimentId(Integer musicScoreAccompanimentId) {
-        this.musicScoreAccompanimentId = musicScoreAccompanimentId;
+    public void setMusicSheetAccompanimentId(Integer musicSheetAccompanimentId) {
+        this.musicSheetAccompanimentId = musicSheetAccompanimentId;
     }
 
     public String getUserId() {

+ 24 - 0
cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/dto/PianoRoomSettingsDto.java

@@ -0,0 +1,24 @@
+package com.yonge.cooleshow.biz.dal.dto;
+
+import com.yonge.cooleshow.biz.dal.entity.PianoRoomSettings;
+import io.swagger.annotations.ApiModel;
+import org.apache.commons.beanutils.BeanUtils;
+
+/**
+ * @Author: liweifan
+ * @Data: 2022-05-30 15:54:20
+ */
+@ApiModel(value = "PianoRoomSettingsDto对象", description = "数据传输对象")
+public class PianoRoomSettingsDto extends PianoRoomSettings{
+	private static final long serialVersionUID = 1L;
+    
+    public PianoRoomSettingsDto buildDto(PianoRoomSettings pianoRoomSettings){
+        try {
+            BeanUtils.copyProperties(this,pianoRoomSettings);
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
+        return this;
+    }
+
+}

+ 14 - 0
cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/dto/search/PianoRoomSettingsSearch.java

@@ -0,0 +1,14 @@
+package com.yonge.cooleshow.biz.dal.dto.search;
+
+import com.yonge.toolset.base.page.QueryInfo;
+import io.swagger.annotations.ApiModel;
+
+/**
+ * @Author: liweifan
+ * @Data: 2022-05-30 15:54:20
+ */
+@ApiModel(value = "PianoRoomSettingsSearch对象", description = "查询对象")
+public class PianoRoomSettingsSearch extends QueryInfo{
+	private static final long serialVersionUID = 1L;
+
+}

+ 114 - 0
cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/entity/CourseScheduleRecord.java

@@ -0,0 +1,114 @@
+package com.yonge.cooleshow.biz.dal.entity;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableId;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+
+import java.io.Serializable;
+import java.util.Date;
+
+/**
+ * @Author: cy
+ * @Date: 2022/5/30
+ */
+@ApiModel
+public class CourseScheduleRecord implements Serializable {
+    @TableId(value = "id_", type = IdType.AUTO)
+    @ApiModelProperty(value = "主键")
+    private Long id;
+
+    @TableField("course_id_")
+    @ApiModelProperty(value = "课程id")
+    private Long courseId;
+
+    @TableField("teacher_id_")
+    @ApiModelProperty(value = "老师id")
+    private Long teacherId;
+
+    @TableField("student_count_")
+    @ApiModelProperty(value = "上课学员人数")
+    private Integer studentCount;
+
+    @TableField("consum_time_")
+    @ApiModelProperty(value = "总消耗时长")
+    private Integer consumTime;
+
+    @TableField("end_time_")
+    @ApiModelProperty(value = "结课时间")
+    private Date endTime;
+
+    @TableField("created_time_")
+    @ApiModelProperty(value = "创建时间")
+    private Date createdTime;
+
+    @TableField("updated_time_")
+    @ApiModelProperty(value = "更新时间")
+    private Date updatedTime;
+
+    public Date getEndTime() {
+        return endTime;
+    }
+
+    public void setEndTime(Date endTime) {
+        this.endTime = endTime;
+    }
+
+    public Long getTeacherId() {
+        return teacherId;
+    }
+
+    public void setTeacherId(Long teacherId) {
+        this.teacherId = teacherId;
+    }
+
+    public Long getId() {
+        return id;
+    }
+
+    public void setId(Long id) {
+        this.id = id;
+    }
+
+    public Long getCourseId() {
+        return courseId;
+    }
+
+    public void setCourseId(Long courseId) {
+        this.courseId = courseId;
+    }
+
+    public Integer getStudentCount() {
+        return studentCount;
+    }
+
+    public void setStudentCount(Integer studentCount) {
+        this.studentCount = studentCount;
+    }
+
+    public Integer getConsumTime() {
+        return consumTime;
+    }
+
+    public void setConsumTime(Integer consumTime) {
+        this.consumTime = consumTime;
+    }
+
+    public Date getCreatedTime() {
+        return createdTime;
+    }
+
+    public void setCreatedTime(Date createdTime) {
+        this.createdTime = createdTime;
+    }
+
+    public Date getUpdatedTime() {
+        return updatedTime;
+    }
+
+    public void setUpdatedTime(Date updatedTime) {
+        this.updatedTime = updatedTime;
+    }
+}
+

+ 54 - 54
cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/entity/CourseScheduleStudent.java

@@ -1,54 +1,54 @@
-package com.yonge.cooleshow.biz.dal.entity;
-
-import com.baomidou.mybatisplus.annotation.IdType;
-import com.baomidou.mybatisplus.annotation.TableField;
-import com.baomidou.mybatisplus.annotation.TableId;
-import io.swagger.annotations.ApiModel;
-import io.swagger.annotations.ApiModelProperty;
-
-import java.io.Serializable;
-import java.util.Date;
-
-/**
- * @Author: cy
- * @Date: 2022/5/26
- */
-@ApiModel
-public class CourseScheduleStudent implements Serializable {
-    @TableId(value = "id_", type = IdType.AUTO)
-    @ApiModelProperty(value = "主键")
-    private Long id;
-
-    @TableField("course_id_")
-    @ApiModelProperty(value = "课程id")
-    private Long courseId;
-
-    @TableField("student_id_")
-    @ApiModelProperty(value = "学生id")
-    private Long studentId;
-
-    public Long getId() {
-        return id;
-    }
-
-    public void setId(Long id) {
-        this.id = id;
-    }
-
-    public Long getCourseId() {
-        return courseId;
-    }
-
-    public void setCourseId(Long courseId) {
-        this.courseId = courseId;
-    }
-
-    public Long getStudentId() {
-        return studentId;
-    }
-
-    public void setStudentId(Long studentId) {
-        this.studentId = studentId;
-    }
-}
-
+//package com.yonge.cooleshow.biz.dal.entity;
+//
+//import com.baomidou.mybatisplus.annotation.IdType;
+//import com.baomidou.mybatisplus.annotation.TableField;
+//import com.baomidou.mybatisplus.annotation.TableId;
+//import io.swagger.annotations.ApiModel;
+//import io.swagger.annotations.ApiModelProperty;
+//
+//import java.io.Serializable;
+//import java.util.Date;
+//
+///**
+// * @Author: cy
+// * @Date: 2022/5/26
+// */
+//@ApiModel
+//public class CourseScheduleStudent implements Serializable {
+//    @TableId(value = "id_", type = IdType.AUTO)
+//    @ApiModelProperty(value = "主键")
+//    private Long id;
+//
+//    @TableField("course_id_")
+//    @ApiModelProperty(value = "课程id")
+//    private Long courseId;
+//
+//    @TableField("student_id_")
+//    @ApiModelProperty(value = "学生id")
+//    private Long studentId;
+//
+//    public Long getId() {
+//        return id;
+//    }
+//
+//    public void setId(Long id) {
+//        this.id = id;
+//    }
+//
+//    public Long getCourseId() {
+//        return courseId;
+//    }
+//
+//    public void setCourseId(Long courseId) {
+//        this.courseId = courseId;
+//    }
+//
+//    public Long getStudentId() {
+//        return studentId;
+//    }
+//
+//    public void setStudentId(Long studentId) {
+//        this.studentId = studentId;
+//    }
+//}
+//

+ 5 - 5
cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/entity/CourseScheduleStudentMusicSheet.java

@@ -33,7 +33,7 @@ public class CourseScheduleStudentMusicSheet implements Serializable {
 
     @TableField("down_status_")
     @ApiModelProperty(value = "伴奏下载状态(1下载成功0下载中2下载失败)")
-    private Integer downStatus;
+    private Integer downStatus = 0;
 
     @TableField("music_sheet_accompaniment_id_")
     @ApiModelProperty(value = "伴奏编号")
@@ -41,19 +41,19 @@ public class CourseScheduleStudentMusicSheet implements Serializable {
 
     @TableField("play_status_")
     @ApiModelProperty(value = "原音播放状态(1是0否)")
-    private Integer playStatus;
+    private Integer playStatus = 0;
 
     @TableField("accompaniment_play_status_")
     @ApiModelProperty(value = "伴奏播放状态")
-    private Integer accompanimentPlayStatus;
+    private Integer accompanimentPlayStatus = 0;
 
     @TableField("user_type_")
     @ApiModelProperty(value = "0学生1老师")
-    private Integer userType;
+    private Integer userType = 0;
 
     @TableField("speed_")
     @ApiModelProperty(value = "播放速度")
-    private Integer speed;
+    private Integer speed = 100;
 
     @TableField("create_time_")
     @ApiModelProperty(value = "${column.comment}")

+ 123 - 0
cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/entity/PianoRoomSettings.java

@@ -0,0 +1,123 @@
+package com.yonge.cooleshow.biz.dal.entity;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+
+import java.io.Serializable;
+import java.util.Date;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import org.springframework.format.annotation.DateTimeFormat;
+import java.math.BigDecimal;
+
+@TableName("piano_room_settings")
+@ApiModel(value = "PianoRoomSettings对象", description = "琴房时长价格配置")
+public class PianoRoomSettings implements Serializable {
+	private static final long serialVersionUID = 1L;
+    @TableId(value = "id_", type = IdType.AUTO)
+    private Long id;
+    @ApiModelProperty("时长(分) ")
+	@TableField(value = "times_")
+    private Integer times;
+    @ApiModelProperty("销售价 ")
+	@TableField(value = "sale_price_")
+    private BigDecimal salePrice;
+    @ApiModelProperty("原价 ")
+	@TableField(value = "original_price_")
+    private BigDecimal originalPrice;
+    @ApiModelProperty("描述 ")
+	@TableField(value = "description_")
+    private String description;
+    @ApiModelProperty("创建人 ")
+	@TableField(value = "create_by_")
+    private Long createBy;
+    @ApiModelProperty("创建时间 ")
+	@TableField(value = "create_time_")
+    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
+    private Date createTime;
+    @ApiModelProperty("更新人 ")
+	@TableField(value = "update_by_")
+    private Long updateBy;
+    @ApiModelProperty("更新时间 ")
+	@TableField(value = "update_time_")
+    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
+    private Date updateTime;
+
+	public Long getId() {
+        return id;
+    }
+
+    public void setId(Long id) {
+        this.id = id;
+    }
+    
+	public Integer getTimes() {
+        return times;
+    }
+
+    public void setTimes(Integer times) {
+        this.times = times;
+    }
+    
+	public BigDecimal getSalePrice() {
+        return salePrice;
+    }
+
+    public void setSalePrice(BigDecimal salePrice) {
+        this.salePrice = salePrice;
+    }
+    
+	public BigDecimal getOriginalPrice() {
+        return originalPrice;
+    }
+
+    public void setOriginalPrice(BigDecimal originalPrice) {
+        this.originalPrice = originalPrice;
+    }
+    
+	public String getDescription() {
+        return description;
+    }
+
+    public void setDescription(String description) {
+        this.description = description;
+    }
+    
+	public Long getCreateBy() {
+        return createBy;
+    }
+
+    public void setCreateBy(Long createBy) {
+        this.createBy = createBy;
+    }
+    
+	public Date getCreateTime() {
+        return createTime;
+    }
+
+    public void setCreateTime(Date createTime) {
+        this.createTime = createTime;
+    }
+    
+	public Long getUpdateBy() {
+        return updateBy;
+    }
+
+    public void setUpdateBy(Long updateBy) {
+        this.updateBy = updateBy;
+    }
+    
+	public Date getUpdateTime() {
+        return updateTime;
+    }
+
+    public void setUpdateTime(Date updateTime) {
+        this.updateTime = updateTime;
+    }
+    
+}

+ 1 - 1
cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/entity/PinaoRoomTime.java → cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/entity/PianoRoomTime.java

@@ -14,7 +14,7 @@ import java.util.Date;
  * @Date: 2022/5/26
  */
 @ApiModel
-public class PinaoRoomTime implements Serializable {
+public class PianoRoomTime implements Serializable {
     @TableId(value = "id_", type = IdType.AUTO)
     @ApiModelProperty(value = "主键")
     private Long id;

+ 2 - 1
cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/enums/GoodTypeEnum.java

@@ -14,7 +14,8 @@ public enum GoodTypeEnum implements BaseEnum<String, GoodTypeEnum> {
     PRACTICE("陪练课购买"),
     LIVE("直播课购买"),
     VIDEO("视频课购买"),
-    MUSIC("单曲点播");
+    MUSIC("单曲点播"),
+    PINAO_ROOM("琴房时长");
     @EnumValue
     private String code;
     private String msg;

+ 5 - 1
cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/service/CourseScheduleService.java

@@ -238,10 +238,14 @@ public interface CourseScheduleService extends IService<CourseSchedule> {
 
     void teacherSalaryTask();
 
-    PinaoRoomTimeVo selectRemainTime(Long teacherId);
+    PianoRoomTimeVo selectRemainTime(Long teacherId);
 
     PageInfo<CourseStudentVo> selectStudent(Map<String, Object> param);
 
     void arrangeCourse(ArrangeCourseVo arrangeCourseVo, Long teacherId);
+
+    Map<String, Object> selectConsumeTime(String month, Long teacherId);
+
+    PageInfo<CourseScheduleRecordVo> selectConsumeTimeList(Map<String, Object> param);
 }
 

+ 33 - 0
cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/service/PianoRoomSettingsService.java

@@ -0,0 +1,33 @@
+package com.yonge.cooleshow.biz.dal.service;
+
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.service.IService;
+import com.yonge.cooleshow.biz.dal.vo.PianoRoomSettingsVo;
+import com.yonge.cooleshow.biz.dal.dto.search.PianoRoomSettingsSearch;
+import com.yonge.cooleshow.biz.dal.entity.PianoRoomSettings;
+
+import java.util.List;
+
+/**
+ *  服务类
+ * @author liweifan
+ * @date 2022-05-30
+ */
+public interface PianoRoomSettingsService extends IService<PianoRoomSettings>  {
+
+	/**
+     * 查询详情
+     * @author liweifan
+ 	 * @date 2022-05-30
+     */
+	PianoRoomSettingsVo detail(Long id);
+
+    /**
+     * 分页查询
+     * @author liweifan
+ 	 * @date 2022-05-30
+     */
+    IPage<PianoRoomSettingsVo> selectPage(IPage<PianoRoomSettingsVo> page, PianoRoomSettingsSearch query);
+
+	List<PianoRoomSettingsVo> selectList(PianoRoomSettingsSearch query);
+}

+ 2 - 2
cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/service/PinaoRoomTimeService.java → cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/service/PianoRoomTimeService.java

@@ -1,12 +1,12 @@
 package com.yonge.cooleshow.biz.dal.service;
 
 import com.baomidou.mybatisplus.extension.service.IService;
-import com.yonge.cooleshow.biz.dal.entity.PinaoRoomTime;
+import com.yonge.cooleshow.biz.dal.entity.PianoRoomTime;
 
 /**
  * @Author: cy
  * @Date: 2022/5/26
  */
-public interface PinaoRoomTimeService extends IService<PinaoRoomTime> {
+public interface PianoRoomTimeService extends IService<PianoRoomTime> {
 }
 

+ 17 - 4
cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/service/StudentService.java

@@ -6,10 +6,8 @@ import com.yonge.cooleshow.auth.api.entity.SysUser;
 import com.yonge.cooleshow.biz.dal.dto.search.StudentSearch;
 import com.yonge.cooleshow.biz.dal.entity.Student;
 import com.yonge.cooleshow.biz.dal.entity.Subject;
-import com.yonge.cooleshow.biz.dal.vo.MyFollow;
-import com.yonge.cooleshow.biz.dal.vo.StudentHomeVo;
-import com.yonge.cooleshow.biz.dal.vo.StudentTotalVo;
-import com.yonge.cooleshow.biz.dal.vo.StudentVo;
+import com.yonge.cooleshow.biz.dal.vo.*;
+import com.yonge.cooleshow.common.entity.HttpResponseResult;
 
 import java.util.List;
 import java.util.Map;
@@ -31,6 +29,13 @@ public interface StudentService extends IService<Student> {
     StudentVo detail(Long userId);
 
     /**
+     * 查询学员详情
+     * @param phone
+     * @return
+     */
+    StudentVo detailByPhone(String phone);
+
+    /**
      * 自定义分页
      *
      * @author liweifan
@@ -75,4 +80,12 @@ public interface StudentService extends IService<Student> {
      */
     IPage<MyFollow> queryMyFollow(IPage<MyFollow> page, Long studentId);
 
+    /**
+     * 学院绑定老师
+     * @param phone
+     * @param userId
+     * @param isUpdate
+     * @return
+     */
+    HttpResponseResult<Map<String,TeacherVo>> bindTeacher(String phone, Long userId, Boolean isUpdate);
 }

+ 24 - 17
cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/service/VipCardRecordService.java

@@ -12,34 +12,41 @@ import com.yonge.cooleshow.common.entity.HttpResponseResult;
 
 /**
  * 购买会员卡记录表 服务类
+ *
  * @author liweifan
  * @date 2022-03-30
  */
-public interface VipCardRecordService extends IService<VipCardRecord>  {
-	/**
-	 * 查询详情
-	 * @author liweifan
-	 * @date 2022-03-30
-	 */
-	VipCardRecordVo detail(Long id);
-	/**
+public interface VipCardRecordService extends IService<VipCardRecord> {
+    /**
+     * 查询详情
+     *
+     * @author liweifan
+     * @date 2022-03-30
+     */
+    VipCardRecordVo detail(Long orderDetilId);
+
+    /**
      * 查询详情
+     *
      * @author liweifan
- 	 * @date 2022-03-30
+     * @date 2022-03-30
      */
-	VipCardRecordVo detail(Long id,Long userId);
+    VipCardRecordVo detail(Long orderDetilId, Long userId);
 
     /**
      * 分页查询
+     *
      * @author liweifan
- 	 * @date 2022-03-30
+     * @date 2022-03-30
      */
     IPage<VipCardRecordVo> selectPage(IPage<VipCardRecordVo> page, VipCardRecordSearch query);
 
-	/***
-	 * 会员卡到期提醒
-	 * @author liweifan
-	 * @updateTime 2022/5/5 19:28
-	 */
-	void pollExpireMsg();
+    /***
+     * 会员卡到期提醒
+     * @author liweifan
+     * @updateTime 2022/5/5 19:28
+     */
+    void pollExpireMsg();
+
+
 }

+ 108 - 46
cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/service/impl/CourseScheduleServiceImpl.java

@@ -95,11 +95,13 @@ public class CourseScheduleServiceImpl extends ServiceImpl<CourseScheduleDao, Co
     @Autowired
     private HolidaysFestivalsDao holidaysFestivalsDao;
     @Autowired
-    private PinaoRoomTimeDao pinaoRoomTimeDao;
+    private PianoRoomTimeDao pianoRoomTimeDao;
     @Autowired
     private UserBindingTeacherDao userBindingTeacherDao;
+    //    @Autowired
+//    private CourseScheduleStudentDao courseScheduleStudentDao;
     @Autowired
-    private CourseScheduleStudentDao courseScheduleStudentDao;
+    private CourseScheduleRecordDao recordDao;
 
     @Override
     public CourseScheduleDao getDao() {
@@ -1115,23 +1117,14 @@ public class CourseScheduleServiceImpl extends ServiceImpl<CourseScheduleDao, Co
             throw new BizException("课程无人购买");
         }
 
+        CourseTimeEntity timeEntity = new CourseTimeEntity();
+        timeEntity.setStartTime(startTime);
+        timeEntity.setEndTime(endTime);
+        List<CourseTimeEntity> timeList=Arrays.asList(timeEntity);
         //校验老师课程是否冲突
-        List<CourseSchedule> scheduleList = this.list(Wrappers.<CourseSchedule>lambdaQuery()
-                .eq(CourseSchedule::getTeacherId, teacherId)
-                .in(CourseSchedule::getStatus, Lists.newArrayList(CourseScheduleEnum.NOT_START.getCode(), CourseScheduleEnum.ING.getCode())));
-        for (CourseSchedule courseSchedule : scheduleList) {
-            if (inInterSection(startTime, endTime, courseSchedule.getStartTime(), courseSchedule.getEndTime(), true)) {
-                throw new BizException("老师排课冲突,课程id:{}", courseSchedule.getId());
-            }
-        }
-
+        this.batchCheckTeacherCourseTime(teacherId, timeList, CourseTimeEntity::getStartTime, CourseTimeEntity::getEndTime);
         //校验学生课程是否冲突
-        List<CourseSchedule> studentList = baseMapper.selectSchedule(courseId);
-        for (CourseSchedule courseSchedule : studentList) {
-            if (inInterSection(startTime, endTime, courseSchedule.getStartTime(), courseSchedule.getEndTime(), true)) {
-                throw new BizException("学生排课冲突,课程id:{}", courseSchedule.getId());
-            }
-        }
+        this.batchCheckTeacherCourseTime(studentPayment.getUserId(), timeList, CourseTimeEntity::getStartTime, CourseTimeEntity::getEndTime);
 
         baseMapper.courseAdjust(adjustVo);
     }
@@ -1489,25 +1482,72 @@ public class CourseScheduleServiceImpl extends ServiceImpl<CourseScheduleDao, Co
      */
     @Transactional(rollbackFor = Exception.class)
     public void scheduleTask() {
-        //更新课程开始状态(开课时间 ≤ NOW ≤ 结束时间)
+        //课程开始(开课时间 ≤ NOW ≤ 结束时间)
         List<CourseSchedule> courseStart = baseMapper.selectList(Wrappers.<CourseSchedule>lambdaQuery()
                 .eq(CourseSchedule::getLock, 0)
-                .eq(CourseSchedule::getType, CourseScheduleEnum.NOT_START)
+                .eq(CourseSchedule::getStatus, CourseScheduleEnum.NOT_START)
                 .le(CourseSchedule::getStartTime, new Date())
                 .ge(CourseSchedule::getEndTime, new Date()));
         if (CollectionUtils.isNotEmpty(courseStart)) {
+            //课程状态更新为ING
             baseMapper.updateStartTime(courseStart);
         }
 
-        //更新课程结束状态(NOW ≥ 结束时间)
-        List<String> typeList = Arrays.asList(CourseScheduleEnum.ING.getCode(), CourseScheduleEnum.NOT_START.getCode());
-        List<CourseSchedule> courseEnd = baseMapper.selectList(Wrappers.<CourseSchedule>lambdaQuery()
-                .in(CourseSchedule::getType, typeList)
-                .eq(CourseSchedule::getLock, 0)
-                .le(CourseSchedule::getEndTime, new Date()));
-        if (CollectionUtils.isNotEmpty(courseEnd)) {
-            baseMapper.updateEndTime(courseEnd);
-            //TODO 根据老师&学生id 更新绑定学员结课时间
+        //课程结束(NOW ≥ 结束时间)
+        List<CourseScheduleStudentVo> userList = paymentDao.selectUser();
+        if (CollectionUtils.isNotEmpty(userList)) {
+            //更新学生最近结课时间
+            List<CourseScheduleStudentVo> pianoUserList = userList.stream().filter((CourseScheduleStudentVo s) -> s.getType().equals(CourseScheduleEnum.PIANO_ROOM_CLASS.getCode())).collect(Collectors.toList());
+            if (CollectionUtils.isNotEmpty(pianoUserList)) {
+                pianoRoomTimeDao.updateEndTime(pianoUserList);
+            }
+
+            //统计琴房课消耗时长
+            List<CourseScheduleRecord> recordList = recordDao.sumCourseTime();
+            if (CollectionUtils.isNotEmpty(recordList)) {
+                //时长消费记录
+                recordDao.insertBatch(recordList);
+
+                //释放冻结课时
+                List<PianoRoomTime> roomTimeList = new ArrayList<>();
+                Map<Long, List<CourseScheduleRecord>> collect = recordList.stream().collect(Collectors.groupingBy(CourseScheduleRecord::getTeacherId, Collectors.toList()));
+                collect.forEach((key, list) -> {
+                    PianoRoomTime pianoRoomTime = pianoRoomTimeDao.selectOne(Wrappers.<PianoRoomTime>lambdaQuery().eq(PianoRoomTime::getTeacherId, key));
+                    Long frozenTime = pianoRoomTime.getFrozenTime();
+
+                    PianoRoomTime roomTime = new PianoRoomTime();
+                    roomTime.setTeacherId(key);
+                    roomTime.setFrozenTime(frozenTime - Long.valueOf(list.stream().mapToInt(CourseScheduleRecord::getConsumTime).sum()));
+                    roomTimeList.add(roomTime);
+                });
+                pianoRoomTimeDao.updateBatch(roomTimeList);
+            }
+
+            //课程状态更新为COMPLETE
+            baseMapper.updateEndTime(userList);
+        }
+
+        //查完完成的课程
+        List<CourseCompleteVo> completeList = baseMapper.selectComplete();
+        if (CollectionUtils.isNotEmpty(completeList)) {
+            List<Long> gids = completeList.stream().map(CourseCompleteVo::getCourseGroupId).collect(Collectors.toList());
+            List<CourseGroup> courseGroups = courseGroupService.getDao().selectList(Wrappers.<CourseGroup>lambdaQuery().in(CourseGroup::getId, gids));
+            if (CollectionUtils.isNotEmpty(courseGroups)) {
+                List<Long> ids = new ArrayList<>();
+                for (CourseGroup group : courseGroups) {
+                    for (CourseCompleteVo complete : completeList) {
+                        Integer courseNum = group.getCourseNum();
+                        Integer completeCount = complete.getCourseCount();
+                        if (courseNum.equals(completeCount)) {
+                            ids.add(complete.getCourseGroupId());
+                        }
+                    }
+                }
+                if (CollectionUtils.isNotEmpty(ids)) {
+                    //同步课程组状态
+                    courseGroupService.getDao().updateBatch(ids);
+                }
+            }
         }
     }
 
@@ -1533,8 +1573,8 @@ public class CourseScheduleServiceImpl extends ServiceImpl<CourseScheduleDao, Co
      * @Author: cy
      * @Date: 2022/5/27
      */
-    public PinaoRoomTimeVo selectRemainTime(Long teacherId) {
-        return pinaoRoomTimeDao.selectRemainTime(teacherId);
+    public PianoRoomTimeVo selectRemainTime(Long teacherId) {
+        return pianoRoomTimeDao.selectRemainTime(teacherId);
     }
 
     /**
@@ -1545,7 +1585,7 @@ public class CourseScheduleServiceImpl extends ServiceImpl<CourseScheduleDao, Co
     public PageInfo<CourseStudentVo> selectStudent(Map<String, Object> param) {
         Integer courseId = (Integer) param.get("courseId");
         if (courseId != null) {
-            List<CourseScheduleStudent> studentList = courseScheduleStudentDao.selectList(Wrappers.<CourseScheduleStudent>lambdaQuery().eq(CourseScheduleStudent::getCourseId, courseId));
+            List<CourseScheduleStudentPayment> studentList = paymentDao.selectList(Wrappers.<CourseScheduleStudentPayment>lambdaQuery().eq(CourseScheduleStudentPayment::getCourseId, courseId));
             param.put("studentList", studentList);//根据课程id查询报课学员
         }
         return PageUtil.pageInfo(userBindingTeacherDao.selectStudent(PageUtil.getPageInfo(param), param));
@@ -1589,19 +1629,19 @@ public class CourseScheduleServiceImpl extends ServiceImpl<CourseScheduleDao, Co
         }
 
         //校验时长
-        PinaoRoomTime pinaoRoomTime = pinaoRoomTimeDao.selectOne(Wrappers.<PinaoRoomTime>lambdaQuery().eq(PinaoRoomTime::getTeacherId, teacherId));
-        if (pinaoRoomTime == null) {
+        PianoRoomTime pianoRoomTime = pianoRoomTimeDao.selectOne(Wrappers.<PianoRoomTime>lambdaQuery().eq(PianoRoomTime::getTeacherId, teacherId));
+        if (pianoRoomTime == null) {
             throw new BizException("未查询到老师剩余时长");
         }
-        Long remainTime = pinaoRoomTime.getRemainTime();
-        Long frozenTime = pinaoRoomTime.getFrozenTime();
+        Long remainTime = pianoRoomTime.getRemainTime();
+        Long frozenTime = pianoRoomTime.getFrozenTime();
         if (consumTime > remainTime) {
             throw new BizException("剩余时长不足");
         }
 
         //校验学员是否绑定
         List<UserBindingTeacher> bindingTeachers = userBindingTeacherDao.selectList(Wrappers.<UserBindingTeacher>lambdaQuery().eq(UserBindingTeacher::getTeacherId, teacherId));
-        if (com.baomidou.mybatisplus.core.toolkit.CollectionUtils.isEmpty(bindingTeachers)) {
+        if (CollectionUtils.isEmpty(bindingTeachers)) {
             throw new BizException("无绑定学员");
         }
         List<Long> studentList = bindingTeachers.stream().map(UserBindingTeacher::getStudentId).collect(Collectors.toList());
@@ -1642,7 +1682,7 @@ public class CourseScheduleServiceImpl extends ServiceImpl<CourseScheduleDao, Co
         courseGroup.setSubjectId(arrangeCourseVo.getSubjectId());
         courseGroup.setSingleCourseMinutes(singleClssTime);
         courseGroup.setCourseNum(classNum);
-        courseGroup.setStatus(CourseGroupEnum.NOT_SALE.getCode());
+        courseGroup.setStatus(CourseGroupEnum.ING.getCode());
         courseGroup.setCreatedBy(teacherId);
         courseGroupService.getDao().insert(courseGroup);
 
@@ -1664,20 +1704,42 @@ public class CourseScheduleServiceImpl extends ServiceImpl<CourseScheduleDao, Co
             baseMapper.insert(schedule);
 
             //添加course_schedule_student
-            List<CourseScheduleStudent> list = new ArrayList<>();
             for (Long studentId : studentIds) {
-                CourseScheduleStudent teacherTime = new CourseScheduleStudent();
-                teacherTime.setStudentId(studentId);
-                teacherTime.setCourseId(schedule.getId());
-                list.add(teacherTime);
+                CourseScheduleStudentPayment payment = new CourseScheduleStudentPayment();
+                payment.setCourseGroupId(courseGroup.getId());
+                payment.setCourseId(schedule.getId());
+                payment.setUserId(studentId);
+                payment.setCourseType(CourseScheduleEnum.PIANO_ROOM_CLASS.getCode());
+                courseScheduleStudentPaymentService.save(payment);
             }
-            courseScheduleStudentDao.insertBatch(list);
         }
 
-        //扣减pinao_room_time
-        PinaoRoomTime roomTime = new PinaoRoomTime();
+        //扣减piano_room_time
+        PianoRoomTime roomTime = new PianoRoomTime();
         roomTime.setRemainTime(remainTime - consumTime);
         roomTime.setFrozenTime(frozenTime + consumTime);
-        pinaoRoomTimeDao.update(roomTime, Wrappers.<PinaoRoomTime>lambdaQuery().eq(PinaoRoomTime::getTeacherId, teacherId));
+        pianoRoomTimeDao.update(roomTime, Wrappers.<PianoRoomTime>lambdaQuery().eq(PianoRoomTime::getTeacherId, teacherId));
+    }
+
+    /**
+     * @Description: 根据月份查询消耗记录
+     * @Author: cy
+     * @Date: 2022/5/30
+     */
+    public Map<String, Object> selectConsumeTime(String month, Long teacherId) {
+        Map<String, Object> map = new HashMap();
+        map.put("consumeTime", recordDao.countTimeByTeacherId(teacherId, month));
+        return map;
+    }
+
+    /**
+     * @Description: 消耗时长详情
+     * @Author: cy
+     * @Date: 2022/5/30
+     */
+    @Override
+    public PageInfo<CourseScheduleRecordVo> selectConsumeTimeList(Map<String, Object> param) {
+        param.put("type", CourseScheduleEnum.PIANO_ROOM_CLASS.getCode());
+        return PageUtil.pageInfo(recordDao.selectConsumeTimeList(PageUtil.getPageInfo(param), param));
     }
 }

+ 52 - 41
cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/service/impl/ImNetworkRoomServiceImpl.java

@@ -1,7 +1,6 @@
 package com.yonge.cooleshow.biz.dal.service.impl;
 
 import com.alibaba.fastjson.JSON;
-import com.baomidou.mybatisplus.extension.exceptions.ApiException;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import com.yonge.cooleshow.auth.api.client.SysUserFeignService;
 import com.yonge.cooleshow.auth.api.entity.SysUser;
@@ -29,8 +28,6 @@ import javax.annotation.Resource;
 import java.util.*;
 import java.util.stream.Collectors;
 
-import static org.bouncycastle.asn1.cms.CMSObjectIdentifiers.data;
-
 /**
  * 网络教室房间(ImNetworkRoom)表服务实现类
  *
@@ -72,11 +69,12 @@ public class ImNetworkRoomServiceImpl extends ServiceImpl<ImNetworkRoomDao, ImNe
     @Transactional(rollbackFor = Exception.class)
     public HttpResponseResult<ImNetworkRoomResult> joinRoom(Long courseScheduleId, UserRoleEnum userRole) throws Exception {
         log.info("joinRoom params:courseScheduleId:{},userRole:{}",courseScheduleId,userRole);
-        SysUser user = Optional.ofNullable(sysUserFeignService.queryUserInfo()).
+        Long userId = Optional.ofNullable(sysUserFeignService.queryUserInfo()).
+                map(SysUser::getId).
                 orElseThrow(()-> new BizException("请登录"));
         CourseSchedule courseSchedule = Optional.ofNullable(courseScheduleService.getById(courseScheduleId)).
                 orElseThrow(()->new BizException("房间信息不存在"));
-        BasicUserInfo sysUser = Optional.ofNullable(teacherDao.getBasicUserInfo(user.getId())).
+        BasicUserInfo sysUser = Optional.ofNullable(teacherDao.getBasicUserInfo(userId)).
                 orElseThrow(()-> new BizException("用户信息不存在"));
         Date now = new Date();
         courseSchedule.setUpdatedTime(now);
@@ -125,12 +123,13 @@ public class ImNetworkRoomServiceImpl extends ServiceImpl<ImNetworkRoomDao, ImNe
     @Transactional(rollbackFor = Exception.class)
     public void joinRoomSuccess(String roomId,Long userId) throws Exception {
         log.info("joinRoomSuccess: roomId={}, userId={}", roomId, userId);
-        CourseSchedule courseSchedule = Optional.ofNullable(courseScheduleService.getById(roomId)).
+        Long teacherId = Optional.ofNullable(courseScheduleService.getById(roomId)).
+                map(CourseSchedule::getTeacherId).
                 orElseThrow(()->new BizException("房间信息不存在"));
         BasicUserInfo sysUser = Optional.ofNullable(teacherDao.getBasicUserInfo(userId)).
                 orElseThrow(()-> new BizException("用户信息不存在"));
         UserRoleEnum userRole = UserRoleEnum.STUDENT;
-        if(Objects.equals(courseSchedule.getTeacherId(),userId)){
+        if(Objects.equals(teacherId,userId)){
             userRole = UserRoleEnum.TEACHER;
         }
         Date now = new Date();
@@ -153,9 +152,9 @@ public class ImNetworkRoomServiceImpl extends ServiceImpl<ImNetworkRoomDao, ImNe
     @Override
     @Transactional(rollbackFor = Exception.class)
     public void joinRoomFailure(String roomId) {
-        SysUser sysUser = Optional.ofNullable(sysUserFeignService.queryUserInfo()).
+        Long userId = Optional.ofNullable(sysUserFeignService.queryUserInfo()).
+                map(SysUser::getId).
                 orElseThrow(()-> new BizException("请登录"));
-        Long userId = sysUser.getId();
         log.info("joinRoomFailure: roomId={}, userId={}", roomId, userId);
         imNetworkRoomMemberService.getDao().delByRidAndUid(roomId, userId);
     }
@@ -163,9 +162,9 @@ public class ImNetworkRoomServiceImpl extends ServiceImpl<ImNetworkRoomDao, ImNe
     @Override
     @Transactional(rollbackFor = Exception.class)
     public void leaveRoom(String roomId,UserRoleEnum userRole) throws Exception {
-        SysUser sysUser = Optional.ofNullable(sysUserFeignService.queryUserInfo()).
+        Long userId = Optional.ofNullable(sysUserFeignService.queryUserInfo()).
+                map(SysUser::getId).
                 orElseThrow(()-> new BizException("请登录"));
-        Long userId = sysUser.getId();
         log.info("leaveRoom: roomId={}, userId={}", roomId, userId);
         long courseScheduleId = Long.parseLong(roomId);
         if (userRole == UserRoleEnum.TEACHER){
@@ -227,21 +226,22 @@ public class ImNetworkRoomServiceImpl extends ServiceImpl<ImNetworkRoomDao, ImNe
     @Override
     @Transactional(rollbackFor = Exception.class)
     public void sendImPlayMidiMessage(ImNetworkCustomMessage customMessage) throws Exception {
-        SysUser sysUser = Optional.ofNullable(sysUserFeignService.queryUserInfo()).
+        Long userId = Optional.ofNullable(sysUserFeignService.queryUserInfo()).
+                map(SysUser::getId).
                 orElseThrow(()-> new BizException("请登录"));
-        Long userId = sysUser.getId();
-        Long courseScheduleId = customMessage.getCourseScheduleId();
-        log.info("sendImPlayMidiMessage: roomId={}, userId={}", courseScheduleId, userId);
+        Long roomId = customMessage.getRoomId();
+        log.info("sendImPlayMidiMessage: roomId={}, userId={}", roomId, userId);
         ImNetworkMetronomeMessage displayMessage = new ImNetworkMetronomeMessage(customMessage);
-        imHelper.publishMessage(userId.toString(), courseScheduleId.toString(), displayMessage, 0);
+        imHelper.publishMessage(userId.toString(), roomId.toString(), displayMessage, 0);
         //记录节拍器信息
-        courseScheduleStudentPaymentService.getDao().adjustPlayMidi(courseScheduleId,userId,customMessage.toString());
+        courseScheduleStudentPaymentService.getDao().adjustPlayMidi(roomId,customMessage.getUserId(),customMessage.toString());
     }
 
     @Override
     @Transactional(rollbackFor = Exception.class)
     public void pushDownloadMusicSheetMsg(String roomId,Long accompanimentId) throws Exception {
-        SysUser sysUser = Optional.ofNullable(sysUserFeignService.queryUserInfo()).
+        Long userId = Optional.ofNullable(sysUserFeignService.queryUserInfo()).
+                map(SysUser::getId).
                 orElseThrow(()-> new BizException("请登录"));
         Long courseScheduleId = Long.parseLong(roomId);
         List<CourseScheduleStudentMusicSheetResult> scheduleStudentMusicSheetResults = courseScheduleStudentMusicSheetService.getDao().
@@ -264,21 +264,22 @@ public class ImNetworkRoomServiceImpl extends ServiceImpl<ImNetworkRoomDao, ImNe
             musicSheet.setMusicSheetAccompanimentId(accompanimentId);
             musicSheet.setSpeed(accompaniment.getSpeed());
             musicSheet.setCourseScheduleId(courseScheduleId);
-            musicSheet.setUserId(sysUser.getId());
+            musicSheet.setUserId(userId);
             musicSheet.setUserType(1);
             scheduleStudentMusicSheetResults.add(musicSheet);
             courseScheduleStudentMusicSheetService.getDao().batchInsert(scheduleStudentMusicSheetResults);
         }
         ImNetworkMusicSheetDownloadMessage msg = new ImNetworkMusicSheetDownloadMessage(
                 JSON.parseObject(JSON.toJSONString(accompaniment), ImNetworkMusicSheetDownloadMessageContent.class));
-        imHelper.publishMessage(sysUser.getId().toString(), roomId, msg, 0);
+        imHelper.publishMessage(userId.toString(), roomId, msg, 0);
     }
 
     @Override
     @Transactional(rollbackFor = Exception.class)
     public void display(ImNetworkDisplayDataDto displayData) throws Exception {
         log.info("display in data = {}", displayData);
-        SysUser sysUser = Optional.ofNullable(sysUserFeignService.queryUserInfo()).
+        Long userId = Optional.ofNullable(sysUserFeignService.queryUserInfo()).
+                map(SysUser::getId).
                 orElseThrow(()-> new BizException("请登录"));
 
         StringBuffer display = new StringBuffer("display://type=").append(displayData.getType().ordinal()).append("?userId=");
@@ -288,22 +289,24 @@ public class ImNetworkRoomServiceImpl extends ServiceImpl<ImNetworkRoomDao, ImNe
                 display = new StringBuffer();
                 break;
             case TEACHER:
-                CourseSchedule courseSchedule = courseScheduleService.getById(displayData.getRoomId());
-                display.append(courseSchedule.getTeacherId()).append("?uri=");
+                Long teacherId = Optional.ofNullable(courseScheduleService.getById(displayData.getRoomId())).
+                        map(CourseSchedule::getTeacherId).
+                        orElseThrow(()->new BizException("房间信息不存在"));
+                display.append(teacherId).append("?uri=");
                 break;
             case SCREEN:
-                display.append(sysUser.getId()).append("?uri=");
+                display.append(userId).append("?uri=");
                 break;
             case STUDENT:
                 display.append(displayData.getUserId()).append("?uri=").append(displayData.getUri());
                 break;
             default:
-                display.append(sysUser.getId()).append("?uri=").append(displayData.getUri());
+                display.append(userId).append("?uri=").append(displayData.getUri());
                 break;
         }
         ImNetworkRoom room = baseMapper.findByRoomId(displayData.getRoomId());
         room.setDisplay(display.toString());
-        this.updateDisplay(sysUser.getId(),room);
+        this.updateDisplay(userId,room);
     }
 
     @Override
@@ -354,21 +357,25 @@ public class ImNetworkRoomServiceImpl extends ServiceImpl<ImNetworkRoomDao, ImNe
                     imHelper.publishMessage(userId.toString(), deviceControl.getRoomId(), deviceResourceMessage, 1);
                     break;
                 case MUSIC_SHEET:
+                    Integer musicSheetId = Optional.ofNullable(deviceControl.getMusicSheetAccompanimentId()).
+                            orElseThrow(()-> new BizException("请选择曲目"));
                     //关闭所有曲目播放
                     courseScheduleStudentMusicSheetService.getDao().closePlayStatus(scheduleId,userId);
                     //打开原音
-                    courseScheduleStudentMusicSheetService.getDao().openPlayStatus(scheduleId,deviceControl.getMusicScoreAccompanimentId(),userId);
-                    deviceResourceMessage.setMusicScoreAccompanimentId(deviceControl.getMusicScoreAccompanimentId());
+                    courseScheduleStudentMusicSheetService.getDao().openPlayStatus(scheduleId,musicSheetId,userId);
+                    deviceResourceMessage.setMusicSheetAccompanimentId(musicSheetId);
                     deviceResourceMessage.setUserId(userId.toString());
                     deviceResourceMessage.setSoundVolume(deviceControl.getSoundVolume());
                     imHelper.publishMessage(sysUser.getId().toString(), roomId, deviceResourceMessage, 1);
                     break;
                 case ACCOMPANIMENT:
+                  Integer musicSheetAccompanimentId = Optional.ofNullable(deviceControl.getMusicSheetAccompanimentId()).
+                            orElseThrow(()-> new BizException("请选择曲目"));
                     //关闭所有曲目播放
                     courseScheduleStudentMusicSheetService.getDao().closePlayStatus(scheduleId,userId);
                     //打开伴奏
-                    courseScheduleStudentMusicSheetService.getDao().openAccompanimentPlayStatus(scheduleId, deviceControl.getMusicScoreAccompanimentId(),userId);
-                    deviceResourceMessage.setMusicScoreAccompanimentId(deviceControl.getMusicScoreAccompanimentId());
+                    courseScheduleStudentMusicSheetService.getDao().openAccompanimentPlayStatus(scheduleId,musicSheetAccompanimentId,userId);
+                    deviceResourceMessage.setMusicSheetAccompanimentId(musicSheetAccompanimentId);
                     deviceResourceMessage.setUserId(userId.toString());
                     deviceResourceMessage.setSoundVolume(deviceControl.getSoundVolume());
                     imHelper.publishMessage(sysUser.getId().toString(), roomId, deviceResourceMessage, 1);
@@ -376,7 +383,6 @@ public class ImNetworkRoomServiceImpl extends ServiceImpl<ImNetworkRoomDao, ImNe
                 default:
                     //邀请打开指定设备权限
                     ImNetworkControlDeviceNotifyMessage message = new ImNetworkControlDeviceNotifyMessage(ImNetworkActionEnum.INVITE.ordinal());
-//                    msg.setTicket(ticket);
                     message.setType(deviceControl.getDeviceType().ordinal());
                     message.setOpUserId(sysUser.getId().toString());
                     message.setOpUserName(sysUser.getUsername());
@@ -384,7 +390,8 @@ public class ImNetworkRoomServiceImpl extends ServiceImpl<ImNetworkRoomDao, ImNe
                     break;
             }
         }else {
-            ImNetworkRoomMember roomMember = imNetworkRoomMemberService.getById(roomId);
+            ImNetworkRoomMember roomMember = Optional.ofNullable(imNetworkRoomMemberService.getDao().findByRidAndUid(roomId, userId))
+                    .orElseThrow(()-> new BizException("用户不在房间内"));
             long scheduleId = Long.parseLong(roomId);
             switch (deviceControl.getDeviceType()) {
                 case CAMERA:
@@ -431,7 +438,8 @@ public class ImNetworkRoomServiceImpl extends ServiceImpl<ImNetworkRoomDao, ImNe
         log.info("approveControlDevice: deviceControl={}", deviceControl);
         SysUser sysUser = Optional.ofNullable(sysUserFeignService.queryUserInfo()).
                 orElseThrow(()-> new BizException("请登录"));
-        ImNetworkRoomMember roomMember = imNetworkRoomMemberService.getById(deviceControl.getRoomId());
+        ImNetworkRoomMember roomMember = Optional.ofNullable(imNetworkRoomMemberService.getDao().findByRidAndUid(deviceControl.getRoomId(), sysUser.getId())).
+                orElseThrow(()-> new BizException("用户不在房间内"));
         switch (deviceControl.getDeviceType()) {
             case CAMERA:
                 roomMember.setCameraFlag(deviceControl.getEnable());
@@ -465,10 +473,13 @@ public class ImNetworkRoomServiceImpl extends ServiceImpl<ImNetworkRoomDao, ImNe
     @Transactional(rollbackFor = Exception.class)
     public void deviceStatusSync(ImNetworkDeviceControlDto deviceStatusSync) throws Exception {
         log.info("deviceStatusSync: deviceStatusSync={}", deviceStatusSync);
-        SysUser sysUser = Optional.ofNullable(sysUserFeignService.queryUserInfo()).
+        Long userId = Optional.ofNullable(sysUserFeignService.queryUserInfo()).
+                map(SysUser::getId).
                 orElseThrow(()-> new BizException("请登录"));
         ImNetworkDeviceTypeEnum deviceType = deviceStatusSync.getDeviceType();
-        ImNetworkRoomMember roomMember = imNetworkRoomMemberService.getById(deviceStatusSync.getRoomId());
+        ImNetworkRoomMember roomMember = Optional.ofNullable(imNetworkRoomMemberService.getDao().
+                        findByRidAndUid(deviceStatusSync.getRoomId(), userId))
+                .orElseThrow(()-> new BizException("用户不在房间内"));
         switch (deviceType) {
             case CAMERA:
                 roomMember.setCameraFlag(deviceStatusSync.getEnable());
@@ -484,9 +495,9 @@ public class ImNetworkRoomServiceImpl extends ServiceImpl<ImNetworkRoomDao, ImNe
                 break;
             case EXAM_SONG:
                 long scheduleId = Long.parseLong(deviceStatusSync.getRoomId());
-                ImNetworkRoomMusicSheetDownloadData msg = courseScheduleStudentPaymentService.getMemberExamSong(scheduleId, sysUser.getId());
+                ImNetworkRoomMusicSheetDownloadData msg = courseScheduleStudentPaymentService.getMemberExamSong(scheduleId, userId);
                 msg.setEnable(deviceStatusSync.getEnable());
-                courseScheduleStudentPaymentService.getDao().adjustExamSong(scheduleId, sysUser.getId(), JSON.toJSONString(msg));
+                courseScheduleStudentPaymentService.getDao().adjustExamSong(scheduleId, userId, JSON.toJSONString(msg));
                 break;
         }
         if(deviceType == ImNetworkDeviceTypeEnum.CAMERA ||
@@ -496,10 +507,10 @@ public class ImNetworkRoomServiceImpl extends ServiceImpl<ImNetworkRoomDao, ImNe
             imNetworkRoomMemberService.getDao().updateById(roomMember);
         }
         ImNetworkDeviceStateChangedMessage deviceResourceMessage = new ImNetworkDeviceStateChangedMessage(deviceType.ordinal(),deviceStatusSync.getEnable());
-        deviceResourceMessage.setUserId(sysUser.getId().toString());
-        ImNetworkRoom room = this.getById(deviceStatusSync.getRoomId());
+        deviceResourceMessage.setUserId(userId.toString());
+        ImNetworkRoom room = baseMapper.findByRoomId(deviceStatusSync.getRoomId());
         deviceResourceMessage.setSoundVolume(room.getSoundVolume());
-        imHelper.publishMessage(sysUser.getId().toString(), deviceStatusSync.getRoomId(), deviceResourceMessage, 1);
+        imHelper.publishMessage(userId.toString(), deviceStatusSync.getRoomId(), deviceResourceMessage, 1);
     }
 
     @Override
@@ -547,7 +558,7 @@ public class ImNetworkRoomServiceImpl extends ServiceImpl<ImNetworkRoomDao, ImNe
         if (StringUtils.isEmpty(courseBeforeBufferTime)) {
             courseBeforeBufferTime = "5";
         }
-        Date addMinutes = DateUtil.addMinutes(courseSchedule.getUpdatedTime(), Integer.parseInt(courseBeforeBufferTime));
+        Date addMinutes = DateUtil.addMinutes(courseSchedule.getStartTime(), Integer.parseInt(courseBeforeBufferTime));
         return courseSchedule.getStartTime().compareTo(addMinutes) > 0;
     }
 

+ 41 - 0
cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/service/impl/PianoRoomSettingsServiceImpl.java

@@ -0,0 +1,41 @@
+package com.yonge.cooleshow.biz.dal.service.impl;
+
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springframework.stereotype.Service;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import com.yonge.cooleshow.biz.dal.entity.PianoRoomSettings;
+import com.yonge.cooleshow.biz.dal.vo.PianoRoomSettingsVo;
+import com.yonge.cooleshow.biz.dal.dto.search.PianoRoomSettingsSearch;
+import com.yonge.cooleshow.biz.dal.dao.PianoRoomSettingsDao;
+import com.yonge.cooleshow.biz.dal.service.PianoRoomSettingsService;
+
+import java.util.List;
+
+
+@Service
+public class PianoRoomSettingsServiceImpl extends ServiceImpl<PianoRoomSettingsDao, PianoRoomSettings> implements PianoRoomSettingsService {
+    private final static Logger log = LoggerFactory.getLogger(PianoRoomSettingsServiceImpl.class);
+
+	@Override
+    public PianoRoomSettingsVo detail(Long id) {
+        return baseMapper.detail(id);
+    }
+    
+   /*  @Override
+    public IPage<PianoRoomSettingsVo> selectPage(IPage<PianoRoomSettingsVo> page, PianoRoomSettingsSearch query){
+        return page.setRecords(baseMapper.selectPage(page, query));
+    }*/
+
+    @Override
+    public IPage<PianoRoomSettingsVo> selectPage(IPage<PianoRoomSettingsVo> page, PianoRoomSettingsSearch query) {
+        return page.setRecords(baseMapper.selectPage(page, query));
+    }
+
+    @Override
+    public List<PianoRoomSettingsVo> selectList(PianoRoomSettingsSearch query) {
+        return baseMapper.selectList(query);
+    }
+	
+}

+ 20 - 0
cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/service/impl/PianoRoomTimeServiceImpl.java

@@ -0,0 +1,20 @@
+package com.yonge.cooleshow.biz.dal.service.impl;
+
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.yonge.cooleshow.biz.dal.dao.PianoRoomTimeDao;
+import com.yonge.cooleshow.biz.dal.entity.PianoRoomTime;
+import com.yonge.cooleshow.biz.dal.service.PianoRoomTimeService;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.stereotype.Service;
+
+/**
+ * @Author: cy
+ * @Date: 2022/5/26
+ */
+@Service("pianoRoomTimeService")
+public class PianoRoomTimeServiceImpl extends ServiceImpl<PianoRoomTimeDao, PianoRoomTime> implements PianoRoomTimeService {
+    private final static Logger log = LoggerFactory.getLogger(PianoRoomTimeServiceImpl.class);
+
+}
+

+ 0 - 20
cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/service/impl/PinaoRoomTimeServiceImpl.java

@@ -1,20 +0,0 @@
-package com.yonge.cooleshow.biz.dal.service.impl;
-
-import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
-import com.yonge.cooleshow.biz.dal.dao.PinaoRoomTimeDao;
-import com.yonge.cooleshow.biz.dal.entity.PinaoRoomTime;
-import com.yonge.cooleshow.biz.dal.service.PinaoRoomTimeService;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.springframework.stereotype.Service;
-
-/**
- * @Author: cy
- * @Date: 2022/5/26
- */
-@Service("pinaoRoomTimeService")
-public class PinaoRoomTimeServiceImpl extends ServiceImpl<PinaoRoomTimeDao, PinaoRoomTime> implements PinaoRoomTimeService {
-    private final static Logger log = LoggerFactory.getLogger(PinaoRoomTimeServiceImpl.class);
-
-}
-

+ 56 - 2
cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/service/impl/StudentServiceImpl.java

@@ -1,15 +1,19 @@
 package com.yonge.cooleshow.biz.dal.service.impl;
 
 import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.core.toolkit.Wrappers;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import com.yonge.cooleshow.auth.api.entity.SysUser;
+import com.yonge.cooleshow.biz.dal.dao.TeacherDao;
+import com.yonge.cooleshow.biz.dal.dao.UserBindingTeacherDao;
 import com.yonge.cooleshow.biz.dal.dto.search.StudentSearch;
 import com.yonge.cooleshow.biz.dal.entity.StudentTotal;
 import com.yonge.cooleshow.biz.dal.entity.Subject;
+import com.yonge.cooleshow.biz.dal.entity.UserBindingTeacher;
 import com.yonge.cooleshow.biz.dal.enums.CacheNameEnum;
 import com.yonge.cooleshow.biz.dal.service.StudentTotalService;
-import com.yonge.cooleshow.biz.dal.support.WrapperUtil;
 import com.yonge.cooleshow.biz.dal.vo.*;
+import com.yonge.cooleshow.common.entity.HttpResponseResult;
 import com.yonge.toolset.utils.date.DateUtil;
 import com.yonge.toolset.utils.string.ValueUtil;
 import org.apache.commons.beanutils.BeanUtils;
@@ -28,9 +32,14 @@ import java.util.concurrent.TimeUnit;
 public class StudentServiceImpl extends ServiceImpl<StudentDao, Student> implements StudentService {
     @Autowired
     private RedissonClient redissonClient;
-
     @Autowired
     private StudentTotalService totalService;
+    @Autowired
+    private UserBindingTeacherDao userBindingTeacherDao;
+    @Autowired
+    private StudentService studentService;
+    @Autowired
+    private TeacherDao teacherDao;
 
     @Override
     public StudentVo detail(Long userId) {
@@ -38,6 +47,11 @@ public class StudentServiceImpl extends ServiceImpl<StudentDao, Student> impleme
     }
 
     @Override
+    public StudentVo detailByPhone(String phone) {
+        return baseMapper.detailByPhone(phone);
+    }
+
+    @Override
     public IPage<StudentVo> selectPage(IPage<StudentVo> page, StudentSearch studentSearch) {
         return page.setRecords(baseMapper.selectPage(page, studentSearch));
     }
@@ -95,4 +109,44 @@ public class StudentServiceImpl extends ServiceImpl<StudentDao, Student> impleme
         return page.setRecords(teacherVos);
     }
 
+    @Override
+    public HttpResponseResult<Map<String, TeacherVo>> bindTeacher(String phone, Long userId, Boolean isUpdate) {
+        Map<String, TeacherVo> resMap = new HashMap<>();
+        TeacherVo old = userBindingTeacherDao.getBindTeacherByPhone(phone);
+        if (null != old) {
+            //身份证号、手机号脱敏
+            old.setIdCardNo(ValueUtil.fuzzyIdCard(old.getIdCardNo()));
+            old.setPhone(ValueUtil.fuzzyMobile(old.getPhone()));
+        }
+        resMap.put("old", old);
+
+        StudentVo studentVo = studentService.detailByPhone(phone);
+
+        if (null == studentVo) {
+            return HttpResponseResult.failed("未找到用户信息");
+        }
+        TeacherVo detail = teacherDao.detail(userId);
+        if (null != detail) {
+            //身份证号、手机号脱敏
+            detail.setIdCardNo(ValueUtil.fuzzyIdCard(detail.getIdCardNo()));
+            detail.setPhone(ValueUtil.fuzzyMobile(detail.getPhone()));
+        }
+        if (null == detail) {
+            return HttpResponseResult.failed("未找老师信息");
+        }
+        if (null == old || (null != isUpdate && isUpdate)) {
+            //更新
+            //删除用户绑定
+            userBindingTeacherDao.delete(Wrappers.<UserBindingTeacher>lambdaQuery()
+                    .eq(UserBindingTeacher::getStudentId, studentVo.getUserId()));
+
+            UserBindingTeacher userBindingTeacher = new UserBindingTeacher();
+            userBindingTeacher.setTeacherId(userId);
+            userBindingTeacher.setStudentId(studentVo.getUserId());
+            userBindingTeacherDao.insert(userBindingTeacher);
+        }
+        resMap.put("now", detail);
+        return HttpResponseResult.succeed(resMap);
+    }
+
 }

+ 4 - 6
cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/service/impl/VipCardRecordServiceImpl.java

@@ -32,15 +32,13 @@ public class VipCardRecordServiceImpl extends ServiceImpl<VipCardRecordDao, VipC
     private SysMessageService sysMessageService;
 
     @Override
-    public VipCardRecordVo detail(Long id) {
-        VipCardRecordVo detail = baseMapper.detail(id, null);
-        return detail;
+    public VipCardRecordVo detail(Long orderDetilId) {
+        return baseMapper.detail(orderDetilId, null);
     }
 
     @Override
-    public VipCardRecordVo detail(Long id, Long userId) {
-        VipCardRecordVo detail =  baseMapper.detail(id, userId);
-        return detail;
+    public VipCardRecordVo detail(Long orderDetilId, Long userId) {
+        return baseMapper.detail(orderDetilId, userId);
     }
 
     @Override

+ 34 - 0
cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/vo/CourseCompleteVo.java

@@ -0,0 +1,34 @@
+package com.yonge.cooleshow.biz.dal.vo;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+
+import java.io.Serializable;
+
+/**
+ * @Author: cy
+ * @Date: 2022/5/30
+ */
+@ApiModel
+public class CourseCompleteVo implements Serializable {
+    @ApiModelProperty("课程组id")
+    private Long courseGroupId;
+    @ApiModelProperty("已完成课时数")
+    private Integer courseCount;
+
+    public Long getCourseGroupId() {
+        return courseGroupId;
+    }
+
+    public void setCourseGroupId(Long courseGroupId) {
+        this.courseGroupId = courseGroupId;
+    }
+
+    public Integer getCourseCount() {
+        return courseCount;
+    }
+
+    public void setCourseCount(Integer courseCount) {
+        this.courseCount = courseCount;
+    }
+}

+ 114 - 0
cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/vo/CourseScheduleRecordVo.java

@@ -0,0 +1,114 @@
+package com.yonge.cooleshow.biz.dal.vo;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+
+import java.io.Serializable;
+import java.util.Date;
+
+/**
+ * @Author: cy
+ * @Date: 2022/5/30
+ */
+@ApiModel
+public class CourseScheduleRecordVo implements Serializable {
+    @ApiModelProperty(value = "课程id")
+    private Long courseId;
+
+    @ApiModelProperty(value = "课程组名称")
+    private String groupName;
+
+    @ApiModelProperty(value = "声部id")
+    private Long subjectId;
+
+    @ApiModelProperty(value = "声部名称")
+    private String subjectName;
+
+    @ApiModelProperty(value = "课程状态 NOT_START未开始 ING进行中 COMPLETE已完成 CANCEL已取消")
+    private String status;
+
+    @ApiModelProperty(value = "开课时间")
+    private Date startTime;
+
+    @ApiModelProperty(value = "结课时间")
+    private Date endTime;
+
+    @ApiModelProperty(value = "上课学员人数")
+    private Integer studentCount;
+
+    @ApiModelProperty(value = "总消耗时长")
+    private Integer consumTime;
+
+    public Long getCourseId() {
+        return courseId;
+    }
+
+    public void setCourseId(Long courseId) {
+        this.courseId = courseId;
+    }
+
+    public String getGroupName() {
+        return groupName;
+    }
+
+    public void setGroupName(String groupName) {
+        this.groupName = groupName;
+    }
+
+    public Long getSubjectId() {
+        return subjectId;
+    }
+
+    public void setSubjectId(Long subjectId) {
+        this.subjectId = subjectId;
+    }
+
+    public String getSubjectName() {
+        return subjectName;
+    }
+
+    public void setSubjectName(String subjectName) {
+        this.subjectName = subjectName;
+    }
+
+    public String getStatus() {
+        return status;
+    }
+
+    public void setStatus(String status) {
+        this.status = status;
+    }
+
+    public Date getStartTime() {
+        return startTime;
+    }
+
+    public void setStartTime(Date startTime) {
+        this.startTime = startTime;
+    }
+
+    public Date getEndTime() {
+        return endTime;
+    }
+
+    public void setEndTime(Date endTime) {
+        this.endTime = endTime;
+    }
+
+    public Integer getStudentCount() {
+        return studentCount;
+    }
+
+    public void setStudentCount(Integer studentCount) {
+        this.studentCount = studentCount;
+    }
+
+    public Integer getConsumTime() {
+        return consumTime;
+    }
+
+    public void setConsumTime(Integer consumTime) {
+        this.consumTime = consumTime;
+    }
+}
+

+ 83 - 0
cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/vo/CourseScheduleStudentVo.java

@@ -0,0 +1,83 @@
+package com.yonge.cooleshow.biz.dal.vo;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import org.springframework.format.annotation.DateTimeFormat;
+
+import java.io.Serializable;
+import java.util.Date;
+
+/**
+ * @Author: cy
+ * @Date: 2022/5/30
+ */
+@ApiModel
+public class CourseScheduleStudentVo implements Serializable {
+    @ApiModelProperty(value = "课程id")
+    private Long courseId;
+
+    @ApiModelProperty(value = "老师id")
+    private Long teacherId;
+
+    @ApiModelProperty(value = "学生id")
+    private Long studentId;
+
+    @ApiModelProperty(value = "结课时间")
+    private Date endTime;
+
+    @ApiModelProperty(value = "单课时长(分)")
+    private Integer singleCourseTime;
+
+    @ApiModelProperty(value = "课程类型")
+    private String type;
+
+    public String getType() {
+        return type;
+    }
+
+    public void setType(String type) {
+        this.type = type;
+    }
+
+    public Integer getSingleCourseTime() {
+        return singleCourseTime;
+    }
+
+    public void setSingleCourseTime(Integer singleCourseTime) {
+        this.singleCourseTime = singleCourseTime;
+    }
+
+    public Date getEndTime() {
+        return endTime;
+    }
+
+    public void setEndTime(Date endTime) {
+        this.endTime = endTime;
+    }
+
+    public Long getCourseId() {
+        return courseId;
+    }
+
+    public void setCourseId(Long courseId) {
+        this.courseId = courseId;
+    }
+
+    public Long getTeacherId() {
+        return teacherId;
+    }
+
+    public void setTeacherId(Long teacherId) {
+        this.teacherId = teacherId;
+    }
+
+    public Long getStudentId() {
+        return studentId;
+    }
+
+    public void setStudentId(Long studentId) {
+        this.studentId = studentId;
+    }
+}
+

+ 24 - 0
cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/vo/PianoRoomSettingsVo.java

@@ -0,0 +1,24 @@
+package com.yonge.cooleshow.biz.dal.vo;
+
+import com.yonge.cooleshow.biz.dal.entity.PianoRoomSettings;
+import io.swagger.annotations.ApiModel;
+import org.apache.commons.beanutils.BeanUtils;
+
+/**
+ * @Author: liweifan
+ * @Data: 2022-05-30 15:54:20
+ */
+@ApiModel(value = "PianoRoomSettingsVo对象", description = "查询视图对象")
+public class PianoRoomSettingsVo extends PianoRoomSettings{
+	private static final long serialVersionUID = 1L;
+    
+    public PianoRoomSettingsVo buildVo(PianoRoomSettings pianoRoomSettings){
+        try {
+            BeanUtils.copyProperties(this,pianoRoomSettings);
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
+        return this;
+    }
+
+}

+ 2 - 2
cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/vo/PinaoRoomTimeVo.java → cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/vo/PianoRoomTimeVo.java

@@ -1,6 +1,6 @@
 package com.yonge.cooleshow.biz.dal.vo;
 
-import com.yonge.cooleshow.biz.dal.entity.PinaoRoomTime;
+import com.yonge.cooleshow.biz.dal.entity.PianoRoomTime;
 import io.swagger.annotations.ApiModel;
 import io.swagger.annotations.ApiModelProperty;
 
@@ -9,7 +9,7 @@ import io.swagger.annotations.ApiModelProperty;
  * @Date: 2022/5/26
  */
 @ApiModel
-public class PinaoRoomTimeVo extends PinaoRoomTime {
+public class PianoRoomTimeVo extends PianoRoomTime {
     @ApiModelProperty(value = "我的学员")
     private Integer studentCount;
 

+ 8 - 1
cooleshow-user/user-biz/src/main/resources/config/mybatis/CourseGroupMapper.xml

@@ -655,5 +655,12 @@
             pre_student_num_ = pre_student_num_ + #{num}
         where id_ = #{id}
     </update>
-
+    <update id="updateBatch">
+        UPDATE course_group
+        SET status_='COMPLETE'
+        WHERE id_ IN
+        <foreach collection="list" item="item" open="(" separator="," close=")">
+            #{item}
+        </foreach>
+    </update>
 </mapper>

+ 8 - 4
cooleshow-user/user-biz/src/main/resources/config/mybatis/CourseScheduleMapper.xml

@@ -325,7 +325,7 @@
         LEFT JOIN course_schedule_replied r ON cs.id_ = r.course_schedule_id_
         WHERE cs.lock_=0
         AND cs.status_ IN ('ING','COMPLETE','NOT_START')
-        AND cs.type_='LIVE'
+        AND cs.type_ IN ('LIVE','PIANO_ROOM_CLASS')
         AND cs.teacher_id_=#{param.teacherId}
         AND cs.class_date_=#{param.classDate}
         AND cs.id_ IN(
@@ -335,7 +335,8 @@
             AND p.course_group_id_ = c.course_group_id_
             AND c.teacher_id_=#{param.teacherId}
             AND c.class_date_=#{param.classDate}
-            AND c.type_='LIVE')
+            AND c.type_ IN ('LIVE','PIANO_ROOM_CLASS')
+            )
         UNION
         SELECT
             p.course_id_ AS courseId,
@@ -482,7 +483,7 @@
         WHERE s.lock_=0
         AND s.status_ IN ('ING','NOT_START','COMPLETE')
         AND s.id_ IN
-        (SELECT course_id_ FROM course_schedule_student_payment WHERE user_id_ = #{param.studentId} AND course_type_ = 'LIVE')
+        (SELECT course_id_ FROM course_schedule_student_payment WHERE user_id_ = #{param.studentId} AND course_type_ IN ('LIVE','PIANO_ROOM_CLASS'))
         AND s.class_date_ = #{param.classDate}
         ORDER BY startTime
     </select>
@@ -792,6 +793,9 @@
     <select id="selectIdList" resultType="java.lang.Long">
         SELECT id_ FROM course_schedule WHERE lock_=0 AND class_date_ &lt;= #{day}
     </select>
+    <select id="selectComplete" resultType="com.yonge.cooleshow.biz.dal.vo.CourseCompleteVo">
+        SELECT course_group_id_ AS courseGroupId ,COUNT(1) AS courseCount  FROM course_schedule WHERE lock_=0 AND status_='COMPLETE' GROUP BY course_group_id_
+    </select>
     <update id="updateStartTime">
         UPDATE course_schedule SET status_='ING' WHERE id_ IN(
         <foreach collection="list" item="item" index="index" open="" close="" separator=",">
@@ -801,7 +805,7 @@
     <update id="updateEndTime">
         UPDATE course_schedule SET status_='COMPLETE' WHERE id_ IN(
         <foreach collection="list" item="item" index="index" open="" close="" separator=",">
-            #{item.id}
+            #{item.courseId}
         </foreach>)
     </update>
     <update id="updateTeacherSalary" parameterType="java.util.List">

+ 71 - 0
cooleshow-user/user-biz/src/main/resources/config/mybatis/CourseScheduleRecordMapper.xml

@@ -0,0 +1,71 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.yonge.cooleshow.biz.dal.dao.CourseScheduleRecordDao">
+    <select id="sumCourseTime" resultType="com.yonge.cooleshow.biz.dal.entity.CourseScheduleRecord">
+        SELECT
+            teacherId,
+            courseId,
+            SUM( singleCourseTime ) AS consumTime,
+            COUNT( studentId ) AS studentCount,
+            endTime
+        FROM
+            (SELECT
+                 c.id_ AS courseId,
+                 c.teacher_id_ AS teacherId,
+                 p.user_id_ AS studentId,
+                 c.end_time_ AS endTime,
+                 c.single_course_time_ AS singleCourseTime
+             FROM course_schedule c
+             LEFT JOIN course_schedule_student_payment p ON c.id_ = p.course_id_
+             WHERE c.type_ = 'PIANO_ROOM_CLASS'
+             AND c.lock_ = 0
+             AND c.status_ IN ( 'ING', 'NOT_START' )
+             AND NOW() >= c.end_time_) a
+        GROUP BY courseId
+    </select>
+    <select id="countTimeByTeacherId" resultType="java.lang.Long">
+        SELECT SUM(consum_time_) FROM course_schedule_record WHERE teacher_id_=#{teacherId} AND  date_format(end_time_,'%Y-%m') = #{month}
+    </select>
+    <insert id="insertBatch">
+        INSERT INTO course_schedule_record (course_id_, teacher_id_, student_count_, consum_time_, end_time_) VALUES
+        <foreach collection ="recordList" item="item" index="index" separator =",">
+            (#{item.courseId},#{item.teacherId},#{item.studentCount}, #{item.consumTime}, #{item.endTime})
+        </foreach>
+    </insert>
+    <select id="selectConsumeTimeList" resultType="com.yonge.cooleshow.biz.dal.vo.CourseScheduleRecordVo">
+        SELECT
+            s.id_ AS courseId,
+            g.name_ AS groupName,
+            g.subject_id_ AS subjectId,
+            sb.name_ AS subjectName,
+            s.status_ AS `status`,
+            s.start_time_ AS startTime,
+            s.end_time_ AS endTime,
+            r.student_count_ AS studentCount,
+            r.consum_time_ AS consumTime
+        FROM course_schedule s
+        LEFT JOIN course_schedule_record r ON r.course_id_ =s.id_
+        LEFT JOIN course_group g ON s.course_group_id_=g.id_
+        LEFT JOIN `subject` sb ON g.subject_id_ = sb.id_
+        <where>
+            <if test="param.type != null and param.type !=''">
+                AND s.type_ = #{param.type}
+            </if>
+            <if test="param.status != null and param.status !=''">
+                AND s.status_ = #{param.status}
+            </if>
+            <if test="param.teacherId != null">
+               AND r.teacher_id_ = #{param.teacherId}
+            </if>
+            <if test="param.subjectId != null">
+                AND g.subject_id_ = #{param.subjectId}
+            </if>
+            <if test="param.month != null and param.month !=''">
+                AND date_format(s.end_time_,'%Y-%m') = #{param.month}
+            </if>
+            <if test="param.status != null and param.status !=''">
+                AND s.status_ = #{param.status}
+            </if>
+        </where>
+    </select>
+</mapper>

+ 0 - 10
cooleshow-user/user-biz/src/main/resources/config/mybatis/CourseScheduleStudentMapper.xml

@@ -1,10 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
-<mapper namespace="com.yonge.cooleshow.biz.dal.dao.CourseScheduleStudentDao">
-    <insert id="insertBatch">
-        INSERT INTO course_schedule_student (course_id_, student_id_) VALUES
-        <foreach collection ="list" item="item" separator =",">
-            (#{item.courseId}, #{item.studentId})
-        </foreach >
-    </insert>
-</mapper>

+ 4 - 4
cooleshow-user/user-biz/src/main/resources/config/mybatis/CourseScheduleStudentMusicSheetDao.xml

@@ -21,12 +21,12 @@
     accompaniment_play_status_, user_type_, speed_, create_time_, update_time_
     </sql>
     <insert id="batchInsert">
-        INSERT INTO course_schedule_student_music_score (course_schedule_id_,user_id_,user_type_,down_status_,
+        INSERT INTO course_schedule_student_music_sheet (course_schedule_id_,user_id_,user_type_,down_status_,
         music_sheet_accompaniment_id_,play_status_,accompaniment_play_status_,
                                                          speed_,create_time_,update_time_)
         VALUE
         <foreach collection="musicSheet" item="item" separator=",">
-            (#{item.courseScheduleId},#{item.userId},#{item.userType},#{item.downStatus},#{item.musicScoreAccompanimentId},
+            (#{item.courseScheduleId},#{item.userId},#{item.userType},#{item.downStatus},#{item.musicSheetAccompanimentId},
             #{item.playStatus},#{item.accompanimentPlayStatus},#{item.speed},now(),now())
         </foreach>
     </insert>
@@ -40,14 +40,14 @@
     <update id="openPlayStatus">
         UPDATE course_schedule_student_music_sheet SET play_status_ = 1,update_time_ = NOW()
         WHERE course_schedule_id_ = #{scheduleId}
-        AND music_score_accompaniment_id_ = #{musicScoreAccompanimentId}
+        AND music_sheet_accompaniment_id_ = #{musicSheetAccompanimentId}
         <if test="userId != null">
             AND user_id_ = #{userId}
         </if>
     </update>
     <update id="openAccompanimentPlayStatus">
         UPDATE course_schedule_student_music_sheet SET accompaniment_play_status_ = 1,update_time_ = NOW()
-        WHERE course_schedule_id_ = #{scheduleId} AND music_score_accompaniment_id_ = #{musicScoreAccompanimentId}
+        WHERE course_schedule_id_ = #{scheduleId} AND music_sheet_accompaniment_id_ = #{musicSheetAccompanimentId}
         <if test="userId != null">
             AND user_id_ = #{userId}
         </if>

+ 20 - 5
cooleshow-user/user-biz/src/main/resources/config/mybatis/CourseScheduleStudentPaymentMapper.xml

@@ -40,10 +40,10 @@
         UPDATE course_schedule_student_payment cssp
         <set>
             <if test="content == null or content == ''">
-                cssp.play_midi_ = NULL,cssp.update_time_ = NOW()
+                cssp.play_midi_ = NULL,cssp.updated_time_ = NOW()
             </if>
             <if test="content != null and content != ''">
-                cssp.play_midi_ = #{content},cssp.update_time_ = NOW()
+                cssp.play_midi_ = #{content},cssp.updated_time_ = NOW()
             </if>
         </set>
         <where>
@@ -55,7 +55,7 @@
     </update>
     <update id="adjustExamSong">
         UPDATE course_schedule_student_payment SET music_sheet_download_json_ = #{examSongJson}
-        WHERE course_id_ = #{roomId}
+        WHERE course_id_ = #{courseScheduleId}
         <if test="userId != null">
             AND user_id_ = #{userId}
         </if>
@@ -64,10 +64,10 @@
         UPDATE course_schedule_student_payment cssp
         <set>
             <if test="content == null or content == ''">
-                cssp.open_play_midi_ = NULL,cssp.update_time_ = NOW()
+                cssp.open_play_midi_ = NULL,cssp.updated_time_ = NOW()
             </if>
             <if test="content != null and content != ''">
-                cssp.open_play_midi_ = #{content},cssp.update_time_ = NOW()
+                cssp.open_play_midi_ = #{content},cssp.updated_time_ = NOW()
             </if>
             <if test="examSongJson != null">
                 cssp.exam_song_download_json_ = #{examSongJson}
@@ -147,4 +147,19 @@
         from course_schedule_student_payment cssp
         where cssp.course_group_id_ = #{courseGroupId}
     </select>
+    <select id="selectUser" resultType="com.yonge.cooleshow.biz.dal.vo.CourseScheduleStudentVo">
+        SELECT
+            c.id_ AS courseId,
+            c.teacher_id_ AS teacherId,
+            p.user_id_ AS studentId,
+            c.end_time_ AS endTime,
+            c.single_course_time_ AS singleCourseTime,
+            c.type_ AS type
+        FROM course_schedule c
+        LEFT JOIN course_schedule_student_payment p ON c.id_ = p.course_id_
+        WHERE c.lock_ = 0
+        AND c.status_ IN ('ING','NOT_START')
+        AND NOW() &gt;= c.end_time_
+        ORDER BY c.end_time_
+    </select>
 </mapper>

+ 1 - 1
cooleshow-user/user-biz/src/main/resources/config/mybatis/ImNetworkRoomMemberMapper.xml

@@ -40,7 +40,7 @@
                 #{entity.cameraFlag}, #{entity.micFlag}, #{entity.musicModeFlag}, #{entity.handFlag}, #{entity.username}, #{entity.avatar})
         ON DUPLICATE KEY UPDATE
         room_id_ = VALUES(room_id_),
-        user_id_ = VALUES(user_id_))
+        user_id_ = VALUES(user_id_)
     </insert>
     <delete id="delByRidAndUid">
         DELETE FROM im_network_room_member WHERE room_id_ = #{roomId} AND user_id_ = #{userId}

+ 53 - 0
cooleshow-user/user-biz/src/main/resources/config/mybatis/PianoRoomSettingsMapper.xml

@@ -0,0 +1,53 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE  mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
+<mapper namespace="com.yonge.cooleshow.biz.dal.dao.PianoRoomSettingsDao">
+	<resultMap id="BaseResultMap" type="com.yonge.cooleshow.biz.dal.entity.PianoRoomSettings">
+            <result column="id_" property="id" />
+	        <result column="times_" property="times" />
+	        <result column="sale_price_" property="salePrice" />
+	        <result column="original_price_" property="originalPrice" />
+	        <result column="description_" property="description" />
+	        <result column="create_by_" property="createBy" />
+	        <result column="create_time_" property="createTime" />
+	        <result column="update_by_" property="updateBy" />
+	        <result column="update_time_" property="updateTime" />
+		</resultMap>  
+    
+    <!-- 表字段 -->
+    <sql id="baseColumns">
+         t.id_ as id
+        , t.times_ as times
+        , t.sale_price_ as salePrice
+        , t.original_price_ as originalPrice
+        , t.description_ as description
+        , t.create_by_ as createBy
+        , t.create_time_ as createTime
+        , t.update_by_ as updateBy
+        , t.update_time_ as updateTime
+        </sql> 
+    
+    <select id="detail" resultType="com.yonge.cooleshow.biz.dal.vo.PianoRoomSettingsVo">
+        SELECT
+            <include refid="baseColumns"/>,
+            ifnull(u.real_name_,u.username_) modifierName
+        FROM piano_room_settings t
+        LEFT JOIN sys_user u on t.update_by_ = u.id_
+        where t.id_ = #{id}
+    </select>
+
+    <sql id="selectSql">
+        SELECT
+            <include refid="baseColumns" />,
+            ifnull(u.real_name_,u.username_) modifierName
+        FROM piano_room_settings t
+        LEFT JOIN sys_user u on t.update_by_ = u.id_
+    </sql>
+
+    <select id="selectPage" resultType="com.yonge.cooleshow.biz.dal.vo.PianoRoomSettingsVo">
+        <include refid="selectSql"/>
+    </select>
+
+    <select id="selectList" resultType="com.yonge.cooleshow.biz.dal.vo.PianoRoomSettingsVo">
+        <include refid="selectSql"/>
+    </select>
+</mapper>

+ 26 - 0
cooleshow-user/user-biz/src/main/resources/config/mybatis/PianoRoomTimeDao.xml

@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.yonge.cooleshow.biz.dal.dao.PianoRoomTimeDao">
+    <select id="selectRemainTime" resultType="com.yonge.cooleshow.biz.dal.vo.PianoRoomTimeVo"
+            parameterType="java.lang.Long">
+        SELECT *,
+        (SELECT COUNT(1) FROM user_binding_teacher WHERE teacher_id_=#{teacherId}) AS studentCount
+        FROM piano_room_time
+        WHERE teacher_id_=#{teacherId}
+    </select>
+    <update id="updateEndTime">
+        <foreach collection="list" item="item" index="index" separator=";">
+            UPDATE user_binding_teacher
+            SET last_end_class_ = #{item.endTime}
+            WHERE teacher_id_ = #{item.teacherId}
+            AND student_id_ = #{item.studentId}
+        </foreach>
+    </update>
+    <update id="updateBatch">
+        <foreach collection="list" item="item" index="index" separator=";">
+            UPDATE piano_room_time
+            SET frozen_time_ = #{item.frozenTime}
+            WHERE teacher_id_ = #{item.teacherId}
+        </foreach>
+    </update>
+</mapper>

+ 0 - 12
cooleshow-user/user-biz/src/main/resources/config/mybatis/PinaoRoomTimeMapper.xml

@@ -1,12 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
-<mapper namespace="com.yonge.cooleshow.biz.dal.dao.PinaoRoomTimeDao">
-
-    <select id="selectRemainTime" resultType="com.yonge.cooleshow.biz.dal.vo.PinaoRoomTimeVo"
-            parameterType="java.lang.Long">
-        SELECT *,
-        (SELECT COUNT(1) FROM user_binding_teacher WHERE teacher_id_=#{teacherId}) AS studentCount
-        FROM pinao_room_time
-        WHERE teacher_id_=#{teacherId}
-    </select>
-</mapper>

+ 21 - 0
cooleshow-user/user-biz/src/main/resources/config/mybatis/StudentMapper.xml

@@ -29,6 +29,7 @@
     <update id="setSubject">
         update student set subject_id_ = #{subjectIds},update_time_ = now() where user_id_ = #{id}
     </update>
+
     <select id="detail" resultType="com.yonge.cooleshow.biz.dal.vo.StudentVo">
         SELECT
             <include refid="baseColumns"/>,
@@ -49,6 +50,26 @@
         left join sys_user u on t.user_id_ = u.id_
         where t.user_id_ = #{userId}
     </select>
+    <select id="detailByPhone" resultType="com.yonge.cooleshow.biz.dal.vo.StudentVo">
+        SELECT
+            <include refid="baseColumns"/>,
+            u.avatar_ as avatar,
+            u.real_name_ as realName,
+            u.id_card_no_ as idCardNo,
+            u.username_ as username,
+            u.gender_ as gender,
+            u.birthdate_ as birthdate,
+            TIMESTAMPDIFF(YEAR, u.birthdate_, CURDATE()) as age,
+            u.phone_ as phone,
+            (case when isnull(u.id_card_no_) then 0 else 1 end) as isReal,
+            (!isnull(membership_end_time_) and membership_end_time_ > now()) as isVip,
+            (
+                SELECT GROUP_CONCAT(name_) FROM subject WHERE FIND_IN_SET(id_,t.subject_id_)
+            ) as subjectName
+        FROM student t
+        left join sys_user u on t.user_id_ = u.id_
+        where u.phone_ = #{phone}
+    </select>
     <!-- 分页查询 -->
     <select id="selectPage" resultType="com.yonge.cooleshow.biz.dal.vo.StudentVo">
         SELECT

+ 48 - 1
cooleshow-user/user-biz/src/main/resources/config/mybatis/UserBindingTeacherMapper.xml

@@ -26,9 +26,56 @@
             <if test="param.studentList !=null and param.studentList.size>0">
                 AND su.id_ IN
                 <foreach collection="param.studentList" item="item" open="(" separator="," close=")">
-                    #{item.studentId}
+                    #{item.userId}
                 </foreach>
             </if>
         </where>
     </select>
+
+    <!-- 表字段 -->
+    <sql id="teacherColumns">
+        t.user_id_ as "userId"
+        , t.education_background_ as "educationBackground"
+        , t.graduate_school_ as "graduateSchool"
+        , t.technical_titles_ as "technicalTitles"
+        , t.work_unit_ as "workUnit"
+        , t.subject_id_ as "subjectId"
+        , t.introduction_ as "introduction"
+        , t.subject_ as "subject"
+        , t.grad_certificate_ as "gradCertificate"
+        , t.degree_certificate_ as "degreeCertificate"
+        , t.teacher_certificate_ as "teacherCertificate"
+        , t.entry_flag_ as "entryFlag"
+        , t.entry_auth_date_ as "entryAuthDate"
+        , t.musician_flag_ as "musicianFlag"
+        , t.musician_date_ as "musicianDate"
+        , t.live_flag_ as "liveFlag"
+        , t.live_date_ as "liveDate"
+        , t.memo_ as "memo"
+        , t.create_time_ as "createTime"
+        , t.update_time_ as "updateTime"
+    </sql>
+
+    <select id="getBindTeacherByPhone" resultType="com.yonge.cooleshow.biz.dal.vo.TeacherVo">
+        SELECT
+            <include refid="teacherColumns"/>,
+            u.avatar_ as avatar,
+            u.username_ as username,
+            u.gender_ as `gender`,
+            u.birthdate_ as birthdate,
+            u.phone_ as phone,
+            (case when isnull(u.id_card_no_) then 0 else 1 end) as isReal,
+            u.real_name_ as realName,
+            u.id_card_no_ as idCardNo,
+            (
+                SELECT GROUP_CONCAT(name_) FROM subject WHERE FIND_IN_SET(id_,t.subject_id_)
+            ) as subjectName
+        FROM (
+            select a.* from user_binding_teacher a
+            left join sys_user b on a.student_id_ = b.id_
+            where b.phone_ = #{phone}
+        ) a
+        left join teacher t on a.teacher_id_ = t.user_id_
+        left join sys_user u on t.user_id_ = u.id_
+    </select>
 </mapper>

+ 10 - 4
cooleshow-user/user-biz/src/main/resources/config/mybatis/VipCardRecordMapper.xml

@@ -34,18 +34,24 @@
             s.original_price_ as originalPrice,
             s.sale_price_ as salePrice,
             s.period_ as `period`
-        FROM vip_card_record t
+        FROM user_order_detail a
+        left join vip_card_record t on a.order_no_ = t.order_no_ and a.sub_order_no_ = t.sub_order_no_
         left join member_price_settings s on t.vip_card_id_ = s.id_
-        where t.id_ = #{id}
+        where a.id_ = #{orderDetilId}
         <if test="userId != null">
             and t.user_id_ = #{userId}
         </if>
     </select>
-    
+
+
     <select id="selectPage" resultType="com.yonge.cooleshow.biz.dal.vo.VipCardRecordVo">
 		SELECT         
-        	<include refid="baseColumns" />
+        	<include refid="baseColumns" />,
+            s.original_price_ as originalPrice,
+            s.sale_price_ as salePrice,
+            s.period_ as `period`
 		FROM vip_card_record t
+        left join member_price_settings s on t.vip_card_id_ = s.id_
         order by t.create_time_ desc
 	</select>
 

+ 2 - 0
cooleshow-user/user-classroom/src/main/java/com/yonge/cooleshow/classroom/controller/ImNetworkRoomController.java

@@ -120,6 +120,7 @@ public class ImNetworkRoomController extends BaseController {
     @ApiOperation(value = "学员同意打开,麦克风、摄像头")
     @PostMapping(value = "/device/approve", consumes = MediaType.APPLICATION_JSON_UTF8_VALUE, produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
     public HttpResponseResult approveControlDevice(@RequestBody ImNetworkDeviceControlDto deviceControl) throws Exception {
+        deviceControl.setEnable(true);
         imNetworkRoomService.approveControlDevice(deviceControl);
         return succeed();
     }
@@ -128,6 +129,7 @@ public class ImNetworkRoomController extends BaseController {
     @PostMapping(value = "/device/reject", consumes = MediaType.APPLICATION_JSON_UTF8_VALUE, produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
     public HttpResponseResult rejectControlDevice(@RequestBody ImNetworkDeviceControlDto deviceControl)
             throws Exception {
+        deviceControl.setEnable(false);
         imNetworkRoomService.rejectControlDevice(deviceControl);
         return succeed();
     }

+ 1 - 1
cooleshow-user/user-student/src/main/java/com/yonge/cooleshow/student/config/ResourceServerConfig.java

@@ -28,7 +28,7 @@ public class ResourceServerConfig extends ResourceServerConfigurerAdapter {
                 .authorizeRequests()
                 .antMatchers("/task/**")
                 .hasIpAddress("0.0.0.0/0")
-                .antMatchers("/wechat/*", "/v2/api-docs", "/code/*", "/payment/callback", "/userOrder/setSuccessStatus")
+                .antMatchers("/wechat/*", "/v2/api-docs", "/code/*","/open/**", "/payment/callback", "/userOrder/setSuccessStatus")
                 .permitAll().anyRequest().authenticated().and().httpBasic();
     }
 

+ 9 - 0
cooleshow-user/user-student/src/main/java/com/yonge/cooleshow/student/controller/MemberPriceSettingsController.java

@@ -25,6 +25,15 @@ public class MemberPriceSettingsController extends BaseController {
 	@Autowired
 	private SysConfigService sysConfigService;
 
+	/**
+	 * 查询单条
+	 */
+	@GetMapping("/detail/{id}")
+	@ApiOperation(value = "详情", notes = "传入id")
+	public HttpResponseResult<MemberPriceSettingsVo> detail(@PathVariable("id") Long id) {
+		return succeed(memberPriceSettingsService.detail(id));
+	}
+
 	@PostMapping("/list")
 	@ApiOperation(value = "查询列表")
 	public HttpResponseResult<List<MemberPriceSettingsVo>> list(@RequestBody MemberPriceSettingsSearch query) {

+ 0 - 2
cooleshow-user/user-student/src/main/java/com/yonge/cooleshow/student/controller/StudentController.java

@@ -5,7 +5,6 @@ import com.yonge.cooleshow.auth.api.client.SysUserFeignService;
 import com.yonge.cooleshow.auth.api.entity.SysUser;
 import com.yonge.cooleshow.biz.dal.entity.Subject;
 import com.yonge.cooleshow.biz.dal.support.PageUtil;
-import com.yonge.cooleshow.biz.dal.vo.MyFens;
 import com.yonge.cooleshow.biz.dal.vo.MyFollow;
 import com.yonge.cooleshow.biz.dal.vo.StudentHomeVo;
 import com.yonge.cooleshow.common.controller.BaseController;
@@ -22,7 +21,6 @@ import com.yonge.cooleshow.biz.dal.entity.Student;
 import com.yonge.cooleshow.biz.dal.service.StudentService;
 
 import java.util.List;
-import java.util.Map;
 
 @RestController
 @RequestMapping("/student")

+ 3 - 3
cooleshow-user/user-student/src/main/java/com/yonge/cooleshow/student/controller/VipCardRecordController.java

@@ -35,14 +35,14 @@ public class VipCardRecordController extends BaseController {
     /**
      * 查询单条
      */
-    @GetMapping("/detail/{id}")
+    @GetMapping("/detail/{orderDetilId}")
     @ApiOperation(value = "详情", notes = "传入id")
-    public HttpResponseResult<VipCardRecordVo> detail(@PathVariable("id") Long id) {
+    public HttpResponseResult<VipCardRecordVo> detail(@PathVariable("orderDetilId") Long orderDetilId) {
         SysUser user = sysUserFeignService.queryUserInfo();
         if (user == null || null == user.getId()) {
             return failed(HttpStatus.FORBIDDEN, "请登录");
         }
-        return succeed(vipCardRecordService.detail(id, user.getId()));
+        return succeed(vipCardRecordService.detail(orderDetilId, user.getId()));
     }
 
     /**

+ 58 - 0
cooleshow-user/user-student/src/main/java/com/yonge/cooleshow/student/open/OpenClient.java

@@ -0,0 +1,58 @@
+package com.yonge.cooleshow.student.open;
+
+import com.yonge.cooleshow.biz.dal.service.StudentService;
+import com.yonge.cooleshow.biz.dal.service.TeacherService;
+import com.yonge.cooleshow.biz.dal.vo.TeacherVo;
+import com.yonge.cooleshow.common.controller.BaseController;
+import com.yonge.cooleshow.common.entity.HttpResponseResult;
+import com.yonge.toolset.utils.string.StringUtil;
+import com.yonge.toolset.utils.string.ValueUtil;
+import io.swagger.annotations.*;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestParam;
+import org.springframework.web.bind.annotation.RestController;
+
+import java.util.Map;
+
+
+@RestController
+@RequestMapping("/open")
+@Api(value = "开放权限接口")
+public class OpenClient extends BaseController {
+    @Autowired
+    private TeacherService teacherService;
+
+    @Autowired
+    private StudentService studentService;
+
+    @ApiOperation(value = "查询老师头像昵称信息")
+    @GetMapping("/getTeacher")
+    public HttpResponseResult<TeacherVo> getTeacher(@ApiParam(value = "老师ID", required = true) @RequestParam("userId") Long userId) {
+        if (null == userId) {
+            return failed("缺少老师ID");
+        }
+        TeacherVo detail = teacherService.detail(userId);
+        detail.setIdCardNo(ValueUtil.fuzzyIdCard(detail.getIdCardNo()));
+        detail.setPhone(ValueUtil.fuzzyMobile(detail.getPhone()));
+        return HttpResponseResult.succeed(detail);
+    }
+
+    @ApiOperation(value = "绑定老师")
+    @ApiImplicitParams({
+            @ApiImplicitParam(name = "phone", value = "手机号", required = true, dataType = "String"),
+            @ApiImplicitParam(name = "userId", value = "老师id", required = true),
+            @ApiImplicitParam(name = "isUpdate", value = "是否更新绑定老师", dataType = "Boolean")
+    })
+    @GetMapping("/bindTeacher")
+    public HttpResponseResult<Map<String,TeacherVo>> bindTeacher(String phone, Long userId, Boolean isUpdate) {
+        if (StringUtil.isEmpty(phone)) {
+            return failed("缺少手机号");
+        }
+        if (null == userId) {
+            return failed("缺少老师ID");
+        }
+        return studentService.bindTeacher(phone, userId, isUpdate);
+    }
+}

+ 0 - 166
cooleshow-user/user-teacher/src/main/java/com/yonge/cooleshow/teacher/controller/ImNetworkRoomController.java

@@ -1,166 +0,0 @@
-package com.yonge.cooleshow.teacher.controller;
-
-
-import com.alibaba.fastjson.JSONObject;
-import com.yonge.cooleshow.biz.dal.dto.*;
-import com.yonge.cooleshow.biz.dal.enums.UserRoleEnum;
-import com.yonge.cooleshow.biz.dal.service.ImNetworkRoomService;
-import com.yonge.cooleshow.common.controller.BaseController;
-import com.yonge.cooleshow.common.entity.HttpResponseResult;
-import com.yonge.toolset.base.exception.BizException;
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiImplicitParam;
-import io.swagger.annotations.ApiImplicitParams;
-import io.swagger.annotations.ApiOperation;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.springframework.http.MediaType;
-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 javax.annotation.Resource;
-import java.util.Optional;
-
-/**
- * 网络教室房间(ImNetworkRoom)表控制层
- *
- * @author zx
- * @since 2022-03-30 16:36:36
- */
-@Api(tags = "网络教室房间")
-@RestController
-@RequestMapping("/imNetworkRoom")
-public class ImNetworkRoomController extends BaseController {
-
-    private final static Logger log = LoggerFactory.getLogger(ImNetworkRoomController.class);
-    /**
-     * 服务对象
-     */
-    @Resource
-    private ImNetworkRoomService imNetworkRoomService;
-
-    @ApiOperation("加入网络教室")
-    @PostMapping(value = "/join", consumes = MediaType.MULTIPART_FORM_DATA_VALUE, produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
-    @ApiImplicitParam(name = "roomId", dataType = "Long", value = "课程编号")
-    public HttpResponseResult<ImNetworkRoomResult> joinRoom(Long roomId) throws Exception {
-        roomId = Optional.ofNullable(roomId)
-                .orElseThrow(()->new BizException("房间号不可为空"));
-        return imNetworkRoomService.joinRoom(roomId, UserRoleEnum.TEACHER);
-    }
-
-//    @ApiOperation("加入网络教室状态回调")
-//    @PostMapping(value = "joinRoomSuccess", consumes = MediaType.MULTIPART_FORM_DATA_VALUE, produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
-//    public HttpResponseResult joinRoomSuccess(Long courseScheduleId) throws Exception {
-//        imNetworkRoomService.joinRoomSuccess(courseScheduleId.toString(),UserRoleEnum.TEACHER);
-//        return succeed();
-//    }
-
-    @ApiOperation("加入网络教室状态回调")
-    @PostMapping(value = "joinRoomFailure", consumes = MediaType.MULTIPART_FORM_DATA_VALUE, produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
-    public HttpResponseResult joinRoomFailure(Long roomId){
-        imNetworkRoomService.joinRoomFailure(roomId.toString());
-        return succeed();
-    }
-
-    @RequestMapping(value = "/statusSync")
-    public void statusSync(@RequestBody String body) throws Exception {
-        ImChannelStateNotify notify = JSONObject.parseObject(body, ImChannelStateNotify.class);
-        log.info("statusSyncParam: {}",JSONObject.toJSON(notify));
-        switch (notify.getEvent()) {
-            case 11:
-                //成员加入
-                imNetworkRoomService.joinRoomSuccess(notify.getChannelId(),Long.parseLong(notify.getUserId()));
-                break;
-            case 12:
-                //成员退出
-                imNetworkRoomService.leaveRoomSuccess(notify.getChannelId(),Long.parseLong(notify.getUserId()));
-                break;
-        }
-    }
-
-    @ApiOperation("退出网络教室")
-    @ApiImplicitParam(name = "roomId", dataType = "Long", value = "课程编号")
-    @PostMapping(value = "/leave", consumes = MediaType.MULTIPART_FORM_DATA_VALUE, produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
-    public HttpResponseResult leaveRoom(Long roomId) throws Exception {
-        imNetworkRoomService.leaveRoom(roomId.toString(),UserRoleEnum.TEACHER);
-        return succeed();
-    }
-
-    @ApiOperation("控制学员节拍器")
-    @PostMapping(value = "/sendImPlayMidiMessage", consumes = MediaType.APPLICATION_JSON_UTF8_VALUE, produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
-    public HttpResponseResult sendImPlayMidiMessage(@RequestBody ImNetworkCustomMessage customMessage) throws Exception {
-        imNetworkRoomService.sendImPlayMidiMessage(customMessage);
-        return succeed();
-    }
-
-    @ApiOperation("移动端用来渲染页面")
-    @PostMapping(value = "/display", consumes = MediaType.APPLICATION_JSON_UTF8_VALUE, produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
-    public HttpResponseResult display(@RequestBody ImNetworkDisplayDataDto displayData) throws Exception {
-        imNetworkRoomService.display(displayData);
-        return succeed();
-    }
-
-    @ApiOperation(value = "批量控制学员设备开关")
-    @PostMapping(value = "/device/batchControl", consumes = MediaType.APPLICATION_JSON_UTF8_VALUE, produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
-    public Object batchControlDevice(@RequestBody ImNetworkDeviceControlDto deviceControl)throws Exception {
-        imNetworkRoomService.batchControlDevice(deviceControl);
-        return succeed();
-    }
-
-    @ApiOperation(value = "控制学员设备开关")
-    @PostMapping(value = "/device/control", consumes = MediaType.APPLICATION_JSON_UTF8_VALUE, produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
-    public HttpResponseResult controlDevice(@RequestBody ImNetworkDeviceControlDto deviceControl)
-            throws Exception {
-        imNetworkRoomService.controlDevice(deviceControl);
-        return succeed();
-    }
-
-    @ApiOperation(value = "学员同意打开,麦克风、摄像头")
-    @PostMapping(value = "/device/approve", consumes = MediaType.APPLICATION_JSON_UTF8_VALUE, produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
-    public HttpResponseResult approveControlDevice(@RequestBody ImNetworkDeviceControlDto deviceControl) throws Exception {
-        imNetworkRoomService.approveControlDevice(deviceControl);
-        return succeed();
-    }
-
-    @ApiOperation(value = "学员拒绝打开,麦克风、摄像头")
-    @PostMapping(value = "/device/reject", consumes = MediaType.APPLICATION_JSON_UTF8_VALUE, produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
-    public HttpResponseResult rejectControlDevice(@RequestBody ImNetworkDeviceControlDto deviceControl)
-            throws Exception {
-        imNetworkRoomService.rejectControlDevice(deviceControl);
-        return succeed();
-    }
-
-    @ApiOperation(value = "学员设备状态同步")
-    @PostMapping(value = "/device/sync", consumes = MediaType.APPLICATION_JSON_UTF8_VALUE, produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
-    public Object deviceStatusSync(@RequestBody ImNetworkDeviceControlDto deviceControl)
-            throws Exception {
-        imNetworkRoomService.deviceStatusSync(deviceControl);
-        return succeed();
-    }
-
-    @ApiImplicitParams({
-            @ApiImplicitParam(name = "roomId", dataType = "String", value = "房间号",required = true),
-            @ApiImplicitParam(name = "accompanimentId", dataType = "Long", value = "伴奏编号",required = true)
-    })
-    @ApiOperation(value = "老师在网络教室选择完伴奏后、通知学员下载伴奏")
-    @PostMapping(value = "pushDownloadMusicSheetMsg", consumes = MediaType.MULTIPART_FORM_DATA_VALUE, produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
-    public HttpResponseResult pushDownloadMusicSheetMsg(String roomId,Long accompanimentId) throws Exception {
-        imNetworkRoomService.pushDownloadMusicSheetMsg(roomId,accompanimentId);
-        return succeed();
-    }
-
-    @ApiImplicitParams({
-            @ApiImplicitParam(name = "roomId", dataType = "String", value = "房间号",required = true),
-            @ApiImplicitParam(name = "accompanimentId", dataType = "Long", value = "伴奏编号",required = false),
-            @ApiImplicitParam(name = "status", dataType = "Integer", value = "伴奏下载状态(1下载成功0下载中2下载失败)",required = true)
-    })
-    @ApiOperation(value = "学员伴奏下载状态回调")
-    @PostMapping(value = "musicSheetDownNotify", consumes = MediaType.MULTIPART_FORM_DATA_VALUE, produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
-    public HttpResponseResult adjustMusicScore(String roomId,Long accompanimentId,Integer status) throws Exception {
-        imNetworkRoomService.musicSheetDownNotify(roomId,accompanimentId,status);
-        return succeed();
-    }
-}
-

+ 0 - 29
cooleshow-user/user-teacher/src/main/java/com/yonge/cooleshow/teacher/controller/ImNetworkRoomMemberController.java

@@ -1,29 +0,0 @@
-package com.yonge.cooleshow.teacher.controller;
-
-
-import com.yonge.cooleshow.biz.dal.service.ImNetworkRoomMemberService;
-import com.yonge.cooleshow.common.controller.BaseController;
-import io.swagger.annotations.Api;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RestController;
-
-import javax.annotation.Resource;
-
-/**
- * 网络教室成员(ImNetworkRoomMember)表控制层
- *
- * @author zx
- * @since 2022-03-30 16:36:37
- */
-@Api(tags = "网络教室成员")
-@RestController
-@RequestMapping("/imNetworkRoomMember")
-public class ImNetworkRoomMemberController extends BaseController {
-    /**
-     * 服务对象
-     */
-    @Resource
-    private ImNetworkRoomMemberService imNetworkRoomMemberService;
-
-}
-

+ 31 - 3
cooleshow-user/user-teacher/src/main/java/com/yonge/cooleshow/teacher/controller/TeacherCourseScheduleController.java

@@ -156,12 +156,14 @@ public class TeacherCourseScheduleController extends BaseController {
     //测试未约满课老师
     @GetMapping("/test")
     public HttpResponseResult<Object> test(Integer amount) {
-        return succeed(courseScheduleService.getTeacherId(amount));
+//        return succeed(courseScheduleService.getTeacherId(amount));
+        courseScheduleService.scheduleTask();
+        return succeed();
     }
 
     @ApiOperation("查询琴房剩余时长、冻结时长、统计学员人数")
     @GetMapping("/selectRemainTime")
-    public HttpResponseResult<PinaoRoomTimeVo> selectRemainTime() {
+    public HttpResponseResult<PianoRoomTimeVo> selectRemainTime() {
         SysUser user = sysUserFeignService.queryUserInfo();
         if (user == null || null == user.getId()) {
             return failed(HttpStatus.FORBIDDEN, "请登录");
@@ -170,7 +172,7 @@ public class TeacherCourseScheduleController extends BaseController {
     }
 
     @ApiImplicitParams({
-            @ApiImplicitParam(name = "subjectId", dataType = "Long", value = "声部id"),
+            @ApiImplicitParam(name = "subjectId", dataType = "Long", value = "学员声部id"),
             @ApiImplicitParam(name = "userName", dataType = "String", value = "学员姓名"),
             @ApiImplicitParam(name = "courseId", dataType = "Long", value = "课程id"),
     })
@@ -195,5 +197,31 @@ public class TeacherCourseScheduleController extends BaseController {
         courseScheduleService.arrangeCourse(arrangeCourseVo, user.getId());
         return succeed();
     }
+
+    @ApiOperation("根据月份查询消耗时长")
+    @GetMapping("/selectConsumeTime")
+    public HttpResponseResult<Object> selectConsumeTime(String month) {
+        SysUser user = sysUserFeignService.queryUserInfo();
+        if (user == null || null == user.getId()) {
+            return failed(HttpStatus.FORBIDDEN, "请登录");
+        }
+        return succeed(courseScheduleService.selectConsumeTime(month, user.getId()));
+    }
+
+    @ApiImplicitParams({
+            @ApiImplicitParam(name = "subjectId", dataType = "Long", value = "声部id"),
+            @ApiImplicitParam(name = "month", dataType = "String", value = "月份,yyyy-mm"),
+            @ApiImplicitParam(name = "status", dataType = "String", value = "课程状态"),
+    })
+    @ApiOperation("课程列表&消耗时长列表")
+    @PostMapping("/selectConsumeTimeList")
+    public HttpResponseResult<PageInfo<CourseScheduleRecordVo>> selectConsumeTimeList(@RequestBody Map<String, Object> param) {
+        SysUser user = sysUserFeignService.queryUserInfo();
+        if (user == null || null == user.getId()) {
+            return failed(HttpStatus.FORBIDDEN, "请登录");
+        }
+        param.put("teacherId", user.getId());
+        return succeed(courseScheduleService.selectConsumeTimeList(param));
+    }
 }
 

+ 0 - 24
toolset/toolset-payment/src/main/resources/apiclient_cert.pem

@@ -1,24 +0,0 @@
------BEGIN CERTIFICATE-----
-MIID8zCCAtugAwIBAgIUXkiyBI0+OOmO2K35AnprC9vhf8kwDQYJKoZIhvcNAQEL
-BQAwXjELMAkGA1UEBhMCQ04xEzARBgNVBAoTClRlbnBheS5jb20xHTAbBgNVBAsT
-FFRlbnBheS5jb20gQ0EgQ2VudGVyMRswGQYDVQQDExJUZW5wYXkuY29tIFJvb3Qg
-Q0EwHhcNMjIwNTE2MDcxNzE5WhcNMjcwNTE1MDcxNzE5WjCBhDETMBEGA1UEAwwK
-MTYyNTkzMDAzNDEbMBkGA1UECgwS5b6u5L+h5ZWG5oi357O757ufMTAwLgYDVQQL
-DCfmrabmsYnphbfkuZDnp4DnvZHnu5znp5HmioDmnInpmZDlhazlj7gxCzAJBgNV
-BAYMAkNOMREwDwYDVQQHDAhTaGVuWmhlbjCCASIwDQYJKoZIhvcNAQEBBQADggEP
-ADCCAQoCggEBANAWcWJgjzWHrqjxidhyekmBXOTj54lHYkggJC1esX1AwEISOk1E
-edbsw4OVvUZJcyg6pu/vmLTgNZSoCQ2fuiWhTXg5BeMBRN/UejSQFDRVSCfsAnkY
-Xx2eGMKvLWD8Z8VGBtM7nCfb18EGe35vyNtj2v/9o/8hv/cUoGGccFY21gYxiJAQ
-sEKwRjz1hgmahgSOYnb4GQRLbKKPwzToo7oVeKnAjRHQ8wr/+shCjIFGiPXHcIha
-DcU/Wz6StHMp54m9E7cvyHoNK4jlSHjNqWdBZPKzaYx+sozsZD9rZQGjB6l5h3RU
-kU4PaIe+g06FCEp1Yw7eaoTVCM3j+dhVvRcCAwEAAaOBgTB/MAkGA1UdEwQCMAAw
-CwYDVR0PBAQDAgTwMGUGA1UdHwReMFwwWqBYoFaGVGh0dHA6Ly9ldmNhLml0cnVz
-LmNvbS5jbi9wdWJsaWMvaXRydXNjcmw/Q0E9MUJENDIyMEU1MERCQzA0QjA2QUQz
-OTc1NDk4NDZDMDFDM0U4RUJEMjANBgkqhkiG9w0BAQsFAAOCAQEAS3D2jC435T13
-PRYgNceYidbnds+cHWT7e8YJZl5aKNzGY8mCxuGPrmNHblUOfeq0V4cfoSlh/RCv
-8kgKI3a5z6ZvFhuZ9CITKELkuV9ClQIiMveJkxcU68giR7GY68kesZRDYeM2lVCk
-sSOzKjfXbZX30OhDM24vcVD2z6/y/XVoB7MOY8PcrdFT3hRnP1u+3lUXQGijLkMY
-szU6yX4NSac7OSaKNwaJNMqpuHM1uAd6NM4qTQ0oXuwN+uOR0+GCgrUkM/34MPsm
-P/o8TmyqzwJl12k9RNwqlGBem5re08vxrDTnEaZG5NklV8GFmxGyToo+4foueunk
-22KIeOpo6g==
------END CERTIFICATE-----

+ 0 - 28
toolset/toolset-payment/src/main/resources/apiclient_key.pem

@@ -1,28 +0,0 @@
------BEGIN PRIVATE KEY-----
-MIIEvQIBADANBgkqhkiG9w0BAQEFAASCBKcwggSjAgEAAoIBAQDQFnFiYI81h66o
-8YnYcnpJgVzk4+eJR2JIICQtXrF9QMBCEjpNRHnW7MODlb1GSXMoOqbv75i04DWU
-qAkNn7oloU14OQXjAUTf1Ho0kBQ0VUgn7AJ5GF8dnhjCry1g/GfFRgbTO5wn29fB
-Bnt+b8jbY9r//aP/Ib/3FKBhnHBWNtYGMYiQELBCsEY89YYJmoYEjmJ2+BkES2yi
-j8M06KO6FXipwI0R0PMK//rIQoyBRoj1x3CIWg3FP1s+krRzKeeJvRO3L8h6DSuI
-5Uh4zalnQWTys2mMfrKM7GQ/a2UBowepeYd0VJFOD2iHvoNOhQhKdWMO3mqE1QjN
-4/nYVb0XAgMBAAECggEAPHN4pwrEL9nl/MCGujGvovEI6pnm5rOtMqTbva53w5pv
-AALJmy7ccnq/5dc3cFbgNHytiKDDbTCBgFk8oA+aBVqR5e4y7pqsxpW0ltaQeA+a
-cbaXlVRmNXV7XfuEJFvPTbklPHJh0BaG3FWkxLt2z3133sxxuymz2fTNDu5imDi5
-zmwQ0+WHy955jPOsE726Vnef76PtOxYdZip0QigXeVTr715ohsxPQ+sXyNYMpYsF
-k5A19IkGSYqCzQpyDCA1dDKiAQQQ9Ikh34/B/lOkfOI/Ivf1YTSVjj/XsRd6RW3V
-CQWx7MKTXFE3U/dxragu98ejYmaT5DL9/G5Yptx1kQKBgQDvLLCp0iT5sCCrisH+
-f8fLfvCgUE+MuVYyvFMcps+b/eXaF7SjESqqYgpB2U32vJiCzk760yMFGR7zeoRs
-eUPT0SYIKgm8+t4DnaMBxIarDbgU+KvVlYQR7n1tqf8f2InTWbq/KCVzt+fCP6gO
-vjHUEB2m22pKomGTrNYNQaWxXwKBgQDeueglZsx7Z4QyRKBLYAIqUtFD0kysMz9x
-KLPwRZCceFF8jEl4vk8Ldrvhn0oiz0sPKyvL9Fg4oH+ZWPs2ovCA3vNWGea6Sa5Z
-s1QBDWch1yBaHLStniC1vrLd4lUOraKXFqFBae75430vUlYxzXdaJXdbrzmvFp+V
-yLIZiT13SQKBgGcwPcwWyTMcpQu9ovLdSGLokoJoA9owABuFmsoKwhmIEknk3l9Y
-QbMe91PvoC5qsdYFkpeuzjYd33emjUmLjBLv8lulX2w0Q+MFeNWDZ6KXGauamfBd
-QIzH+z98D4E62EPiO6rLdFUXrBrngedScYcPqOtbUOGAa17eO7+eahE7AoGACKOR
-W5IHMGoteH2s8f+BVf7sWwMXMj6yoUMA57rrBwarsncGioZnLnymgPPavkroEGiO
-RFTv7xJaoKoQ5GehiH4dViOfDW66MoSAJ6JLc8aSXKxsXaeagTIqYezbe7xEaDPa
-gV0IhezK+EDrUvczP+3gGVBMnnv0KK0mK1NlbPECgYEAqs9Usr1XfV/2T0qYY+6J
-KiEHav/SL583ED9ZwPxE/DArc0T0GdJj6ZLhhZFPRFaIRoV4LvoTEg/P5yAg3gkk
-ngc7BCofbkMJ5fIDKO7d6p8aPnlJDYz6GVtGNFJqoCFw7138b0YoxRar0nlUXWBj
-LfwTdN+4AsR0S8oLaKju7QQ=
------END PRIVATE KEY-----