zouxuan 2 年之前
父節點
當前提交
b9874aa6df
共有 1 個文件被更改,包括 5 次插入1 次删除
  1. 5 1
      mec-biz/src/main/java/com/ym/mec/biz/service/impl/VipGroupServiceImpl.java

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

@@ -60,6 +60,7 @@ import java.util.concurrent.CompletableFuture;
 import java.util.function.Function;
 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.SysUserRoleEnum.ORGAN_MANAGER;
 import static java.math.BigDecimal.ROUND_DOWN;
@@ -2927,6 +2928,7 @@ public class VipGroupServiceImpl extends BaseServiceImpl<Long, VipGroup> impleme
                                 vipGroup.getName(), null, null, groupType.getCode(), ImGroup.GroupTypeEnum.valueOf(groupType.name()));
                         imGroupMemberService.join(classGroup.getId().toString(), userRoleMap);
                         imUserFriendService.refreshGroupImUserFriend(classGroup.getMusicGroupId(), classGroup.getGroupType());
+                        classGroupDao.update(classGroup);
                     }
                     //更新所属分部列表
                     List<Integer> organIds = classGroupDao.findStudentOrganIdsByClassGroup(classGroup.getId().longValue());
@@ -2982,6 +2984,9 @@ public class VipGroupServiceImpl extends BaseServiceImpl<Long, VipGroup> impleme
                     LOGGER.error(MessageFormatter.arrayFormat("课程[{}]购买协议错误:{}", vipGroup.getId(), e.getMessage()), e);
                 }
             }
+            if(groupType == LIVE){
+                classGroupDao.modifyStudentNum(classGroup.getId(),1);
+            }
         } else {
             if("VIP".equals(classGroup.getGroupType().getCode())){
                 classGroupDao.modifyStudentNum(classGroup.getId(),-1);
@@ -2992,7 +2997,6 @@ public class VipGroupServiceImpl extends BaseServiceImpl<Long, VipGroup> impleme
             }
             sysCouponCodeService.quit(order.getCouponCodeId());
         }
-        classGroupDao.update(classGroup);
     }
 
     @Override