|
@@ -32,7 +32,7 @@
|
|
|
|
|
|
<!-- 根据主键查询一条记录 -->
|
|
|
<select id="get" resultMap="MusicGroupPaymentCalender">
|
|
|
- SELECT * FROM music_group_payment_calender WHERE id_ = #{id}
|
|
|
+ SELECT * FROM music_group_payment_calender WHERE id_ = #{id}
|
|
|
</select>
|
|
|
|
|
|
<!-- 全查询 -->
|
|
@@ -129,7 +129,7 @@
|
|
|
</set>
|
|
|
WHERE id_ = #{id}
|
|
|
</update>
|
|
|
-
|
|
|
+
|
|
|
<update id="batchUpdate" parameterType="com.ym.mec.biz.dal.entity.MusicGroupPaymentCalender">
|
|
|
<foreach collection="list" item="item" index="index" open="" close="" separator=";">
|
|
|
UPDATE music_group_payment_calender
|
|
@@ -189,7 +189,7 @@
|
|
|
|
|
|
<!-- 根据主键删除一条记录 -->
|
|
|
<delete id="delete">
|
|
|
- DELETE FROM music_group_payment_calender WHERE id_ = #{id}
|
|
|
+ DELETE FROM music_group_payment_calender WHERE id_ = #{id}
|
|
|
</delete>
|
|
|
|
|
|
<delete id="delByGroupId">
|
|
@@ -229,13 +229,13 @@
|
|
|
</if>
|
|
|
</where>
|
|
|
</select>
|
|
|
-
|
|
|
+
|
|
|
<select id="findByMusicGroupId" resultMap="MusicGroupPaymentCalender">
|
|
|
SELECT * FROM music_group_payment_calender mgpc
|
|
|
WHERE music_group_id_ = #{musicGroupId}
|
|
|
ORDER BY id_
|
|
|
</select>
|
|
|
-
|
|
|
+
|
|
|
<select id="queryByPaymentStatus" resultMap="MusicGroupPaymentCalender">
|
|
|
SELECT * FROM music_group_payment_calender mgpc
|
|
|
<where>
|
|
@@ -251,17 +251,17 @@
|
|
|
<select id="getForLock" resultMap="MusicGroupPaymentCalender">
|
|
|
SELECT * FROM music_group_payment_calender WHERE id_ = #{id} FOR UPDATE
|
|
|
</select>
|
|
|
-
|
|
|
+
|
|
|
<select id="queryIntersectionByPaymentDate" resultType="int" parameterType="map">
|
|
|
SELECT count(*) FROM music_group_payment_calender mgpc
|
|
|
- WHERE music_group_id_ = #{musicGroupId}
|
|
|
+ WHERE music_group_id_ = #{musicGroupId}
|
|
|
and (start_payment_date_ between #{startPaymentDate} and #{deadlinePaymentDate}
|
|
|
or deadline_payment_date_ between #{startPaymentDate} and #{deadlinePaymentDate})
|
|
|
<if test="calenderId != null">
|
|
|
AND mgpc.id_ != #{calenderId}
|
|
|
</if>
|
|
|
</select>
|
|
|
-
|
|
|
+
|
|
|
<select id="getLastStartOne" resultMap="MusicGroupPaymentCalender">
|
|
|
SELECT * FROM music_group_payment_calender WHERE music_group_id_ = #{musicGroupId} ORDER BY start_payment_date_ DESC LIMIT 1
|
|
|
</select>
|
|
@@ -440,4 +440,12 @@
|
|
|
<select id="findByMusicGroupRegCalender" resultMap="MusicGroupPaymentCalender">
|
|
|
SELECT * FROM music_group_payment_calender WHERE music_group_id_=#{musicGroupId} AND payment_type_='MUSIC_APPLY'
|
|
|
</select>
|
|
|
+
|
|
|
+ <select id="getMusicGroupRegCalender" resultMap="MusicGroupPaymentCalender">
|
|
|
+ SELECT * FROM music_group_payment_calender
|
|
|
+ WHERE music_group_id_ = #{musicGroupId}
|
|
|
+ AND payment_type_ = 'MUSIC_APPLY'
|
|
|
+ AND pay_user_type_='STUDENT'
|
|
|
+ AND status_='OPEN'
|
|
|
+ </select>
|
|
|
</mapper>
|