Browse Source

新增筛选条件

cy 3 years ago
parent
commit
a0da30a8ac

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

@@ -36,6 +36,26 @@ public class CourseGroupDetailSearch extends QueryInfo {
     @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
     @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
     private Date endTime;
+    @ApiModelProperty(value = "学生id")
+    private Long studentId;
+    @ApiModelProperty(value = "老师id")
+    private Long teacherId;
+
+    public Long getStudentId() {
+        return studentId;
+    }
+
+    public void setStudentId(Long studentId) {
+        this.studentId = studentId;
+    }
+
+    public Long getTeacherId() {
+        return teacherId;
+    }
+
+    public void setTeacherId(Long teacherId) {
+        this.teacherId = teacherId;
+    }
 
     public Long getCourseGroupId() {
         return courseGroupId;

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

@@ -45,6 +45,28 @@ public class CourseGroupSearch extends QueryInfo {
     @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
     private Date endTime;
 
+    @ApiModelProperty(value = "学生id")
+    private Long studentId;
+
+    @ApiModelProperty(value = "老师id")
+    private Long teacherId;
+
+    public Long getStudentId() {
+        return studentId;
+    }
+
+    public void setStudentId(Long studentId) {
+        this.studentId = studentId;
+    }
+
+    public Long getTeacherId() {
+        return teacherId;
+    }
+
+    public void setTeacherId(Long teacherId) {
+        this.teacherId = teacherId;
+    }
+
     public Long getCourseId() {
         return courseId;
     }

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

@@ -380,6 +380,12 @@
         <if test="param.status != null and param.status != ''">
             AND cg.status_ = #{param.status}
         </if>
+        <if test="param.studentId != null">
+            AND sp.user_id_ = #{param.studentId}
+        </if>
+        <if test="param.teacherId != null">
+            AND cg.teacher_id_ = #{param.teacherId}
+        </if>
     </select>
     <select id="selectPracticeGroupDetail"
             resultType="com.yonge.cooleshow.biz.dal.vo.CourseGroupPracticeDetailVo">
@@ -447,6 +453,12 @@
             <if test="param.endTime != null">
                 AND endTime &gt;= #{param.endTime}
             </if>
+            <if test="param.studentId != null">
+                AND studentId = #{param.studentId}
+            </if>
+            <if test="param.teacherId != null">
+                AND teacherId = #{param.teacherId}
+            </if>
         </where>
     </select>
     <select id="selectLiveGroup" resultType="com.yonge.cooleshow.biz.dal.vo.CourseGroupLiveVo">