Joburgess 4 роки тому
батько
коміт
201e4c19c9

+ 9 - 0
mec-biz/src/main/java/com/ym/mec/biz/dal/dao/ClassGroupStudentMapperDao.java

@@ -183,6 +183,15 @@ public interface ClassGroupStudentMapperDao extends BaseDAO<Long, ClassGroupStud
                                                @Param("groupType") GroupType groupType);
 
     /**
+     * @describe 获取指定班级的所有学员
+     * @author Joburgess
+     * @date 2020.11.04
+     * @param classGroupId:
+     * @return java.util.List<com.ym.mec.biz.dal.entity.ClassGroupStudentMapper>
+     */
+    List<ClassGroupStudentMapper> findAllByClassGroup(@Param("classGroupId") Long classGroupId);
+
+    /**
      * @param classGroupId: 班级编号列表
      * @return java.util.List<com.ym.mec.biz.dal.entity.ClassGroupStudentMapper>
      * @describe 根据班级获取学员

+ 10 - 0
mec-biz/src/main/java/com/ym/mec/biz/service/ClassGroupStudentMapperService.java

@@ -78,4 +78,14 @@ public interface ClassGroupStudentMapperService extends BaseService<Long, ClassG
      */
     List<ClassGroupStudentInfoDto> findStudentByGroupOrClassGroup(String groupId, Integer classGroupId, GroupType groupType);
 
+    /**
+     * @describe 更新班级学员
+     * @author Joburgess
+     * @date 2020.11.04
+     * @param classGroupId:
+     * @param studentIds:
+     * @return void
+     */
+    void updateClassGroupStudents(Long classGroupId, String studentIds);
+
 }

+ 9 - 0
mec-biz/src/main/java/com/ym/mec/biz/service/impl/ClassGroupStudentMapperServiceImpl.java

@@ -355,4 +355,13 @@ public class ClassGroupStudentMapperServiceImpl extends BaseServiceImpl<Long, Cl
     public List<ClassGroupStudentInfoDto> findStudentByGroupOrClassGroup(String groupId, Integer classGroupId, GroupType groupType) {
         return classGroupStudentMapperDao.findByGroupOrClassGroup(groupId, groupType, classGroupId);
     }
+
+    @Override
+    public void updateClassGroupStudents(Long classGroupId, String studentIds) {
+        List<ClassGroupStudentMapper> classGroupStudents = classGroupStudentMapperDao.findAllByClassGroup(classGroupId);
+
+        List<Integer> allStudentIds = new ArrayList<>();
+        List<Integer> addStudentIds = new ArrayList<>();
+        List<Integer> removeStudentIds = new ArrayList<>();
+    }
 }

+ 0 - 3
mec-biz/src/main/java/com/ym/mec/biz/service/impl/MusicGroupPaymentCalenderCourseSettingsServiceImpl.java

@@ -1,10 +1,7 @@
 package com.ym.mec.biz.service.impl;
 
-import com.ym.mec.biz.dal.dao.MusicGroupPaymentCalenderDao;
-import com.ym.mec.biz.dal.dao.MusicGroupPaymentCalenderDetailDao;
 import com.ym.mec.biz.dal.dao.MusicGroupPaymentStudentCourseDetailDao;
 import com.ym.mec.biz.dal.entity.*;
-import com.ym.mec.common.exception.BizException;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 

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

@@ -258,6 +258,12 @@
         </foreach>
         AND status_ = 'NORMAL'
     </select>
+    <select id="findAllByClassGroup" resultMap="ClassGroupStudentMapper">
+        SELECT
+          cgsm.*
+        FROM class_group_student_mapper cgsm
+        WHERE class_group_id_ = #{classGroupId}
+    </select>
     <select id="findByClassGroup" resultMap="ClassGroupStudentMapper">
         SELECT
           cgsm.*,

+ 11 - 0
mec-web/src/main/java/com/ym/mec/web/controller/ClassGroupStudentController.java

@@ -17,6 +17,7 @@ import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.RestController;
 
 import java.io.IOException;
+import java.util.Objects;
 
 @RequestMapping("classGroupStudent")
 @Api(tags = "班级学生服务")
@@ -79,4 +80,14 @@ public class ClassGroupStudentController extends BaseController {
     public Object queryHoliday(String year) throws IOException {
         return succeed(classGroupStudentMapperService.queryHoliday(year));
     }
+
+    @ApiOperation(value = "修改班级学员")
+    @PostMapping("/updateClassGroupStudents")
+    @PreAuthorize("@pcs.hasPermissions('classGroupStudent/updateClassGroupStudents')")
+    public HttpResponseResult updateClassGroupStudents(Long classGroupId, String studentIds){
+        if(Objects.isNull(classGroupId)){
+            return failed("请指定班级");
+        }
+        return succeed();
+    }
 }