zouxuan 8 mesiacov pred
rodič
commit
a36a64cd85

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

@@ -1035,6 +1035,9 @@
             <if test="param.courseType != null and param.courseType != ''">
                 AND cg.type_ = #{param.courseType}
             </if>
+            <if test="param.search != null and param.search != ''">
+                AND cg.name_ LIKE concat('%',#{param.search},'%')
+            </if>
         </where>
     </select>
     <select id="studentCourseGroup"
@@ -1044,6 +1047,7 @@
                cg.complete_course_num_ completeCourseNum,cg.course_num_ courseNum,
                cg.id_ courseGroupId,cg.course_plan_ coursePlan,cg.teacher_id_ teacherId
         from course_group cg
+        LEFT JOIN sys_user su ON cg.teacher_id_ = su.id_
         left join course_schedule_student_payment cssp ON cssp.course_group_id_ = cg.id_
         <where>
             <if test="param.teacherId != null">
@@ -1064,6 +1068,9 @@
             <if test="param.courseType != null and param.courseType != ''">
                 AND cg.type_ = #{param.courseType}
             </if>
+            <if test="param.search != null and param.search != ''">
+                AND (cg.name_ LIKE concat('%',#{param.search},'%') OR su.username_ LIKE concat('%',#{param.search},'%'))
+            </if>
         </where>
         GROUP BY cg.id_
     </select>