Explorar o código

Merge branch 'saas_zouxuan_04_24_course' of http://git.dayaedu.com/yonge/mec into master_saas

zouxuan %!s(int64=3) %!d(string=hai) anos
pai
achega
7a34dfea21

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

@@ -225,6 +225,14 @@ public interface StudentRegistrationDao extends BaseDAO<Long, StudentRegistratio
     List<StudentRegistration> queryStudentByMusicGroupId(String musicGroupId);
 
     /**
+     * 更新成团学员标记
+     *
+     * @param musicGroupId
+     * @return
+     */
+    void updateOriginalFlag(String musicGroupId);
+
+    /**
      * 统计乐团不同声部报名人数
      *
      * @param musicGroupId

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

@@ -1782,6 +1782,7 @@ public class MusicGroupServiceImpl extends BaseServiceImpl<String, MusicGroup> i
         musicGroup.setStatus(MusicGroupStatusEnum.PROGRESS);
         //获取所有已缴费学员人数
         List<StudentRegistration> studentRegistrations = studentRegistrationDao.queryStudentByMusicGroupId(musicGroupId);
+        studentRegistrationDao.updateOriginalFlag(musicGroupId);
         musicGroup.setGroupMemberNum(studentRegistrations == null ? 0 : studentRegistrations.size());
         musicGroup.setBillStartDate(new Date());
         musicGroupDao.update(musicGroup);

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

@@ -792,6 +792,12 @@
         AND sr.payment_status_ = 2
         AND sr.music_group_status_ != 'QUIT'
     </select>
+    <select id="updateOriginalFlag">
+        UPDATE student_registration sr SET original_flag_ = 1
+        WHERE sr.music_group_id_ = #{musicGroupId}
+        AND sr.payment_status_ = 2
+        AND sr.music_group_status_ != 'QUIT'
+    </select>
 
     <!-- 批量开启缴费 -->
     <update id="batchOpenPay">