|
@@ -17,6 +17,7 @@
|
|
|
<result column="sales_end_date_" jdbcType="TIMESTAMP" property="salesEndDate"/>
|
|
|
<result column="background_pic_" jdbcType="VARCHAR" property="backgroundPic"/>
|
|
|
<result column="mix_student_num_" jdbcType="INTEGER" property="mixStudentNum"/>
|
|
|
+ <result column="max_student_num_" jdbcType="INTEGER" property="maxStudentNum"/>
|
|
|
<result column="course_start_time_" jdbcType="TIMESTAMP" property="courseStartTime"/>
|
|
|
<result column="created_by_" jdbcType="INTEGER" property="createdBy"/>
|
|
|
<result column="created_time_" jdbcType="TIMESTAMP" property="createdTime"/>
|
|
@@ -32,7 +33,7 @@
|
|
|
id_
|
|
|
, type_, teacher_id_, name_, subject_id_, single_course_minutes_, course_num_,
|
|
|
complete_course_num_, course_introduce_, course_price_, status_, sales_start_date_,
|
|
|
- sales_end_date_, background_pic_, mix_student_num_,pre_student_num_, im_group_id_,
|
|
|
+ sales_end_date_, background_pic_, mix_student_num_,max_student_num_,pre_student_num_, im_group_id_,
|
|
|
course_start_time_, created_by_, created_time_, updated_by_, updated_time_,reason_,course_plan_
|
|
|
</sql>
|
|
|
|
|
@@ -40,12 +41,12 @@
|
|
|
parameterType="com.yonge.cooleshow.biz.dal.entity.CourseGroup">
|
|
|
insert into course_group(type_, teacher_id_, name_, subject_id_, single_course_minutes_, course_num_,
|
|
|
complete_course_num_, course_introduce_, course_price_, status_, sales_start_date_, sales_end_date_, background_pic_,
|
|
|
- mix_student_num_,pre_student_num_,im_group_id_, course_start_time_, created_by_, created_time_, updated_by_, updated_time_,reason_,course_plan_)
|
|
|
+ mix_student_num_,max_student_num_,pre_student_num_,im_group_id_, course_start_time_, created_by_, created_time_, updated_by_, updated_time_,reason_,course_plan_)
|
|
|
values
|
|
|
<foreach collection="entities" item="entity" separator=",">
|
|
|
(#{entity.type}, #{entity.teacherId}, #{entity.name}, #{entity.subjectId}, #{entity.singleCourseMinutes},
|
|
|
#{entity.courseNum}, #{entity.completeCourseNum}, #{entity.courseIntroduce}, #{entity.coursePrice}, #{entity.status},
|
|
|
- #{entity.salesStartDate}, #{entity.salesEndDate}, #{entity.backgroundPic}, #{entity.mixStudentNum},
|
|
|
+ #{entity.salesStartDate}, #{entity.salesEndDate}, #{entity.backgroundPic}, #{entity.mixStudentNum},#{entity.maxStudentNum},
|
|
|
#{entity.preStudentNum},#{entity.imGroupId},#{entity.courseStartTime}, #{entity.createdBy}, #{entity.createdTime}, #{entity.updatedBy},
|
|
|
#{entity.updatedTime},#{entity.reason},#{entity.coursePlan})
|
|
|
</foreach>
|
|
@@ -69,6 +70,7 @@
|
|
|
b.sales_start_date_ as salesStartDate,
|
|
|
b.sales_end_date_ as salesEndDate,
|
|
|
b.mix_student_num_ as mixStudentNum,
|
|
|
+ b.max_student_num_ as maxStudentNum,
|
|
|
b.im_group_id_ as imGroupId,
|
|
|
b.reason_ as reason,
|
|
|
b.course_plan_ as coursePlan,
|
|
@@ -118,6 +120,7 @@
|
|
|
b.sales_start_date_ as salesStartDate,
|
|
|
b.sales_end_date_ as salesEndDate,
|
|
|
b.mix_student_num_ as mixStudentNum,
|
|
|
+ b.max_student_num_ as maxStudentNum,
|
|
|
b.im_group_id_ as imGroupId,
|
|
|
b.reason_ as reason,
|
|
|
b.course_plan_ as coursePlan,
|
|
@@ -155,6 +158,9 @@
|
|
|
<if test="param.subjectId != null ">
|
|
|
and #{param.subjectId} = b.subject_id_
|
|
|
</if>
|
|
|
+ <if test="param.type != null and param.type != ''">
|
|
|
+ and b.type_ = #{param.type}
|
|
|
+ </if>
|
|
|
</where>
|
|
|
</select>
|
|
|
|
|
@@ -497,23 +503,27 @@
|
|
|
FROM course_group cg
|
|
|
LEFT JOIN `subject` sb ON cg.subject_id_=sb.id_
|
|
|
LEFT JOIN sys_user su ON su.id_=cg.teacher_id_
|
|
|
- LEFT JOIN (SELECT course_group_id_,COUNT(1) AS count_ FROM course_schedule WHERE type_='LIVE' AND status_='COMPLETE' GROUP BY course_group_id_) cm ON cg.id_=cm.course_group_id_
|
|
|
- LEFT JOIN (SELECT course_group_id_,start_time_ FROM course_schedule WHERE type_='LIVE' GROUP BY course_group_id_) st ON cg.id_=st.course_group_id_
|
|
|
- WHERE cg.type_='LIVE'
|
|
|
- <if test="param.search != null and param.search != ''">
|
|
|
- AND (
|
|
|
- cg.id_ LIKE concat('%',#{param.search},'%') OR
|
|
|
- cg.teacher_id_ LIKE concat('%',#{param.search},'%') OR
|
|
|
- cg.name_ LIKE concat('%',#{param.search},'%') OR
|
|
|
- su.username_ LIKE concat('%',#{param.search},'%')
|
|
|
- )
|
|
|
- </if>
|
|
|
- <if test="param.subjectId != null">
|
|
|
- AND cg.subject_id_ = #{param.subjectId}
|
|
|
- </if>
|
|
|
- <if test="param.status != null and param.status != ''">
|
|
|
- AND cg.status_ = #{param.status}
|
|
|
- </if>
|
|
|
+ LEFT JOIN (SELECT course_group_id_,COUNT(1) AS count_ FROM course_schedule WHERE type_ = #{param.groupType} AND status_='COMPLETE' GROUP BY course_group_id_) cm ON cg.id_=cm.course_group_id_
|
|
|
+ LEFT JOIN (SELECT course_group_id_,start_time_ FROM course_schedule WHERE type_ = #{param.groupType} GROUP BY course_group_id_) st ON cg.id_=st.course_group_id_
|
|
|
+ <where>
|
|
|
+ <if test="param.search != null and param.search != ''">
|
|
|
+ AND (
|
|
|
+ cg.id_ LIKE concat('%',#{param.search},'%') OR
|
|
|
+ cg.teacher_id_ LIKE concat('%',#{param.search},'%') OR
|
|
|
+ cg.name_ LIKE concat('%',#{param.search},'%') OR
|
|
|
+ su.username_ LIKE concat('%',#{param.search},'%')
|
|
|
+ )
|
|
|
+ </if>
|
|
|
+ <if test="param.subjectId != null">
|
|
|
+ AND cg.subject_id_ = #{param.subjectId}
|
|
|
+ </if>
|
|
|
+ <if test="param.groupType != null and param.groupType != ''">
|
|
|
+ AND cg.type_ = #{param.groupType}
|
|
|
+ </if>
|
|
|
+ <if test="param.status != null and param.status != ''">
|
|
|
+ AND cg.status_ = #{param.status}
|
|
|
+ </if>
|
|
|
+ </where>
|
|
|
</select>
|
|
|
<select id="selectLiveGroupStudent" resultType="com.yonge.cooleshow.biz.dal.vo.CourseSchedulePaymentVo">
|
|
|
SELECT
|