|
@@ -144,6 +144,9 @@
|
|
|
<if test="paymentStatus != null">
|
|
|
mgpc.payment_status_ = #{paymentStatus,typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler}
|
|
|
</if>
|
|
|
+ <if test="subjectId != null">
|
|
|
+ FIND_IN_SET(#{subjectId},s.subject_id_list_)
|
|
|
+ </if>
|
|
|
</where>
|
|
|
GROUP BY mgpc.id_
|
|
|
ORDER BY mgpc.create_time_
|
|
@@ -152,15 +155,21 @@
|
|
|
|
|
|
<!-- 查询当前表的总记录数 -->
|
|
|
<select id="queryCount" resultType="int">
|
|
|
- SELECT COUNT(*) FROM music_group_payment_calender_detail
|
|
|
+ SELECT COUNT(mgpc.id_) FROM music_group_payment_calender_detail mgpc
|
|
|
+ LEFT JOIN student s ON s.user_id_ = mgpc.user_id_
|
|
|
+ LEFT JOIN `subject` st ON FIND_IN_SET(st.id_,s.subject_id_list_)
|
|
|
<where>
|
|
|
<if test="userId != null">
|
|
|
user_id_ = #{userId}
|
|
|
</if>
|
|
|
+ <if test="subjectId != null">
|
|
|
+ FIND_IN_SET(#{subjectId},s.subject_id_list_)
|
|
|
+ </if>
|
|
|
<if test="paymentStatus != null">
|
|
|
payment_status_ = #{paymentStatus,typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler}
|
|
|
</if>
|
|
|
</where>
|
|
|
+ GROUP BY mgpc.id_
|
|
|
</select>
|
|
|
<select id="queryListByIds" resultMap="MusicGroupPaymentCalenderDetail">
|
|
|
SELECT * FROM music_group_payment_calender_detail WHERE FIND_IN_SET(id_,#{ids})
|