zouxuan 3 gadi atpakaļ
vecāks
revīzija
0350d018e0

+ 2 - 2
mec-biz/src/main/java/com/ym/mec/biz/service/impl/GroupClassServiceImpl.java

@@ -277,13 +277,13 @@ public class GroupClassServiceImpl implements GroupClassService {
                 if(activityUserMapper.getGiveVipFlag() == 2){
                     Long giveVipGroupId = activityUserMapper.getGiveVipGroupId();
                     VipGroup giveVipGroup = vipGroupDao.get(giveVipGroupId);
-                    ClassGroupStudentMapper giveClassGroupStudentMapper = classGroupStudentMapperDao.query(giveVipGroupId.intValue(),studentId);
+                    ClassGroup giveClassGroup = classGroupDao.findByVipGroup(giveVipGroupId, null);
+                    ClassGroupStudentMapper giveClassGroupStudentMapper = classGroupStudentMapperDao.findClassGroupStudent(giveClassGroup.getId(),studentId);
                     giveClassGroupStudentMapper.setStatus(ClassGroupStudentStatusEnum.QUIT);
                     classGroupStudentMapperDao.update(giveClassGroupStudentMapper);
 
                     courseScheduleService.batchDeleteMusicGroupCourseWithStudent(giveVipGroupId.toString(),studentId,GroupType.VIP);
 
-                    ClassGroup giveClassGroup = classGroupDao.findByVipGroup(giveVipGroupId, null);
                     List<Integer> studentPaymentIds = courseScheduleStudentPaymentDao.findNotStartCourseStudentPaymentIdsWithClassGroupAndStudent(giveClassGroup.getId(), studentId);
                     if(!CollectionUtils.isEmpty(studentPaymentIds)){
                         courseScheduleStudentPaymentDao.batchDeleteWithID(studentPaymentIds);

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

@@ -1344,7 +1344,7 @@ public class VipGroupServiceImpl extends BaseServiceImpl<Long, VipGroup> impleme
 		ClassGroup classGroup = new ClassGroup();
 		classGroup.setSubjectIdList(applyBaseInfo.getSubjectIdList());
 		classGroup.setExpectStudentNum(vipGroupCategory.getStudentNum());
-		classGroup.setStudentNum(0);
+		classGroup.setStudentNum(1);
 		classGroup.setName(applyBaseInfo.getName());
 		classGroup.setTotalClassTimes(totalClassTimes);
 		classGroup.setType(ClassGroupTypeEnum.VIP);

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

@@ -808,7 +808,7 @@
         SELECT COUNT(*)
         FROM student_payment_order spo
         WHERE spo.music_group_id_ = #{groupId}
-          AND spo.status_ != 'FAILED'
+          AND spo.status_ NOT IN ('FAILED','CLOSE')
           AND spo.group_type_ = #{groupType,typeHandler=com.ym.mec.common.dal.CustomEnumTypeHandler }
     </select>
     <select id="countSporadicOrder" resultType="java.lang.Integer">

+ 2 - 2
mec-web/src/main/java/com/ym/mec/web/controller/education/ActivityController.java

@@ -83,12 +83,12 @@ public class ActivityController extends BaseController {
         ActivityWaitCourseStudentNumDto courseStudentNum = vipGroupActivityService.getActivityWaitCourseStudentNum(null, activityId);
         VipGroupActivity vipGroupActivity = courseStudentNum.getVipGroupActivity();
         Employee employee = employeeDao.get(sysUser.getId());
-        List<String> activityOrgans = Arrays.asList(vipGroupActivity.getOrganId().split(","));
+        List<Integer> activityOrgans = Arrays.stream(vipGroupActivity.getOrganId().split(",")).mapToInt(Integer::valueOf).boxed().collect(Collectors.toList());
         if(StringUtils.isEmpty(employee.getOrganIdList())){
             courseStudentNum.setEmployeeAndActivityOrganIds(StringUtils.join(activityOrgans,","));
             return succeed(courseStudentNum);
         }
-        List<String> employeeOrgans = Arrays.asList(employee.getOrganIdList().split(","));
+        List<Integer> employeeOrgans = Arrays.stream(employee.getOrganIdList().split(",")).mapToInt(Integer::valueOf).boxed().collect(Collectors.toList());
         employeeOrgans.retainAll(activityOrgans);
         courseStudentNum.setEmployeeAndActivityOrganIds(StringUtils.join(employeeOrgans,","));
         return succeed(courseStudentNum);