|
@@ -372,27 +372,10 @@
|
|
|
<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}
|
|
|
- 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>
|
|
|
- <select id="queryIntersectionByDate" resultType="java.lang.Integer">
|
|
|
- SELECT COUNT(DISTINCT mgpcd.id_) FROM music_group_payment_calender mgpc
|
|
|
- LEFT JOIN music_group_payment_calender_detail mgpcd ON mgpc.id_ = mgpcd.music_group_payment_calender_id_
|
|
|
- WHERE mgpc.music_group_id_ = #{musicGroupId} AND mgpcd.payment_status_ != 'PAID_COMPLETED'
|
|
|
- AND (DATE_FORMAT(mgpcd.start_payment_date_,'%Y-%m-%d') between #{startTime} AND #{endTime}
|
|
|
- OR DATE_FORMAT(mgpcd.deadline_payment_date_,'%Y-%m-%d') between #{startTime} AND #{endTime})
|
|
|
- </select>
|
|
|
<select id="queryCalenderByDay" resultType="java.util.Map">
|
|
|
SELECT mgpcd.music_group_payment_calender_id_ 'key',COUNT(mgpcd.payment_status_) 'value'
|
|
|
FROM music_group_payment_calender_detail mgpcd
|