|
@@ -60,6 +60,7 @@ import java.util.concurrent.CompletableFuture;
|
|
import java.util.function.Function;
|
|
import java.util.function.Function;
|
|
import java.util.stream.Collectors;
|
|
import java.util.stream.Collectors;
|
|
|
|
|
|
|
|
+import static com.ym.mec.biz.dal.enums.GroupType.LIVE;
|
|
import static com.ym.mec.biz.dal.enums.GroupType.VIP;
|
|
import static com.ym.mec.biz.dal.enums.GroupType.VIP;
|
|
import static com.ym.mec.biz.dal.enums.SysUserRoleEnum.ORGAN_MANAGER;
|
|
import static com.ym.mec.biz.dal.enums.SysUserRoleEnum.ORGAN_MANAGER;
|
|
import static java.math.BigDecimal.ROUND_DOWN;
|
|
import static java.math.BigDecimal.ROUND_DOWN;
|
|
@@ -2628,7 +2629,6 @@ public class VipGroupServiceImpl extends BaseServiceImpl<Long, VipGroup> impleme
|
|
if (Objects.isNull(classGroup)) {
|
|
if (Objects.isNull(classGroup)) {
|
|
throw new BizException("班级信息错误");
|
|
throw new BizException("班级信息错误");
|
|
}
|
|
}
|
|
- classGroup = classGroupDao.lockClassGroup(classGroup.getId());
|
|
|
|
Boolean exist = classGroupStudentMapperDao.existByClassGroupIds(classGroup.getId().toString(), userId);
|
|
Boolean exist = classGroupStudentMapperDao.existByClassGroupIds(classGroup.getId().toString(), userId);
|
|
if (exist) {
|
|
if (exist) {
|
|
throw new BizException("您已加入此课程");
|
|
throw new BizException("您已加入此课程");
|
|
@@ -2818,7 +2818,6 @@ public class VipGroupServiceImpl extends BaseServiceImpl<Long, VipGroup> impleme
|
|
if("LIVE".equals(vipGroup.getGroupType())){
|
|
if("LIVE".equals(vipGroup.getGroupType())){
|
|
groupType = GroupType.LIVE;
|
|
groupType = GroupType.LIVE;
|
|
messageTypeEnum = MessageTypeEnum.STUDENT_PUSH_LIVE_BUY;
|
|
messageTypeEnum = MessageTypeEnum.STUDENT_PUSH_LIVE_BUY;
|
|
- classGroupDao.modifyStudentNum(classGroup.getId(),1);
|
|
|
|
}
|
|
}
|
|
if (vipGroup.getStatus() == VipGroupStatusEnum.DELETE ||
|
|
if (vipGroup.getStatus() == VipGroupStatusEnum.DELETE ||
|
|
vipGroup.getStatus() == VipGroupStatusEnum.CANCEL ||
|
|
vipGroup.getStatus() == VipGroupStatusEnum.CANCEL ||
|
|
@@ -2931,6 +2930,7 @@ public class VipGroupServiceImpl extends BaseServiceImpl<Long, VipGroup> impleme
|
|
vipGroup.getName(), null, null, groupType.getCode(), ImGroup.GroupTypeEnum.valueOf(groupType.name()));
|
|
vipGroup.getName(), null, null, groupType.getCode(), ImGroup.GroupTypeEnum.valueOf(groupType.name()));
|
|
imGroupMemberService.join(classGroup.getId().toString(), userRoleMap);
|
|
imGroupMemberService.join(classGroup.getId().toString(), userRoleMap);
|
|
imUserFriendService.refreshGroupImUserFriend(classGroup.getMusicGroupId(), classGroup.getGroupType());
|
|
imUserFriendService.refreshGroupImUserFriend(classGroup.getMusicGroupId(), classGroup.getGroupType());
|
|
|
|
+ classGroupDao.update(classGroup);
|
|
}
|
|
}
|
|
//更新所属分部列表
|
|
//更新所属分部列表
|
|
List<Integer> organIds = classGroupDao.findStudentOrganIdsByClassGroup(classGroup.getId().longValue());
|
|
List<Integer> organIds = classGroupDao.findStudentOrganIdsByClassGroup(classGroup.getId().longValue());
|
|
@@ -2986,6 +2986,9 @@ public class VipGroupServiceImpl extends BaseServiceImpl<Long, VipGroup> impleme
|
|
LOGGER.error(MessageFormatter.arrayFormat("课程[{}]购买协议错误:{}", vipGroup.getId(), e.getMessage()), e);
|
|
LOGGER.error(MessageFormatter.arrayFormat("课程[{}]购买协议错误:{}", vipGroup.getId(), e.getMessage()), e);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
+ if(groupType == LIVE){
|
|
|
|
+ classGroupDao.modifyStudentNum(classGroup.getId(),1);
|
|
|
|
+ }
|
|
} else {
|
|
} else {
|
|
if("VIP".equals(classGroup.getGroupType().getCode())){
|
|
if("VIP".equals(classGroup.getGroupType().getCode())){
|
|
classGroupDao.modifyStudentNum(classGroup.getId(),-1);
|
|
classGroupDao.modifyStudentNum(classGroup.getId(),-1);
|
|
@@ -2996,7 +2999,6 @@ public class VipGroupServiceImpl extends BaseServiceImpl<Long, VipGroup> impleme
|
|
}
|
|
}
|
|
sysCouponCodeService.quit(order.getCouponCodeId());
|
|
sysCouponCodeService.quit(order.getCouponCodeId());
|
|
}
|
|
}
|
|
- classGroupDao.update(classGroup);
|
|
|
|
}
|
|
}
|
|
|
|
|
|
@Override
|
|
@Override
|