Переглянути джерело

1、添加教务老师字段
2、布置作业

Joburgess 5 роки тому
батько
коміт
2ae29045f4

+ 6 - 0
mec-biz/src/main/java/com/ym/mec/biz/service/impl/CoursesGroupServiceImpl.java

@@ -515,6 +515,12 @@ public class CoursesGroupServiceImpl extends BaseServiceImpl<Long, CoursesGroup>
         classGroupStudentMapper.setGroupType(GroupType.COMM);
         classGroupStudentMapperDao.insert(classGroupStudentMapper);
 
+        List<ClassGroupStudentMapper> classGroupStudents = classGroupStudentMapperDao.findByClassGroup(classGroup.getId());
+        if(!CollectionUtils.isEmpty(classGroupStudents)&&classGroupStudents.size()==classGroup.getExpectStudentNum()){
+            coursesGroup.setStatus(GroupStatusEnum.NORMAL);
+            coursesGroupDao.update(coursesGroup);
+        }
+
         List<CourseScheduleStudentPayment> courseScheduleStudentPayments = new ArrayList<>();
         List<CourseSchedule> groupNotStartCourses = courseScheduleDao.findGroupNotStartCourses(order.getMusicGroupId(), GroupType.COMM);
         if(CollectionUtils.isEmpty(groupNotStartCourses)){

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

@@ -231,7 +231,7 @@
 
     <select id="findByRole" resultType="com.ym.mec.biz.dal.dto.SimpleUserDto">
         SELECT
-          su.id_ userId,
+          DISTINCT su.id_ userId,
           su.real_name_ userName,
           su.avatar_ avatar
         FROM
@@ -246,7 +246,7 @@
     </select>
     <select id="findByIds" resultType="com.ym.mec.biz.dal.dto.SimpleUserDto">
         SELECT su.id_ userId,su.real_name_ userName
-        FROM sys_user
+        FROM sys_user su
         WHERE id_ IN
         <foreach collection="userIds" item="userId" separator="," open="(" close=")">
             #{userId}