|
@@ -15,6 +15,12 @@
|
|
|
<result column="pay_time_" property="payTime" />
|
|
|
<result column="update_time_" property="updateTime" />
|
|
|
<result column="create_time_" property="createTime" />
|
|
|
+ <association property="sysUser" javaType="com.ym.mec.auth.api.entity.SysUser">
|
|
|
+ <result column="username_" property="username" />
|
|
|
+ </association>
|
|
|
+ <association property="student" javaType="com.ym.mec.biz.dal.entity.Student">
|
|
|
+ <result column="subject_names_" property="subjectNames" />
|
|
|
+ </association>
|
|
|
</resultMap>
|
|
|
|
|
|
<!-- 根据主键查询一条记录 -->
|
|
@@ -94,16 +100,21 @@
|
|
|
<!-- 分页查询 -->
|
|
|
<select id="queryPage" resultMap="MusicGroupPaymentCalenderDetail"
|
|
|
parameterType="map">
|
|
|
- SELECT * FROM music_group_payment_calender_detail
|
|
|
+ SELECT mgpc.*,su.username_,GROUP_CONCAT(DISTINCT st.name_) subject_names_
|
|
|
+ FROM music_group_payment_calender_detail mgpc
|
|
|
+ LEFT JOIN sys_user su ON su.id_ = mgpc.user_id_
|
|
|
+ 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}
|
|
|
+ mgpc.user_id_ = #{userId}
|
|
|
</if>
|
|
|
<if test="paymentStatus != null">
|
|
|
- payment_status_ = #{paymentStatus,typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler}
|
|
|
+ mgpc.payment_status_ = #{paymentStatus,typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler}
|
|
|
</if>
|
|
|
</where>
|
|
|
- ORDER BY create_time_
|
|
|
+ GROUP BY mgpc.id_
|
|
|
+ ORDER BY mgpc.create_time_
|
|
|
<include refid="global.limit" />
|
|
|
</select>
|
|
|
|