|
@@ -11,6 +11,12 @@
|
|
|
<result column="music_group_id_" property="musicGroupId"/>
|
|
|
<result column="payment_month_" property="paymentMonth"/>
|
|
|
<result column="start_payment_date_" property="startPaymentDate"/>
|
|
|
+ <result column="deadline_payment_date_" property="deadlinePaymentDate"/>
|
|
|
+ <result column="payment_status_" property="paymentStatus" typeHandler="com.ym.mec.common.dal.CustomEnumTypeHandler"/>
|
|
|
+ <result column="expect_num_" property="expectNum"/>
|
|
|
+ <result column="actual_num_" property="actualNum"/>
|
|
|
+ <result column="memo_" property="memo"/>
|
|
|
+ <result column="type_" property="type" typeHandler="com.ym.mec.common.dal.CustomEnumTypeHandler"/>
|
|
|
<result column="create_time_" property="createTime"/>
|
|
|
<result column="update_time_" property="updateTime"/>
|
|
|
</resultMap>
|
|
@@ -29,8 +35,9 @@
|
|
|
<insert id="insert" parameterType="com.ym.mec.biz.dal.entity.MusicGroupPaymentCalender" useGeneratedKeys="true"
|
|
|
keyColumn="id" keyProperty="id">
|
|
|
INSERT INTO music_group_payment_calender
|
|
|
- (id_,music_group_id_,payment_month_,start_payment_date_,create_time_,update_time_)
|
|
|
- VALUES(#{id},#{musicGroupId},#{paymentMonth},#{startPaymentDate},now(),now())
|
|
|
+ (music_group_id_,payment_month_,start_payment_date_,deadline_payment_date_,payment_status_,expect_num_,actual_num_,memo_,type_,create_time_,update_time_)
|
|
|
+ VALUES(#{musicGroupId},#{paymentMonth},#{startPaymentDate},#{deadlinePaymentDate},#{paymentStatus,typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler},
|
|
|
+ #{expectNum},#{actualNum},#{memo},#{type,typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler},now(),now())
|
|
|
</insert>
|
|
|
<insert id="batchAdd">
|
|
|
INSERT INTO music_group_payment_calender
|
|
@@ -45,6 +52,24 @@
|
|
|
<update id="update" parameterType="com.ym.mec.biz.dal.entity.MusicGroupPaymentCalender">
|
|
|
UPDATE music_group_payment_calender
|
|
|
<set>
|
|
|
+ <if test="type != null">
|
|
|
+ type_ = #{type,typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler},
|
|
|
+ </if>
|
|
|
+ <if test="deadlinePaymentDate != null">
|
|
|
+ deadline_payment_date_ = #{deadlinePaymentDate},
|
|
|
+ </if>
|
|
|
+ <if test="paymentStatus != null">
|
|
|
+ payment_status_ = #{paymentStatus,typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler},
|
|
|
+ </if>
|
|
|
+ <if test="expectNum != null">
|
|
|
+ expect_num_ = #{expectNum},
|
|
|
+ </if>
|
|
|
+ <if test="actualNum != null">
|
|
|
+ actual_num_ = #{actualNum},
|
|
|
+ </if>
|
|
|
+ <if test="memo != null">
|
|
|
+ memo_ = #{memo},
|
|
|
+ </if>
|
|
|
<if test="startPaymentDate != null">
|
|
|
start_payment_date_ = #{startPaymentDate},
|
|
|
</if>
|
|
@@ -72,13 +97,16 @@
|
|
|
|
|
|
<!-- 分页查询 -->
|
|
|
<select id="queryPage" resultMap="MusicGroupPaymentCalender" parameterType="map">
|
|
|
- SELECT * FROM music_group_payment_calender ORDER BY id_
|
|
|
+ SELECT * FROM music_group_payment_calender mgpc
|
|
|
+ WHERE mgpc.music_group_id_ = #{musicGroupId}
|
|
|
+ ORDER BY mgpc.update_time_ DESC
|
|
|
<include refid="global.limit"/>
|
|
|
</select>
|
|
|
|
|
|
<!-- 查询当前表的总记录数 -->
|
|
|
<select id="queryCount" resultType="int">
|
|
|
- SELECT COUNT(*) FROM music_group_payment_calender
|
|
|
+ SELECT COUNT(mgpc.id_) FROM music_group_payment_calender mgpc
|
|
|
+ WHERE mgpc.music_group_id_ = #{musicGroupId}
|
|
|
</select>
|
|
|
<select id="findByMusicGroupId" resultMap="MusicGroupPaymentCalender">
|
|
|
SELECT * FROM music_group_payment_calender mgpc
|