|
@@ -1,123 +1,135 @@
|
|
|
<?xml version="1.0" encoding="UTF-8" ?>
|
|
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
|
|
-<!--
|
|
|
-这个文件是自动生成的。
|
|
|
-不要修改此文件。所有改动将在下次重新自动生成时丢失。
|
|
|
--->
|
|
|
+<!-- 这个文件是自动生成的。 不要修改此文件。所有改动将在下次重新自动生成时丢失。 -->
|
|
|
<mapper namespace="com.ym.mec.web.dal.dao.MusicGroupDao">
|
|
|
- <resultMap type="com.ym.mec.web.dal.entity.MusicGroup" id="MusicGroup">
|
|
|
- <result column="id_" property="id"/>
|
|
|
- <result column="name_" property="name"/>
|
|
|
- <result column="organ_id_" property="organId"/>
|
|
|
- <result column="school_id_" property="schoolId"/>
|
|
|
- <result column="apply_expire_date_" property="applyExpireDate"/>
|
|
|
- <result column="team_teacher_id_" property="teamTeacherId"/>
|
|
|
- <result column="educational_teacher_id_" property="educationalTeacherId"/>
|
|
|
- <result column="charge_type_id_" property="chargeTypeId"/>
|
|
|
- <result column="course_group_id_" property="courseGroupId"/>
|
|
|
- <result column="class_period_" property="classPeriod"/>
|
|
|
- <result column="free_class_period_" property="freeClassPeriod"/>
|
|
|
- <result column="create_time_" property="createTime"/>
|
|
|
- <result column="update_time_" property="updateTime"/>
|
|
|
- <result column="status_" property="status" typeHandler="com.ym.mec.common.dal.CustomEnumTypeHandler"/>
|
|
|
- <result column="payment_expire_date_" property="paymentExpireDate"/>
|
|
|
- <result column="bill_start_date_" property="billStartDate"/>
|
|
|
- <result column="improvent_classes_num_" property="improventClassesNum"/>
|
|
|
- <result column="enroll_classes_" property="enrollClasses"/>
|
|
|
- <result column="is_extra_class_" property="isExtraClass"/>
|
|
|
- </resultMap>
|
|
|
|
|
|
- <!-- 根据主键查询一条记录 -->
|
|
|
- <select id="get" resultMap="MusicGroup">
|
|
|
- SELECT * FROM music_group WHERE id_ = #{id}
|
|
|
+ <resultMap type="com.ym.mec.web.dal.entity.MusicGroup" id="MusicGroup">
|
|
|
+ <result column="id_" property="id" />
|
|
|
+ <result column="name_" property="name" />
|
|
|
+ <result column="organ_id_" property="organId" />
|
|
|
+ <result column="school_id_" property="schoolId" />
|
|
|
+ <result column="apply_expire_date_" property="applyExpireDate" />
|
|
|
+ <result column="team_teacher_id_" property="teamTeacherId" />
|
|
|
+ <result column="educational_teacher_id_" property="educationalTeacherId" />
|
|
|
+ <result column="charge_type_id_" property="chargeTypeId" />
|
|
|
+ <result column="course_form_" property="courseForm" />
|
|
|
+ <result column="create_time_" property="createTime" />
|
|
|
+ <result column="update_time_" property="updateTime" />
|
|
|
+ <result column="status_" property="status" />
|
|
|
+ <result column="bill_start_date_" property="billStartDate" />
|
|
|
+ <result column="improvent_classes_num_" property="improventClassesNum" />
|
|
|
+ <result column="enroll_classes_" property="enrollClasses" />
|
|
|
+ <result column="payment_expire_date_" property="paymentExpireDate" />
|
|
|
+ <result column="is_extra_class_" property="isExtraClass" />
|
|
|
+ <result column="cooperation_organ_id_" property="cooperationOrganId" />
|
|
|
+ <result column="enlightenment_course_time_" property="enlightenmentCourseTime" />
|
|
|
+ <result column="parent_meeting_time_" property="parentMeetingTime" />
|
|
|
+ </resultMap>
|
|
|
+
|
|
|
+ <!-- 根据主键查询一条记录 -->
|
|
|
+ <select id="get" resultMap="MusicGroup">
|
|
|
+ SELECT * FROM
|
|
|
+ music_group WHERE id_ = #{id}
|
|
|
</select>
|
|
|
|
|
|
- <!-- 全查询 -->
|
|
|
- <select id="findAll" resultMap="MusicGroup">
|
|
|
- SELECT * FROM music_group ORDER BY id_
|
|
|
+ <!-- 全查询 -->
|
|
|
+ <select id="findAll" resultMap="MusicGroup">
|
|
|
+ SELECT * FROM music_group ORDER
|
|
|
+ BY id_
|
|
|
</select>
|
|
|
|
|
|
- <!-- 向数据库增加一条记录 -->
|
|
|
- <insert id="insert" parameterType="com.ym.mec.web.dal.entity.MusicGroup" useGeneratedKeys="true" keyColumn="id"
|
|
|
- keyProperty="id">
|
|
|
- INSERT INTO music_group
|
|
|
- (id_,name_,organ_id_,school_id_,apply_expire_date_,improvent_classes_num_,enroll_classes_,team_teacher_id_,educational_teacher_id_,charge_type_id_,course_group_id_,class_period_,free_class_period_,create_time_,update_time_,status_,payment_expire_date_,bill_start_date_,payment_method_)
|
|
|
- VALUES(#{id},#{name},#{organId},#{schoolId},#{applyExpireDate},#{improventClassesNum},#{enrollClasses},#{teamTeacherId},#{educationalTeacherId},#{chargeTypeId},#{courseGroupId},#{classPeriod},#{freeClassPeriod},now(),now(),#{status,typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler},
|
|
|
- #{paymentExpireDate},#{billStartDate},#{isExtraClass})
|
|
|
- </insert>
|
|
|
+ <!-- 向数据库增加一条记录 -->
|
|
|
+ <insert id="insert" parameterType="com.ym.mec.web.dal.entity.MusicGroup"
|
|
|
+ useGeneratedKeys="true" keyColumn="id" keyProperty="id">
|
|
|
+ <!-- <selectKey resultClass="int" keyProperty="id" > SELECT SEQ_WSDEFINITION_ID.nextval
|
|
|
+ AS ID FROM DUAL </selectKey> -->
|
|
|
+ INSERT INTO music_group
|
|
|
+ (id_,name_,organ_id_,school_id_,apply_expire_date_,team_teacher_id_,educational_teacher_id_,charge_type_id_,course_form_,create_time_,update_time_,status_,bill_start_date_,improvent_classes_num_,enroll_classes_,payment_expire_date_,is_extra_class_,cooperation_organ_id_,enlightenment_course_time_,parent_meeting_time_)
|
|
|
+ VALUES(#{id},#{name},#{organId},#{schoolId},#{applyExpireDate},#{teamTeacherId},#{educationalTeacherId},#{chargeTypeId},#{courseForm},#{createTime},#{updateTime},#{status},#{billStartDate},#{improventClassesNum},#{enrollClasses},#{paymentExpireDate},#{isExtraClass},#{cooperationOrganId},#{enlightenmentCourseTime},#{parentMeetingTime})
|
|
|
+ </insert>
|
|
|
|
|
|
- <!-- 根据主键查询一条记录 -->
|
|
|
- <update id="update" parameterType="com.ym.mec.web.dal.entity.MusicGroup">
|
|
|
- UPDATE music_group
|
|
|
- <set>
|
|
|
- <if test="status != null">
|
|
|
- status_ = #{status,typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler},
|
|
|
- </if>
|
|
|
- <if test="organId != null">
|
|
|
- organ_id_ = #{organId},
|
|
|
- </if>
|
|
|
- <if test="improventClassesNum != null">
|
|
|
- improvent_classes_num_ = #{improventClassesNum},
|
|
|
- </if>
|
|
|
- <if test="enrollClasses != null">
|
|
|
- enroll_classes_ = #{enrollClasses},
|
|
|
- </if>
|
|
|
- <if test="chargeTypeId != null">
|
|
|
- charge_type_id_ = #{chargeTypeId},
|
|
|
- </if>
|
|
|
- <if test="courseGroupId != null">
|
|
|
- course_group_id_ = #{courseGroupId},
|
|
|
- </if>
|
|
|
- <if test="educationalTeacherId != null">
|
|
|
- educational_teacher_id_ = #{educationalTeacherId},
|
|
|
- </if>
|
|
|
- <if test="classPeriod != null">
|
|
|
- class_period_ = #{classPeriod},
|
|
|
- </if>
|
|
|
- <if test="name != null">
|
|
|
- name_ = #{name},
|
|
|
- </if>
|
|
|
- <if test="freeClassPeriod != null">
|
|
|
- free_class_period_ = #{freeClassPeriod},
|
|
|
- </if>
|
|
|
- <if test="paymentExpireDate != null">
|
|
|
- payment_expire_date_ = #{paymentExpireDate},
|
|
|
- </if>
|
|
|
- <if test="schoolId != null">
|
|
|
- school_id_ = #{schoolId},
|
|
|
- </if>
|
|
|
- <if test="applyExpireDate != null">
|
|
|
- apply_expire_date_ = #{applyExpireDate},
|
|
|
- </if>
|
|
|
- <if test="billStartDate != null">
|
|
|
- bill_start_date_ = #{billStartDate},
|
|
|
- </if>
|
|
|
- <if test="updateTime != null">
|
|
|
- update_time_ = #{updateTime},
|
|
|
- </if>
|
|
|
- <if test="teamTeacherId != null">
|
|
|
- team_teacher_id_ = #{teamTeacherId},
|
|
|
- </if>
|
|
|
+ <!-- 根据主键查询一条记录 -->
|
|
|
+ <update id="update" parameterType="com.ym.mec.web.dal.entity.MusicGroup">
|
|
|
+ UPDATE music_group
|
|
|
+ <set>
|
|
|
+ <if test="status != null">
|
|
|
+ status_ = #{status},
|
|
|
+ </if>
|
|
|
+ <if test="organId != null">
|
|
|
+ organ_id_ = #{organId},
|
|
|
+ </if>
|
|
|
+ <if test="improventClassesNum != null">
|
|
|
+ improvent_classes_num_ = #{improventClassesNum},
|
|
|
+ </if>
|
|
|
+ <if test="id != null">
|
|
|
+ id_ = #{id},
|
|
|
+ </if>
|
|
|
+ <if test="courseForm != null">
|
|
|
+ course_form_ = #{courseForm},
|
|
|
+ </if>
|
|
|
+ <if test="chargeTypeId != null">
|
|
|
+ charge_type_id_ = #{chargeTypeId},
|
|
|
+ </if>
|
|
|
+ <if test="educationalTeacherId != null">
|
|
|
+ educational_teacher_id_ = #{educationalTeacherId},
|
|
|
+ </if>
|
|
|
+ <if test="enrollClasses != null">
|
|
|
+ enroll_classes_ = #{enrollClasses},
|
|
|
+ </if>
|
|
|
+ <if test="name != null">
|
|
|
+ name_ = #{name},
|
|
|
+ </if>
|
|
|
+ <if test="createTime != null">
|
|
|
+ create_time_ = #{createTime},
|
|
|
+ </if>
|
|
|
<if test="isExtraClass != null">
|
|
|
- is_extra_class_ = #{isExtraClass},
|
|
|
+ is_extra_class_ = #{isExtraClass},
|
|
|
</if>
|
|
|
- </set>
|
|
|
- WHERE id_ = #{id}
|
|
|
- </update>
|
|
|
+ <if test="paymentExpireDate != null">
|
|
|
+ payment_expire_date_ = #{paymentExpireDate},
|
|
|
+ </if>
|
|
|
+ <if test="schoolId != null">
|
|
|
+ school_id_ = #{schoolId},
|
|
|
+ </if>
|
|
|
+ <if test="applyExpireDate != null">
|
|
|
+ apply_expire_date_ = #{applyExpireDate},
|
|
|
+ </if>
|
|
|
+ <if test="billStartDate != null">
|
|
|
+ bill_start_date_ = #{billStartDate},
|
|
|
+ </if>
|
|
|
+ <if test="cooperationOrganId != null">
|
|
|
+ cooperation_organ_id_ = #{cooperationOrganId},
|
|
|
+ </if>
|
|
|
+ <if test="updateTime != null">
|
|
|
+ update_time_ = #{updateTime},
|
|
|
+ </if>
|
|
|
+ <if test="enlightenmentCourseTime != null">
|
|
|
+ enlightenment_course_time_ = #{enlightenmentCourseTime},
|
|
|
+ </if>
|
|
|
+ <if test="teamTeacherId != null">
|
|
|
+ team_teacher_id_ = #{teamTeacherId},
|
|
|
+ </if>
|
|
|
+ <if test="parentMeetingTime != null">
|
|
|
+ parent_meeting_time_ = #{parentMeetingTime},
|
|
|
+ </if>
|
|
|
+ </set>
|
|
|
+ WHERE id_ = #{id}
|
|
|
+ </update>
|
|
|
|
|
|
- <!-- 根据主键删除一条记录 -->
|
|
|
- <delete id="delete">
|
|
|
- DELETE FROM music_group WHERE id_ = #{id}
|
|
|
+ <!-- 根据主键删除一条记录 -->
|
|
|
+ <delete id="delete">
|
|
|
+ DELETE FROM music_group WHERE id_ = #{id}
|
|
|
</delete>
|
|
|
|
|
|
- <!-- 分页查询 -->
|
|
|
- <select id="queryPage" resultMap="MusicGroup" parameterType="map">
|
|
|
- SELECT * FROM music_group ORDER BY id_
|
|
|
- <include refid="global.limit"/>
|
|
|
- </select>
|
|
|
+ <!-- 分页查询 -->
|
|
|
+ <select id="queryPage" resultMap="MusicGroup" parameterType="map">
|
|
|
+ SELECT * FROM music_group ORDER BY id_
|
|
|
+ <include refid="global.limit" />
|
|
|
+ </select>
|
|
|
|
|
|
- <!-- 查询当前表的总记录数 -->
|
|
|
- <select id="queryCount" resultType="int" parameterType="map">
|
|
|
- SELECT COUNT(*) FROM music_group
|
|
|
+ <!-- 查询当前表的总记录数 -->
|
|
|
+ <select id="queryCount" resultType="int">
|
|
|
+ SELECT COUNT(*) FROM
|
|
|
+ music_group
|
|
|
</select>
|
|
|
</mapper>
|