2 Commits 54558df486 ... 00ef628d82

Auteur SHA1 Message Date
  zouxuan 00ef628d82 Merge remote-tracking branch 'origin/zx_online_update_1218' into zx_online_update_1218 il y a 1 jour
  zouxuan ad4966b79f 小组课 il y a 1 jour

+ 3 - 0
cooleshow-user/user-biz/src/main/java/com/yonge/cooleshow/biz/dal/vo/LiveCourseGroupVo.java

@@ -59,6 +59,9 @@ public class LiveCourseGroupVo {
     @ApiModelProperty(value = "手机号")
     private String phone;
 
+    @ApiModelProperty(value = "老师姓名")
+    private String teacherName;
+
     @ApiModelProperty("订单号")
     private String orderNo;
 

+ 19 - 13
cooleshow-user/user-biz/src/main/resources/config/mybatis/CourseGroupMapper.xml

@@ -167,7 +167,6 @@
     <select id="selectAdminLivePage" resultType="com.yonge.cooleshow.biz.dal.vo.LiveCourseGroupVo">
         select distinct
         cg.id_ as courseGroupId,
-
         cg.reason_ as                   reason,
         cg.name_ as name,
         cg.complete_course_num_ as endCourseNum,
@@ -182,28 +181,35 @@
             cssp.order_no_ as orderNo,
         </if>
         cg.im_group_id_  as imGroupId,
-        cg.course_plan_ as coursePlan
+        cg.course_plan_ as coursePlan,
+        su.username_ as teacherName,
+        su.phone_ as phone
         from course_group cg
-        left join course_schedule_student_payment cssp on cg.id_ = cssp.course_group_id_
-        left join sys_user su on su.id_ = cssp.user_id_
+        left join sys_user su on su.id_ = cg. teacher_id_
+        <if test="param.studentId != null">
+            left join course_schedule_student_payment cssp on cg.id_ = cssp.course_group_id_
+        </if>
         <where>
             <if test="param.teacherId != null">
                 and #{param.teacherId} = cg.teacher_id_
+                <if test="param.search != null and param.search !=''">
+                    and  (cg.id_ = #{param.search} or cg.name_ like concat('%',#{param.search},'%'))
+                </if>
             </if>
             <if test="param.studentId != null">
                 and #{param.studentId} = cssp.user_id_
-            </if>
-            <if test="param.search != null and param.search !=''">
-                and  (
-                    cg.id_ like concat('%',#{param.search},'%')
+                <if test="param.search != null and param.search !=''">
+                    and  (
+                    cg.id_ = #{param.search}
                     or cg.name_ like concat('%',#{param.search},'%')
-                    or su.id_ like concat('%',#{param.search},'%')
+                    or su.id_ = #{param.search}
                     or su.username_ like concat('%',#{param.search},'%')
                     or su.phone_  like concat('%',#{param.search},'%')
-                )
-            </if>
-            <if test="param.orderNo != null and param.orderNo != ''">
-                and cssp.order_no_ like concat('%',#{param.orderNo},'%')
+                    )
+                </if>
+                <if test="param.orderNo != null and param.orderNo != ''">
+                    and cssp.order_no_ like concat('%',#{param.orderNo},'%')
+                </if>
             </if>
             <if test="param.subjectId != null">
                 and #{param.subjectId} = cg.subject_id_