|
@@ -1570,7 +1570,7 @@
|
|
|
group by s.current_grade_num_
|
|
|
</select>
|
|
|
|
|
|
- <select id="queryStudentRegisterInstrumentsDetail" resultType="com.ym.mec.biz.dal.dto.StudentRegisterInstrumentsDetailDto" parameterType="map">
|
|
|
+ <select id="queryStudentRegisterInstrumentsDetailList" resultType="com.ym.mec.biz.dal.dto.StudentRegisterInstrumentsDetailDto" parameterType="map">
|
|
|
SELECT sr.user_id_ userId,u.username_ name,u.phone_ phone,u.gender_ phone,sub.name_ subjectName,sr.actual_subject_id_ actualSubjectId,s.current_grade_num_ currentGradeNum,
|
|
|
si.goods_brand_ goodsBrand,si.goods_name_ goodsName,si.specification_ specification,si.create_time_ goodsBuyTime,si.start_time_ insuranceStartTime,si.end_time_ insuranceEndTime
|
|
|
from student_registration sr LEFT JOIN sys_user u on sr.user_id_ = u.id_
|
|
@@ -1593,7 +1593,37 @@
|
|
|
AND si.start_time_ is null
|
|
|
</if>
|
|
|
<if test="search != null and search != ''">
|
|
|
- AND (u.username_ LIKE CONCAT('%',#{search},'%') OR u.phone_ LIKE CONCAT('%',#{search},'%')) or u.id_ LIKE CONCAT('%',#{search},'%'))
|
|
|
+ AND (u.username_ LIKE CONCAT('%',#{search},'%') OR u.phone_ LIKE CONCAT('%',#{search},'%') or u.id_ LIKE CONCAT('%',#{search},'%'))
|
|
|
</if>
|
|
|
+ ORDER BY sr.create_time_ desc
|
|
|
+ <include refid="global.limit"/>
|
|
|
+ </select>
|
|
|
+
|
|
|
+ <select id="queryStudentRegisterInstrumentsDetailCount" resultType="int" parameterType="map">
|
|
|
+ SELECT count(sr.id_)
|
|
|
+ from student_registration sr LEFT JOIN sys_user u on sr.user_id_ = u.id_
|
|
|
+ LEFT JOIN student s on s.user_id_ = sr.user_id_ LEFT JOIN `subject` sub on sub.id_ = sr.actual_subject_id_
|
|
|
+ LEFT JOIN student_instrument si on si.student_id_ = sr.user_id_
|
|
|
+ WHERE sr.music_group_status_ = 'NORMAL'
|
|
|
+ <if test="musicGroupId != null">
|
|
|
+ AND sr.music_group_id_ = #{musicGroupId}
|
|
|
+ </if>
|
|
|
+ <if test="subjectId != null">
|
|
|
+ AND sr.actual_subject_id_ = #{subjectId}
|
|
|
+ </if>
|
|
|
+ <if test="currentGradeNum != null">
|
|
|
+ AND s.current_grade_num_ = #{currentGradeNum}
|
|
|
+ </if>
|
|
|
+ <if test="isBuyInstrumentsInsurance != null and isBuyInstrumentsInsurance == true">
|
|
|
+ AND si.start_time_ is not null
|
|
|
+ </if>
|
|
|
+ <if test="isBuyInstrumentsInsurance != null and isBuyInstrumentsInsurance == false">
|
|
|
+ AND si.start_time_ is null
|
|
|
+ </if>
|
|
|
+ <if test="search != null and search != ''">
|
|
|
+ AND (u.username_ LIKE CONCAT('%',#{search},'%') OR u.phone_ LIKE CONCAT('%',#{search},'%') or u.id_ LIKE CONCAT('%',#{search},'%'))
|
|
|
+ </if>
|
|
|
+ ORDER BY sr.create_time_ desc
|
|
|
+ <include refid="global.limit"/>
|
|
|
</select>
|
|
|
</mapper>
|