|
@@ -22,6 +22,7 @@
|
|
<result column="buy_months_" property="buyMonths" />
|
|
<result column="buy_months_" property="buyMonths" />
|
|
<result column="drill_times_on_week_" property="drillTimesOnWeek" />
|
|
<result column="drill_times_on_week_" property="drillTimesOnWeek" />
|
|
<result column="drill_times_json_" property="drillTimesJson" />
|
|
<result column="drill_times_json_" property="drillTimesJson" />
|
|
|
|
+ <result column="group_status_" property="groupStatus" typeHandler="com.ym.mec.common.dal.CustomEnumTypeHandler"/>
|
|
</resultMap>
|
|
</resultMap>
|
|
|
|
|
|
<resultMap id="PracticeCourseDto" type="com.ym.mec.biz.dal.dto.PracticeCourseDto" extends="PracticeGroup">
|
|
<resultMap id="PracticeCourseDto" type="com.ym.mec.biz.dal.dto.PracticeCourseDto" extends="PracticeGroup">
|
|
@@ -30,7 +31,7 @@
|
|
<result property="subjectName" column="subject_name_"/>
|
|
<result property="subjectName" column="subject_name_"/>
|
|
</resultMap>
|
|
</resultMap>
|
|
|
|
|
|
- <resultMap type="com.ym.mec.biz.dal.dto.PracticeGroupDto" id="PracticeGroupDto">
|
|
|
|
|
|
+ <resultMap type="com.ym.mec.biz.dal.dto.PracticeGroupDto" id="PracticeGroupDto" extends="PracticeGroup">
|
|
<result column="id_" property="id" />
|
|
<result column="id_" property="id" />
|
|
<result column="name_" property="name" />
|
|
<result column="name_" property="name" />
|
|
<result column="subject_id_" property="subjectId" />
|
|
<result column="subject_id_" property="subjectId" />
|
|
@@ -50,6 +51,17 @@
|
|
WHERE id_ = #{practiceGroupId}
|
|
WHERE id_ = #{practiceGroupId}
|
|
</update>
|
|
</update>
|
|
|
|
|
|
|
|
+ <update id="update" parameterType="com.ym.mec.biz.dal.entity.PracticeGroup">
|
|
|
|
+ UPDATE practice_group
|
|
|
|
+ <set>
|
|
|
|
+ <if test="groupStatus!=null">
|
|
|
|
+ group_status_=#{groupStatus,typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler},
|
|
|
|
+ </if>
|
|
|
|
+ update_time_ = NOW()
|
|
|
|
+ </set>
|
|
|
|
+ WHERE id_ = #{id}
|
|
|
|
+ </update>
|
|
|
|
+
|
|
<!-- 根据主键查询一条记录 -->
|
|
<!-- 根据主键查询一条记录 -->
|
|
<select id="get" resultMap="PracticeGroup">
|
|
<select id="get" resultMap="PracticeGroup">
|
|
SELECT * FROM practice_group WHERE id_ = #{id}
|
|
SELECT * FROM practice_group WHERE id_ = #{id}
|
|
@@ -68,8 +80,8 @@
|
|
</selectKey>
|
|
</selectKey>
|
|
-->
|
|
-->
|
|
INSERT INTO practice_group
|
|
INSERT INTO practice_group
|
|
- (id_,name_,subject_id_,user_id_,student_id_,single_class_minutes_,organ_id_,courses_start_date_,courses_expire_date_,create_time_,update_time_,memo_,buy_months_,drill_times_on_week_,drill_times_json_)
|
|
|
|
- VALUES(#{id},#{name},#{subjectId},#{userId},#{studentId},#{singleClassMinutes},#{organId},#{coursesStartDate},#{coursesExpireDate},NOW(),NOW(),#{memo},#{buyMonths},#{drillTimesOnWeek},#{drillTimesJson})
|
|
|
|
|
|
+ (id_,name_,subject_id_,user_id_,student_id_,single_class_minutes_,organ_id_,courses_start_date_,courses_expire_date_,create_time_,update_time_,memo_,buy_months_,drill_times_on_week_,drill_times_json_,group_status_)
|
|
|
|
+ VALUES(#{id},#{name},#{subjectId},#{userId},#{studentId},#{singleClassMinutes},#{organId},#{coursesStartDate},#{coursesExpireDate},NOW(),NOW(),#{memo},#{buyMonths},#{drillTimesOnWeek},#{drillTimesJson},#{groupStatus,typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler})
|
|
</insert>
|
|
</insert>
|
|
|
|
|
|
|
|
|
|
@@ -137,6 +149,7 @@
|
|
|
|
|
|
<sql id="practiceGroupQueryCondition">
|
|
<sql id="practiceGroupQueryCondition">
|
|
<where>
|
|
<where>
|
|
|
|
+ pg.group_status_='NORMAL'
|
|
<if test="search!=null and search!=''">
|
|
<if test="search!=null and search!=''">
|
|
AND (pg.name_ LIKE CONCAT('%',#{search},'%') OR pg.id_= #{search})
|
|
AND (pg.name_ LIKE CONCAT('%',#{search},'%') OR pg.id_= #{search})
|
|
</if>
|
|
</if>
|