|
@@ -21,24 +21,25 @@
|
|
|
<result column="created_time_" jdbcType="TIMESTAMP" property="createdTime"/>
|
|
|
<result column="updated_by_" jdbcType="INTEGER" property="updatedBy"/>
|
|
|
<result column="updated_time_" jdbcType="TIMESTAMP" property="updatedTime"/>
|
|
|
+ <result column="pre_student_num_" jdbcType="INTEGER" property="preStudentNum"/>
|
|
|
</resultMap>
|
|
|
|
|
|
<sql id="Base_Column_List">
|
|
|
id_
|
|
|
- , type_, teacher_id_, name_, subject_id_, single_course_minutes_, course_num_, course_introduce_, course_price_, status_, sales_start_date_, sales_end_date_, background_pic_, mix_student_num_, course_start_time_, created_by_, created_time_, updated_by_, updated_time_
|
|
|
+ , type_, teacher_id_, name_, subject_id_, single_course_minutes_, course_num_, course_introduce_, course_price_, status_, sales_start_date_, sales_end_date_, background_pic_, mix_student_num_,pre_student_num_, course_start_time_, created_by_, created_time_, updated_by_, updated_time_
|
|
|
</sql>
|
|
|
|
|
|
<insert id="insertBatch" keyColumn="id_" keyProperty="id" useGeneratedKeys="true"
|
|
|
parameterType="com.yonge.cooleshow.biz.dal.entity.CourseGroup">
|
|
|
insert into course_group(type_, teacher_id_, name_, subject_id_, single_course_minutes_, course_num_,
|
|
|
course_introduce_, course_price_, status_, sales_start_date_, sales_end_date_, background_pic_,
|
|
|
- mix_student_num_, course_start_time_, created_by_, created_time_, updated_by_, updated_time_)
|
|
|
+ mix_student_num_,pre_student_num_, course_start_time_, created_by_, created_time_, updated_by_, updated_time_)
|
|
|
values
|
|
|
<foreach collection="entities" item="entity" separator=",">
|
|
|
(#{entity.type}, #{entity.teacherId}, #{entity.name}, #{entity.subjectId}, #{entity.singleCourseMinutes},
|
|
|
#{entity.courseNum}, #{entity.courseIntroduce}, #{entity.coursePrice}, #{entity.status},
|
|
|
#{entity.salesStartDate}, #{entity.salesEndDate}, #{entity.backgroundPic}, #{entity.mixStudentNum},
|
|
|
- #{entity.courseStartTime}, #{entity.createdBy}, #{entity.createdTime}, #{entity.updatedBy},
|
|
|
+ #{entity.preStudentNum},#{entity.courseStartTime}, #{entity.createdBy}, #{entity.createdTime}, #{entity.updatedBy},
|
|
|
#{entity.updatedTime})
|
|
|
</foreach>
|
|
|
</insert>
|
|
@@ -53,7 +54,7 @@
|
|
|
b.course_start_time_ as courseStartTime,
|
|
|
b.single_course_minutes_ as singleCourseMinutes,
|
|
|
a.status_ as `status`,
|
|
|
- ifnull(a.pre_student_num_, 0) as studentCount,
|
|
|
+ ifnull(b.pre_student_num_, 0) as studentCount,
|
|
|
b.background_pic_ as backgroundPic,
|
|
|
b.course_price_ as coursePrice,
|
|
|
b.course_num_ as courseNum
|