Browse Source

添加查询条件

liujc 2 years ago
parent
commit
a829038b13

+ 122 - 272
.idea/httpRequests/http-requests-log.http

@@ -1,3 +1,125 @@
+POST http://127.0.0.1:9002/teacherCourseSchedule/liveCoursePage
+Authorization: bearer 3c1eec84-6ee9-4c70-a4a8-d857d57338f6
+Content-Type: application/json
+Content-Length: 146
+Connection: Keep-Alive
+User-Agent: Apache-HttpClient/4.5.14 (Java/17.0.6)
+Accept-Encoding: br,deflate,gzip,x-gzip
+
+{
+  "page": 1,
+  "rows": 10,
+  "startTime": "2023-06-06 10:14:57",
+  "endTime": "2023-06-08 10:14:57",
+  "search": "",
+//  "status": "NOT_START"
+}
+
+<> 2023-06-08T110339.200.json
+
+###
+
+POST http://127.0.0.1:9002/teacherCourseSchedule/liveCoursePage
+Authorization: bearer 3c1eec84-6ee9-4c70-a4a8-d857d57338f6
+Content-Type: application/json
+Content-Length: 146
+Connection: Keep-Alive
+User-Agent: Apache-HttpClient/4.5.14 (Java/17.0.6)
+Accept-Encoding: br,deflate,gzip,x-gzip
+
+{
+  "page": 1,
+  "rows": 10,
+  "startTime": "2023-06-08 10:14:57",
+  "endTime": "2023-06-08 10:14:57",
+  "search": "",
+//  "status": "NOT_START"
+}
+
+<> 2023-06-08T110325.200.json
+
+###
+
+POST http://127.0.0.1:9002/teacherCourseSchedule/liveCoursePage
+Authorization: bearer 3c1eec84-6ee9-4c70-a4a8-d857d57338f6
+Content-Type: application/json
+Content-Length: 144
+Connection: Keep-Alive
+User-Agent: Apache-HttpClient/4.5.14 (Java/17.0.6)
+Accept-Encoding: br,deflate,gzip,x-gzip
+
+{
+  "page": 1,
+  "rows": 10,
+  "startTime": "2023-06-08 10:14:57",
+  "endTime": "2023-06-08 10:14:57",
+  "search": "",
+  "status": "NOT_START"
+}
+
+<> 2023-06-08T110304.200.json
+
+###
+
+POST http://127.0.0.1:9002/teacherCourseSchedule/liveCoursePage
+Authorization: bearer 3c1eec84-6ee9-4c70-a4a8-d857d57338f6
+Content-Type: application/json
+Content-Length: 144
+Connection: Keep-Alive
+User-Agent: Apache-HttpClient/4.5.14 (Java/17.0.6)
+Accept-Encoding: br,deflate,gzip,x-gzip
+
+{
+  "page": 1,
+  "rows": 10,
+  "startTime": "2023-06-08 10:14:57",
+  "endTime": "2023-06-08 10:14:57",
+  "search": "",
+  "status": "NOT_START"
+}
+
+<> 2023-06-08T102617.200.json
+
+###
+
+POST http://127.0.0.1:9002/teacherCourseSchedule/liveCoursePage
+Authorization: bearer 6dbea593-df93-4bf4-9f75-538c1bcc231e
+Content-Type: application/json
+Content-Length: 145
+Connection: Keep-Alive
+User-Agent: Apache-HttpClient/4.5.14 (Java/17.0.6)
+Accept-Encoding: br,deflate,gzip,x-gzip
+
+{
+  "page": 1,
+  "rows": 10,
+  "startTime": "2023-06-08 10:14:57",
+  "endTime": "2023-06-08 10:14:57",
+  "search": "",
+  "status": "NOT_START",
+}
+
+<> 2023-06-08T101549.200.json
+
+###
+
+POST http://127.0.0.1:9002/teacherCourseSchedule/liveCoursePage
+Authorization: bearer 6dbea593-df93-4bf4-9f75-538c1bcc231e
+Content-Length: 29
+Content-Type: */*; charset=UTF-8
+Connection: Keep-Alive
+User-Agent: Apache-HttpClient/4.5.14 (Java/17.0.6)
+Accept-Encoding: br,deflate,gzip,x-gzip
+
+{
+  "page": 1,
+  "rows": 10
+}
+
+<> 2023-06-08T100117.200.json
+
+###
+
 GET http://127.0.0.1:8005/task/liveCourseRemind
 Connection: Keep-Alive
 User-Agent: Apache-HttpClient/4.5.14 (Java/17.0.6)
@@ -616,275 +738,3 @@ Accept-Encoding: br,deflate,gzip,x-gzip
 
 ###
 
-POST http://127.0.0.1:8005/imGroup/schoolQueryGroupList
-Authorization: bearer 81d0c352-fcc8-4812-87f5-0f7a68d10451
-Content-Type: application/json
-Content-Length: 114
-Connection: Keep-Alive
-User-Agent: Apache-HttpClient/4.5.14 (Java/17.0.6)
-Accept-Encoding: br,deflate,gzip,x-gzip
-
-{
-//    "keyword": "乐团预报名",
-    "groupType": "NORMAL",
-    "musicGroupId": "142",
-  //  "roleType": ""
-}
-
-<> 2023-06-01T162557.200.json
-
-###
-
-POST http://127.0.0.1:8005/imGroup/schoolQueryGroupList
-Authorization: bearer 241259a3-5563-410e-bed2-cd887f294b8b
-Content-Type: application/json
-Content-Length: 114
-Connection: Keep-Alive
-User-Agent: Apache-HttpClient/4.5.14 (Java/17.0.6)
-Accept-Encoding: br,deflate,gzip,x-gzip
-
-{
-//    "keyword": "乐团预报名",
-    "groupType": "NORMAL",
-    "musicGroupId": "142",
-  //  "roleType": ""
-}
-
-<> 2023-06-01T162533.200.json
-
-###
-
-POST http://127.0.0.1:8005/imGroup/schoolQueryGroupList
-Authorization: bearer 241259a3-5563-410e-bed2-cd887f294b8b
-Content-Type: application/json
-Content-Length: 114
-Connection: Keep-Alive
-User-Agent: Apache-HttpClient/4.5.14 (Java/17.0.6)
-Accept-Encoding: br,deflate,gzip,x-gzip
-
-{
-//    "keyword": "乐团预报名",
-    "groupType": "NORMAL",
-    "musicGroupId": "142",
-  //  "roleType": ""
-}
-
-<> 2023-06-01T162517.200.json
-
-###
-
-POST http://127.0.0.1:8005/imGroup/schoolQueryGroupList
-Authorization: bearer 241259a3-5563-410e-bed2-cd887f294b8b
-Content-Type: application/json
-Content-Length: 118
-Connection: Keep-Alive
-User-Agent: Apache-HttpClient/4.5.14 (Java/17.0.6)
-Accept-Encoding: br,deflate,gzip,x-gzip
-
-{
-//    "keyword": "乐团预报名",
-//    "groupType": "NORMAL",
-//    "musicGroupId": "142",
-  //  "roleType": ""
-}
-
-<> 2023-06-01T162055.200.json
-
-###
-
-POST http://127.0.0.1:8005/imGroup/schoolQueryGroupList
-Authorization: bearer 241259a3-5563-410e-bed2-cd887f294b8b
-Content-Type: application/json
-Content-Length: 114
-Connection: Keep-Alive
-User-Agent: Apache-HttpClient/4.5.14 (Java/17.0.6)
-Accept-Encoding: br,deflate,gzip,x-gzip
-
-{
-//    "keyword": "乐团预报名",
-    "groupType": "NORMAL",
-    "musicGroupId": "142",
-  //  "roleType": ""
-}
-
-<> 2023-06-01T162047.200.json
-
-###
-
-POST http://127.0.0.1:8005/imGroup/schoolQueryGroupList
-Authorization: bearer 241259a3-5563-410e-bed2-cd887f294b8b
-Content-Type: application/json
-Content-Length: 132
-Connection: Keep-Alive
-User-Agent: Apache-HttpClient/4.5.14 (Java/17.0.6)
-Accept-Encoding: br,deflate,gzip,x-gzip
-
-{
-//    "keyword": "乐团预报名",
-//    "groupType": "NORMAL",
-//    "musicGroupId": "23050515070500001",
-  //  "roleType": ""
-}
-
-<> 2023-06-01T162031.200.json
-
-###
-
-POST http://127.0.0.1:8005/imGroup/schoolQueryFriendList
-Authorization: bearer 241259a3-5563-410e-bed2-cd887f294b8b
-Content-Type: application/json
-Content-Length: 154
-Connection: Keep-Alive
-User-Agent: Apache-HttpClient/4.5.14 (Java/17.0.6)
-Accept-Encoding: br,deflate,gzip,x-gzip
-
-{
-//  "keyword": "宁老师",
-//  "groupType": "SCHOOL",
-  "roleType": "ORCHESTRA_MANAGER",
-  "musicGroupId": "23042416211000001",
-//  "lockFlag": false
-}
-
-<> 2023-06-01T161949.200.json
-
-###
-
-POST http://127.0.0.1:8005/imGroup/schoolQueryFriendList
-Authorization: bearer 241259a3-5563-410e-bed2-cd887f294b8b
-Content-Type: application/json
-Content-Length: 154
-Connection: Keep-Alive
-User-Agent: Apache-HttpClient/4.5.14 (Java/17.0.6)
-Accept-Encoding: br,deflate,gzip,x-gzip
-
-{
-//  "keyword": "宁老师",
-//  "groupType": "SCHOOL",
-  "roleType": "ORCHESTRA_MANAGER",
-  "musicGroupId": "23042416211000001",
-//  "lockFlag": false
-}
-
-<> 2023-06-01T161053.200.json
-
-###
-
-POST http://127.0.0.1:8005/imGroup/schoolQueryFriendList
-Authorization: bearer 241259a3-5563-410e-bed2-cd887f294b8b
-Content-Type: application/json
-Content-Length: 156
-Connection: Keep-Alive
-User-Agent: Apache-HttpClient/4.5.14 (Java/17.0.6)
-Accept-Encoding: br,deflate,gzip,x-gzip
-
-{
-//  "keyword": "宁老师",
-//  "groupType": "SCHOOL",
-//  "roleType": "ORCHESTRA_MANAGER",
-  "musicGroupId": "23042416211000001",
-//  "lockFlag": false
-}
-
-<> 2023-06-01T161046.200.json
-
-###
-
-POST http://127.0.0.1:8005/imGroup/schoolQueryFriendList
-Authorization: bearer 241259a3-5563-410e-bed2-cd887f294b8b
-Content-Type: application/json
-Content-Length: 156
-Connection: Keep-Alive
-User-Agent: Apache-HttpClient/4.5.14 (Java/17.0.6)
-Accept-Encoding: br,deflate,gzip,x-gzip
-
-{
-//  "keyword": "宁老师",
-//  "groupType": "SCHOOL",
-//  "roleType": "ORCHESTRA_MANAGER",
-  "musicGroupId": "23042416211000001",
-//  "lockFlag": false
-}
-
-<> 2023-06-01T160758.200.json
-
-###
-
-POST http://127.0.0.1:8005/imGroup/schoolQueryFriendList
-Authorization: bearer 241259a3-5563-410e-bed2-cd887f294b8b
-Content-Type: application/json
-Content-Length: 158
-Connection: Keep-Alive
-User-Agent: Apache-HttpClient/4.5.14 (Java/17.0.6)
-Accept-Encoding: br,deflate,gzip,x-gzip
-
-{
-//  "keyword": "宁老师",
-//  "groupType": "SCHOOL",
-//  "roleType": "ORCHESTRA_MANAGER",
-//  "musicGroupId": "23053118101300001",
-//  "lockFlag": false
-}
-
-<> 2023-06-01T160642.200.json
-
-###
-
-POST http://127.0.0.1:8005/imGroup/schoolQueryFriendList
-Authorization: bearer 241259a3-5563-410e-bed2-cd887f294b8b
-Content-Type: application/json
-Content-Length: 154
-Connection: Keep-Alive
-User-Agent: Apache-HttpClient/4.5.14 (Java/17.0.6)
-Accept-Encoding: br,deflate,gzip,x-gzip
-
-{
-//  "keyword": "宁老师",
-//  "groupType": "SCHOOL",
-  "roleType": "ORCHESTRA_MANAGER",
-  "musicGroupId": "23053118101300001",
-//  "lockFlag": false
-}
-
-<> 2023-06-01T160633.200.json
-
-###
-
-POST http://127.0.0.1:8005/imGroup/schoolQueryFriendList
-Authorization: bearer 241259a3-5563-410e-bed2-cd887f294b8b
-Content-Type: application/json
-Content-Length: 152
-Connection: Keep-Alive
-User-Agent: Apache-HttpClient/4.5.14 (Java/17.0.6)
-Accept-Encoding: br,deflate,gzip,x-gzip
-
-{
-//  "keyword": "宁老师",
-//  "groupType": "SCHOOL",
-  "roleType": "ORCHESTRA_MANAGER",
-  "musicGroupId": "23053118101300001",
-  "lockFlag": false
-}
-
-<> 2023-06-01T160625.200.json
-
-###
-
-POST http://127.0.0.1:8005/studentManage/userDetail
-Authorization: bearer 81d0c352-fcc8-4812-87f5-0f7a68d10451
-Content-Type: application/json
-coopId: 1
-Content-Length: 63
-Connection: Keep-Alive
-User-Agent: Apache-HttpClient/4.5.14 (Java/17.0.6)
-Accept-Encoding: br,deflate,gzip,x-gzip
-
-{
-  "studentId": 2248340,
-  "musicGroupId": 23042419330600001
-}
-
-<> 2023-06-01T160136.200.json
-
-###
-

+ 8 - 0
mec-biz/src/main/java/com/ym/mec/biz/dal/wrapper/LiveGroupWrapper.java

@@ -1,6 +1,8 @@
 package com.ym.mec.biz.dal.wrapper;
 
 import com.microsvc.toolkit.common.response.paging.QueryInfo;
+import com.ym.mec.biz.dal.entity.CourseSchedule;
+import com.ym.mec.biz.dal.enums.CourseStatusEnum;
 import io.swagger.annotations.ApiModel;
 import io.swagger.annotations.ApiModelProperty;
 import lombok.AllArgsConstructor;
@@ -97,6 +99,12 @@ public class LiveGroupWrapper {
         @ApiModelProperty("结束时间")
         private Date endTime;
 
+        @ApiModelProperty("模糊查询")
+        private String search;
+
+        @ApiModelProperty("课程状态")
+        private CourseStatusEnum status;
+
         private Integer teacherId;
 
         private Integer tenantId;

+ 6 - 0
mec-biz/src/main/resources/config/mybatis/LiveGroupPlusMapper.xml

@@ -63,6 +63,12 @@
         AND cs.class_date_ &lt;= date_format(#{param.endTime},'%Y-%m-%d')
     </if>
     AND csts.user_id_ = #{param.teacherId} AND cs.pre_course_flag_ = 0
+    <if test="param.status != null">
+        AND cs.status_ = #{param.status}
+    </if>
+    <if test="param.search != null and param.search != ''">
+        AND (cs.name_ LIKE CONCAT('%',#{param.search},'%'))
+    </if>
     ORDER BY start_class_time_
     </select>
 </mapper>

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

@@ -395,7 +395,7 @@ public class TeacherCourseScheduleController extends BaseController {
 
     @ApiOperation(value = "老师乐直播直播课课程列表")
     @PostMapping("/liveCoursePage")
-    public HttpResponseResult<PageInfo<CourseScheduleDto>> liveCoursePage(LiveGroupWrapper.LiveCoursePageQuery queryInfo){
+    public HttpResponseResult<PageInfo<CourseScheduleDto>> liveCoursePage(@RequestBody LiveGroupWrapper.LiveCoursePageQuery queryInfo){
 
 
         SysUser user = sysUserService.getUser();