|
@@ -15,6 +15,8 @@
|
|
|
<result column="course_fee_" property="courseFee"/>
|
|
|
<result column="next_payment_date_" property="nextPaymentDate"/>
|
|
|
<result column="latest_paid_time_" property="latestPaidTime"/>
|
|
|
+ <result column="payment_valid_start_date_" property="paymentValidStartDate"/>
|
|
|
+ <result column="payment_valid_end_date_" property="paymentValidEndDate"/>
|
|
|
<result column="continuous_absenteeism_times_" property="continuousAbsenteeismTimes"/>
|
|
|
<result column="create_time_" property="createTime"/>
|
|
|
<result column="update_time_" property="updateTime"/>
|
|
@@ -42,15 +44,21 @@
|
|
|
<!-- 向数据库增加一条记录 -->
|
|
|
<insert id="insert" parameterType="com.ym.mec.biz.dal.entity.MusicGroupStudentFee" useGeneratedKeys="true"
|
|
|
keyColumn="id" keyProperty="id">
|
|
|
- INSERT INTO music_group_student_fee_ (id_,music_group_id_,user_id_,course_fee_,create_time_,update_time_,next_payment_date_,latest_paid_time_,continuous_absenteeism_times_,subject_id_,payment_status_,temporary_course_fee_,payment_period_list_,remain_network_class_times_)
|
|
|
- VALUES(#{id},#{musicGroupId},#{userId},#{courseFee},now(),now(),#{nextPaymentDate},#{latestPaidTime},#{continuousAbsenteeismTimes},#{subjectId},#{paymentStatus,typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler},#{temporaryCourseFee},#{paymentPeriodList},#{remainNetworkClassTimes})
|
|
|
+ INSERT INTO music_group_student_fee_ (id_,music_group_id_,user_id_,course_fee_,create_time_,
|
|
|
+ update_time_,next_payment_date_,latest_paid_time_,continuous_absenteeism_times_,subject_id_,
|
|
|
+ payment_status_,temporary_course_fee_,payment_period_list_,remain_network_class_times_,payment_valid_start_date_,payment_valid_end_date_)
|
|
|
+ VALUES(#{id},#{musicGroupId},#{userId},#{courseFee},now(),now(),#{nextPaymentDate},#{latestPaidTime},
|
|
|
+ #{continuousAbsenteeismTimes},#{subjectId},#{paymentStatus,typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler},
|
|
|
+ #{temporaryCourseFee},#{paymentPeriodList},#{remainNetworkClassTimes},#{paymentValidStartDate},#{paymentValidEndDate})
|
|
|
</insert>
|
|
|
|
|
|
<insert id="batchInsert" parameterType="com.ym.mec.biz.dal.entity.MusicGroupStudentFee">
|
|
|
- INSERT INTO music_group_student_fee_ (music_group_id_,user_id_,create_time_,update_time_,next_payment_date_,subject_id_,payment_status_,course_fee_,payment_period_list_,remain_network_class_times_)
|
|
|
+ INSERT INTO music_group_student_fee_ (music_group_id_,user_id_,create_time_,update_time_,next_payment_date_,
|
|
|
+ subject_id_,payment_status_,course_fee_,payment_period_list_,remain_network_class_times_,payment_valid_start_date_,payment_valid_end_date_)
|
|
|
VALUES
|
|
|
<foreach collection="musicGroupStudentFees" item="item" separator=",">
|
|
|
- (#{item.musicGroupId},#{item.userId},NOW(),NOW(),#{nextPaymentDate},#{item.subjectId},#{paymentStatus},#{item.courseFee},#{item.paymentPeriodList},#{item.remainNetworkClassTimes})
|
|
|
+ (#{item.musicGroupId},#{item.userId},NOW(),NOW(),#{nextPaymentDate},#{item.subjectId},
|
|
|
+ #{paymentStatus},#{item.courseFee},#{item.paymentPeriodList},#{item.remainNetworkClassTimes},#{paymentValidStartDate},#{paymentValidEndDate})
|
|
|
</foreach>
|
|
|
</insert>
|
|
|
|
|
@@ -58,6 +66,12 @@
|
|
|
<update id="update" parameterType="com.ym.mec.biz.dal.entity.MusicGroupStudentFee">
|
|
|
UPDATE music_group_student_fee_
|
|
|
<set>
|
|
|
+ <if test="paymentValidStartDate != null">
|
|
|
+ payment_valid_start_date_ = #{paymentValidStartDate},
|
|
|
+ </if>
|
|
|
+ <if test="paymentValidEndDate != null">
|
|
|
+ payment_valid_end_date_ = #{paymentValidEndDate},
|
|
|
+ </if>
|
|
|
<if test="userId != null">
|
|
|
user_id_ = #{userId},
|
|
|
</if>
|