Browse Source

系统收费

zouxuan 4 năm trước cách đây
mục cha
commit
917cc71fe6

+ 8 - 0
mec-biz/src/main/java/com/ym/mec/biz/dal/dao/StudentRegistrationDao.java

@@ -293,6 +293,14 @@ public interface StudentRegistrationDao extends BaseDAO<Long, StudentRegistratio
     List<Integer> queryNormalUser(String musicGroupId);
 
     /**
+     * 获取乐团在读人数
+     *
+     * @param musicGroupId
+     * @return
+     */
+    List<Integer> queryNormalUserList(String musicGroupId);
+
+    /**
      * 获取学员基本信息
      *
      * @param mobile

+ 1 - 1
mec-biz/src/main/java/com/ym/mec/biz/service/impl/MusicGroupSchoolTermCourseDetailServiceImpl.java

@@ -95,7 +95,7 @@ public class MusicGroupSchoolTermCourseDetailServiceImpl extends BaseServiceImpl
 						studentCourseDetail.setMusicGroupSchoolTermCourseDetailId(courseDetail.getId());
 						studentCourseDetail.setMemberCourseMinutes(courseDetail.getTotalCourseTime());
 						//获取乐团所有在读学员
-						List<Integer> studentIds = studentRegistrationDao.queryNormalUser(musicGroupId);
+						List<Integer> studentIds = studentRegistrationDao.queryNormalUserList(musicGroupId);
 						if(studentIds == null || studentIds.size() == 0){
 							throw new BizException("操作失败:该乐团没有在读学员");
 						}

+ 2 - 1
mec-biz/src/main/resources/config/mybatis/MusicGroupSchoolTermStudentCourseDetailMapper.xml

@@ -142,7 +142,8 @@
 		GROUP BY music_group_school_term_course_detail_id_
 	</select>
 	<select id="checkNoCourse" resultType="java.lang.Boolean">
-		SELECT COUNT(id_) > 0 FROM music_group_school_term_student_course_detail WHERE music_group_school_term_course_detail_id_ = #{musicGroupSchoolTermCourseDetailId} AND pre_member_course_minutes_ = 0
+		SELECT COUNT(id_) > 0 FROM music_group_school_term_student_course_detail
+		WHERE music_group_school_term_course_detail_id_ = #{musicGroupSchoolTermCourseDetailId} AND pre_member_course_minutes_ = 0
 	</select>
 	<select id="findByDetailId" resultMap="MusicGroupSchoolTermStudentCourseDetail">
 		SELECT * FROM music_group_school_term_student_course_detail WHERE music_group_school_term_course_detail_id_ = #{courseDetailId}

+ 6 - 0
mec-biz/src/main/resources/config/mybatis/StudentRegistrationMapper.xml

@@ -857,6 +857,12 @@
         WHERE sr.music_group_status_ != 'QUIT'
         AND sr.music_group_id_ = #{musicGroupIds}
     </select>
+    <select id="queryNormalUserList" resultType="integer">
+        SELECT sr.user_id_
+        FROM student_registration sr
+        WHERE sr.music_group_status_ = 'NORMAL'
+        AND sr.music_group_id_ = #{musicGroupIds}
+    </select>
     <select id="queryUserByPhone" resultMap="StudentRegistration">
         SELECT su.id_,
         CASE WHEN sut.name_ IS NULL THEN su.real_name_ ELSE sut.name_ END parents_name_,