hgw 3 سال پیش
والد
کامیت
93b2d0ba58

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

@@ -30,8 +30,7 @@ public interface CourseScheduleService extends IService<CourseSchedule> {
      * 老师端-首页-我的课程-直播课
      *
      * @param param 传入参数
-     *              <p> - year 年
-     *              <p> - month 月
+     *              <p> - classDate 年月
      *              <p> - row 条数
      *              <p> - page 页数
      *              <p> - status 课程状态 NOT_START未开始 ING进行中 COMPLETE已完成

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

@@ -69,8 +69,7 @@ public class CourseScheduleServiceImpl extends ServiceImpl<CourseScheduleDao, Co
      * 老师端-首页-我的课程-直播课
      *
      * @param param 传入参数
-     *              <p> - year 年
-     *              <p> - month 月
+     *              <p> - classDate 年月
      *              <p> - row 条数
      *              <p> - page 页数
      *              <p> - status 课程状态 NOT_START未开始 ING进行中 COMPLETE已完成
@@ -79,10 +78,10 @@ public class CourseScheduleServiceImpl extends ServiceImpl<CourseScheduleDao, Co
     public PageInfo<TeacherLiveCourseInfoVo> queryTeacherLiveCourse(Map<String, Object> param) {
         String status = WrapperUtil.toStr(param, "status", "课程状态不能为空!");
         CourseScheduleEnum.existCourseState(status, "查询条件错误,课程状态不正确");
-        Integer year = WrapperUtil.toInt(param, "year", "查询时间年份不能为空!");
-        Integer month = WrapperUtil.toInt(param, "month", "查询时间月份不能为空!");
+        String classDate = WrapperUtil.toStr(param, "classDate", "查询时间不能为空!");
+        String[] classDateSp = classDate.split("-");
         //本月的第一天
-        LocalDate firstDay = LocalDate.of(year, month, 1);
+        LocalDate firstDay = LocalDate.of(Integer.parseInt(classDateSp[0]), Integer.parseInt(classDateSp[1]), 1);
         //本月的最后一天
         LocalDate lastDay = firstDay.with(TemporalAdjusters.lastDayOfMonth());
         //查询该月的所有课程

+ 1 - 2
cooleshow-user/user-teacher/src/main/java/com/yonge/cooleshow/teacher/controller/CourseScheduleController.java

@@ -46,8 +46,7 @@ public class CourseScheduleController extends BaseController {
     private SysUserFeignService sysUserFeignService;
 
     @ApiImplicitParams({
-            @ApiImplicitParam(name = "year", dataType = "Integer", value = "年"),
-            @ApiImplicitParam(name = "month", dataType = "Integer", value = "月"),
+            @ApiImplicitParam(name = "classDate", dataType = "Integer", value = "年月"),
             @ApiImplicitParam(name = "status", dataType = "String", value = "课程状态 NOT_START未开始 ING进行中 COMPLETE已完成"),
             @ApiImplicitParam(name = "subjectId", dataType = "Long", value = "声部id"),
             @ApiImplicitParam(name = "page", dataType = "Integer", value = "页数"),