|
@@ -831,7 +831,7 @@
|
|
LEFT JOIN organization o ON o.id_ = mg.organ_id_
|
|
LEFT JOIN organization o ON o.id_ = mg.organ_id_
|
|
LEFT JOIN student_visit sv ON sv.student_id_ = sr.user_id_ AND sv.purpose_ = '会员续费'
|
|
LEFT JOIN student_visit sv ON sv.student_id_ = sr.user_id_ AND sv.purpose_ = '会员续费'
|
|
<include refid="queryMusicMemberListSql"/>
|
|
<include refid="queryMusicMemberListSql"/>
|
|
- GROUP BY sr.user_id_ HAVING (MAX(cto.id_) IS NULL OR MIN(cto.status_) != 1)
|
|
|
|
|
|
+ GROUP BY sr.user_id_ HAVING (MAX(cto.id_) IS NULL OR MIN(cto.status_) > 1)
|
|
<if test="hasMember != null">
|
|
<if test="hasMember != null">
|
|
<if test="hasMember == 0">
|
|
<if test="hasMember == 0">
|
|
AND (MAX(cto.id_) IS NULL OR DATEDIFF(MAX(cto.end_time_),NOW()) < 0)
|
|
AND (MAX(cto.id_) IS NULL OR DATEDIFF(MAX(cto.end_time_),NOW()) < 0)
|
|
@@ -863,7 +863,7 @@
|
|
LEFT JOIN organization o ON o.id_ = mg.organ_id_
|
|
LEFT JOIN organization o ON o.id_ = mg.organ_id_
|
|
LEFT JOIN student_visit sv ON sv.student_id_ = sr.user_id_ AND sv.purpose_ = '会员续费'
|
|
LEFT JOIN student_visit sv ON sv.student_id_ = sr.user_id_ AND sv.purpose_ = '会员续费'
|
|
<include refid="queryMusicMemberListSql"/>
|
|
<include refid="queryMusicMemberListSql"/>
|
|
- GROUP BY sr.user_id_ HAVING (MAX(cto.id_) IS NULL OR MIN(cto.status_) != 1)
|
|
|
|
|
|
+ GROUP BY sr.user_id_ HAVING (MAX(cto.id_) IS NULL OR MIN(cto.status_) > 1)
|
|
<if test="hasMember != null">
|
|
<if test="hasMember != null">
|
|
<if test="hasMember == 0">
|
|
<if test="hasMember == 0">
|
|
AND (MAX(cto.id_) IS NULL OR DATEDIFF(MAX(cto.end_time_),NOW()) < 0)
|
|
AND (MAX(cto.id_) IS NULL OR DATEDIFF(MAX(cto.end_time_),NOW()) < 0)
|
|
@@ -879,7 +879,7 @@
|
|
</select>
|
|
</select>
|
|
<sql id="queryMusicMemberListSql">
|
|
<sql id="queryMusicMemberListSql">
|
|
<where>
|
|
<where>
|
|
- sr.music_group_status_ != 'QUIT' AND mg.course_view_type_ = 1
|
|
|
|
|
|
+ sr.music_group_status_ = 'NORMAL' AND mg.course_view_type_ = 1
|
|
AND mg.status_ = 'PROGRESS'
|
|
AND mg.status_ = 'PROGRESS'
|
|
<if test="search != null and search != ''">
|
|
<if test="search != null and search != ''">
|
|
AND (mg.name_ LIKE CONCAT('%',#{search},'%') OR mg.id_ LIKE CONCAT('%',#{search},'%') OR su.username_ LIKE CONCAT('%',#{search},'%') OR su.id_ = #{search})
|
|
AND (mg.name_ LIKE CONCAT('%',#{search},'%') OR mg.id_ LIKE CONCAT('%',#{search},'%') OR su.username_ LIKE CONCAT('%',#{search},'%') OR su.id_ = #{search})
|