|
@@ -3,18 +3,23 @@ package com.ym.mec.biz.service.impl;
|
|
|
import com.alibaba.fastjson.JSONArray;
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
|
import com.ym.mec.biz.dal.dao.*;
|
|
|
-import com.ym.mec.biz.dal.dto.CourseGroupCreateDto;
|
|
|
-import com.ym.mec.biz.dal.dto.CourseGroupTeacherCardDto;
|
|
|
-import com.ym.mec.biz.dal.dto.CourseTimeDto;
|
|
|
-import com.ym.mec.biz.dal.dto.GroupCourseTimesDto;
|
|
|
+import com.ym.mec.biz.dal.dto.*;
|
|
|
import com.ym.mec.biz.dal.entity.*;
|
|
|
import com.ym.mec.biz.dal.enums.*;
|
|
|
-import com.ym.mec.biz.service.CourseScheduleService;
|
|
|
-import com.ym.mec.biz.service.CoursesGroupService;
|
|
|
+import com.ym.mec.biz.service.*;
|
|
|
+import com.ym.mec.common.constant.CommonConstants;
|
|
|
+import com.ym.mec.common.controller.BaseController;
|
|
|
import com.ym.mec.common.dal.BaseDAO;
|
|
|
+import com.ym.mec.common.entity.HttpResponseResult;
|
|
|
+import com.ym.mec.common.entity.ImGroupMember;
|
|
|
+import com.ym.mec.common.entity.ImGroupModel;
|
|
|
import com.ym.mec.common.exception.BizException;
|
|
|
+import com.ym.mec.common.service.IdGeneratorService;
|
|
|
import com.ym.mec.common.service.impl.BaseServiceImpl;
|
|
|
+import com.ym.mec.im.ImFeignService;
|
|
|
import org.apache.commons.lang3.StringUtils;
|
|
|
+import org.slf4j.Logger;
|
|
|
+import org.slf4j.LoggerFactory;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
import org.springframework.transaction.annotation.Isolation;
|
|
@@ -46,6 +51,35 @@ public class CoursesGroupServiceImpl extends BaseServiceImpl<Long, CoursesGroup>
|
|
|
private SubjectDao subjectDao;
|
|
|
@Autowired
|
|
|
private ClassGroupStudentMapperDao classGroupStudentMapperDao;
|
|
|
+ @Autowired
|
|
|
+ private TeacherDao teacherDao;
|
|
|
+ @Autowired
|
|
|
+ private IdGeneratorService idGeneratorService;
|
|
|
+ @Autowired
|
|
|
+ private StudentPaymentOrderService studentPaymentOrderService;
|
|
|
+ @Autowired
|
|
|
+ private SysUserCashAccountService sysUserCashAccountService;
|
|
|
+ @Autowired
|
|
|
+ private SysConfigDao sysConfigDao;
|
|
|
+ @Autowired
|
|
|
+ private PayService payService;
|
|
|
+ @Autowired
|
|
|
+ private StudentPaymentOrderDao studentPaymentOrderDao;
|
|
|
+ @Autowired
|
|
|
+ private GroupClassService groupService;
|
|
|
+ @Autowired
|
|
|
+ private SysUserCashAccountDetailService sysUserCashAccountDetailService;
|
|
|
+ @Autowired
|
|
|
+ private ContractService contractService;
|
|
|
+ @Autowired
|
|
|
+ private TeacherService teacherService;
|
|
|
+ @Autowired
|
|
|
+ private ImFeignService imFeignService;
|
|
|
+ @Autowired
|
|
|
+ private CourseScheduleStudentPaymentDao courseScheduleStudentPaymentDao;
|
|
|
+
|
|
|
+ private static final Logger LOGGER = LoggerFactory
|
|
|
+ .getLogger(PracticeGroupService.class);
|
|
|
|
|
|
@Override
|
|
|
public BaseDAO<Long, CoursesGroup> getDAO() {
|
|
@@ -218,4 +252,278 @@ public class CoursesGroupServiceImpl extends BaseServiceImpl<Long, CoursesGroup>
|
|
|
}
|
|
|
return groupCards;
|
|
|
}
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public GroupHeadInfoDto getGroupHeadInfo(Long courseScheduleId) {
|
|
|
+ if(Objects.isNull(courseScheduleId)){
|
|
|
+ throw new BizException("请选择课程");
|
|
|
+ }
|
|
|
+ CourseSchedule courseSchedule = courseScheduleDao.get(courseScheduleId);
|
|
|
+ if(Objects.isNull(courseSchedule)){
|
|
|
+ throw new BizException("课程不存在");
|
|
|
+ }
|
|
|
+ CoursesGroup coursesGroup = coursesGroupDao.get(Long.valueOf(courseSchedule.getMusicGroupId()));
|
|
|
+ Teacher teacher = teacherDao.get(courseSchedule.getActualTeacherId());
|
|
|
+
|
|
|
+ GroupHeadInfoDto groupHeadInfo=new GroupHeadInfoDto();
|
|
|
+ groupHeadInfo.setGroupId(coursesGroup.getId().toString());
|
|
|
+ groupHeadInfo.setGroupName(coursesGroup.getName());
|
|
|
+ groupHeadInfo.setClassGroupId(courseSchedule.getClassGroupId());
|
|
|
+ groupHeadInfo.setCourseStartDate(coursesGroup.getCoursesStartDate());
|
|
|
+ groupHeadInfo.setCourseExpireDate(coursesGroup.getCoursesEndDate());
|
|
|
+ groupHeadInfo.setTeacherName(teacher.getRealName());
|
|
|
+ groupHeadInfo.setAvatar(teacher.getAvatar());
|
|
|
+ groupHeadInfo.setIntroduction(teacher.getIntroduction());
|
|
|
+ groupHeadInfo.setLectureNum(teacher.getLectureNum());
|
|
|
+
|
|
|
+ return groupHeadInfo;
|
|
|
+ }
|
|
|
+
|
|
|
+ @Override
|
|
|
+ @Transactional(rollbackFor = Exception.class, isolation = Isolation.READ_COMMITTED)
|
|
|
+ public HttpResponseResult buyCourseGroup(Integer userId, Long courseGroupId, boolean isUseBalancePayment) {
|
|
|
+ if(Objects.isNull(courseGroupId)){
|
|
|
+ throw new BizException("请指定课程组");
|
|
|
+ }
|
|
|
+ List<ClassGroupStudentMapper> groupStudents = classGroupStudentMapperDao.findGroupStudents(courseGroupId.toString(), GroupType.COMM, userId, null);
|
|
|
+ if(!CollectionUtils.isEmpty(groupStudents)){
|
|
|
+ throw new BizException("您已购买过此课程组");
|
|
|
+ }
|
|
|
+ CoursesGroup coursesGroup = coursesGroupDao.get(courseGroupId);
|
|
|
+ if(Objects.isNull(coursesGroup)){
|
|
|
+ throw new BizException("此课程组不存在");
|
|
|
+ }
|
|
|
+
|
|
|
+ Date now=new Date();
|
|
|
+
|
|
|
+ ClassGroup classGroup = classGroupDao.findByMusicGroupAndType(courseGroupId.toString(), GroupType.COMM.getCode());
|
|
|
+
|
|
|
+ BigDecimal amount = coursesGroup.getTotalCoursesPrice();
|
|
|
+ if(Objects.isNull(amount)){
|
|
|
+ amount=BigDecimal.ZERO;
|
|
|
+ }
|
|
|
+
|
|
|
+ StudentPaymentOrder studentPaymentOrder=new StudentPaymentOrder();
|
|
|
+ studentPaymentOrder.setUserId(userId);
|
|
|
+ studentPaymentOrder.setGroupType(GroupType.COMM);
|
|
|
+ String orderNo=idGeneratorService.generatorId("payment") + "";
|
|
|
+ studentPaymentOrder.setOrderNo(orderNo);
|
|
|
+ studentPaymentOrder.setStatus(DealStatusEnum.ING);
|
|
|
+ studentPaymentOrder.setType(OrderTypeEnum.COURSE_GROUP_BUY);
|
|
|
+ studentPaymentOrder.setExpectAmount(amount);
|
|
|
+ studentPaymentOrder.setMusicGroupId(coursesGroup.getId().toString());
|
|
|
+ studentPaymentOrder.setActualAmount(studentPaymentOrder.getExpectAmount());
|
|
|
+ studentPaymentOrder.setClassGroupId(classGroup.getId());
|
|
|
+ studentPaymentOrder.setVersion(0);
|
|
|
+
|
|
|
+ if(amount.compareTo(BigDecimal.ZERO)<=0){
|
|
|
+ this.orderCallback(studentPaymentOrder);
|
|
|
+ return BaseController.succeed();
|
|
|
+ }else{
|
|
|
+ studentPaymentOrderService.insert(studentPaymentOrder);
|
|
|
+
|
|
|
+ if(isUseBalancePayment || studentPaymentOrder.getExpectAmount().doubleValue() == 0){
|
|
|
+ SysUserCashAccount userCashAccount = sysUserCashAccountService.getLocked(userId);
|
|
|
+ if(userCashAccount == null){
|
|
|
+ throw new BizException("用户账户找不到");
|
|
|
+ }
|
|
|
+ studentPaymentOrder.setPaymentChannel("BALANCE");
|
|
|
+ if(userCashAccount.getBalance().subtract(studentPaymentOrder.getExpectAmount()).doubleValue() >= 0){
|
|
|
+ // 更新订单信息
|
|
|
+ studentPaymentOrder.setActualAmount(new BigDecimal(0));
|
|
|
+ studentPaymentOrder.setBalancePaymentAmount(studentPaymentOrder.getExpectAmount());
|
|
|
+ studentPaymentOrder.setStatus(DealStatusEnum.SUCCESS);
|
|
|
+ studentPaymentOrder.setUpdateTime(now);
|
|
|
+ studentPaymentOrder.setRoutingOrganId(42);
|
|
|
+
|
|
|
+ sysUserCashAccountService.updateBalance(userId, studentPaymentOrder.getExpectAmount().negate(),PlatformCashAccountDetailTypeEnum.PAY_FEE,"对外课程购买");
|
|
|
+
|
|
|
+ this.orderCallback(studentPaymentOrder);
|
|
|
+
|
|
|
+ Map<String,Object> result=new HashMap<>();
|
|
|
+ result.put("orderNo",studentPaymentOrder.getOrderNo());
|
|
|
+
|
|
|
+ return BaseController.succeed(result);
|
|
|
+ }else{
|
|
|
+ if (userCashAccount.getBalance().doubleValue() > 0) {
|
|
|
+ sysUserCashAccountService.updateBalance(userId, userCashAccount.getBalance().negate(), PlatformCashAccountDetailTypeEnum.PAY_FEE, "对外课程购买");
|
|
|
+ amount = studentPaymentOrder.getExpectAmount().subtract(userCashAccount.getBalance());
|
|
|
+ studentPaymentOrder.setActualAmount(amount);
|
|
|
+ studentPaymentOrder.setBalancePaymentAmount(userCashAccount.getBalance());
|
|
|
+ } else {
|
|
|
+ studentPaymentOrder.setBalancePaymentAmount(new BigDecimal(0));
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ String baseApiUrl = sysConfigDao.findConfigValue("base_api_url");
|
|
|
+ Map<String, BigDecimal> classFee = new HashMap<>();
|
|
|
+ classFee.put("course",amount);
|
|
|
+ classFee.put("instrument",BigDecimal.ZERO);
|
|
|
+ classFee.put("accessories",BigDecimal.ZERO);
|
|
|
+ classFee.put("other",BigDecimal.ZERO);
|
|
|
+ try {
|
|
|
+ Map<String,Object> payMap = payService.getPayMap(
|
|
|
+ amount,
|
|
|
+ orderNo,
|
|
|
+ baseApiUrl+"/api-student/studentOrder/notify",
|
|
|
+ baseApiUrl+"/api-student/studentOrder/paymentResult?orderNo=" + orderNo,
|
|
|
+ "网管课购买",
|
|
|
+ coursesGroup.getName(),
|
|
|
+ userId,
|
|
|
+ classFee,
|
|
|
+ null
|
|
|
+ );
|
|
|
+
|
|
|
+ Map<String,BigDecimal> routingFee = (Map<String,BigDecimal>)payMap.get("routingFee");
|
|
|
+ studentPaymentOrder.setRoutingOrganId(42);
|
|
|
+ studentPaymentOrder.setComAmount(routingFee.get("COM"));
|
|
|
+ studentPaymentOrder.setPerAmount(routingFee.get("PER"));
|
|
|
+ studentPaymentOrder.setMerNos((String) payMap.get("routingMerNos"));
|
|
|
+ studentPaymentOrder.setPaymentChannel((String) payMap.get("type"));
|
|
|
+ studentPaymentOrder.setUpdateTime(now);
|
|
|
+ studentPaymentOrderService.update(studentPaymentOrder);
|
|
|
+
|
|
|
+ return BaseController.succeed(payMap);
|
|
|
+ } catch (Exception e) {
|
|
|
+ throw new BizException("订单提交超时,请尝试重新提交购买");
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ @Override
|
|
|
+ @Transactional(rollbackFor = Exception.class,isolation = Isolation.READ_COMMITTED)
|
|
|
+ public void orderCallback(StudentPaymentOrder order) {
|
|
|
+ if(order.getExpectAmount().compareTo(BigDecimal.ZERO)>0){
|
|
|
+ StudentPaymentOrder studentPaymentOrder = studentPaymentOrderDao.get(order.getId());
|
|
|
+ if(!studentPaymentOrder.getStatus().equals(DealStatusEnum.ING)){
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ SysUserCashAccount sysUserCashAccount = sysUserCashAccountService.get(order.getUserId());
|
|
|
+ List<StudentPaymentOrder> userGroupOrders = studentPaymentOrderDao.findUserGroupOrders(order.getUserId(), order.getMusicGroupId(), order.getGroupType(),null);
|
|
|
+ Map<DealStatusEnum, Long> statusOrderNumMap = userGroupOrders.stream().collect(Collectors.groupingBy(StudentPaymentOrder::getStatus, Collectors.counting()));
|
|
|
+ Long successOrderNum=statusOrderNumMap.get(DealStatusEnum.SUCCESS);
|
|
|
+ if(Objects.nonNull(successOrderNum)&&successOrderNum>0){
|
|
|
+ if(order.getStatus().equals(DealStatusEnum.FAILED)&&Objects.nonNull(order.getBalancePaymentAmount())&&order.getBalancePaymentAmount().compareTo(BigDecimal.ZERO)>0){
|
|
|
+ sysUserCashAccountService.updateBalance(order.getUserId(), order.getBalancePaymentAmount(), PlatformCashAccountDetailTypeEnum.REFUNDS, "网管课支付失败,退还余额");
|
|
|
+ }
|
|
|
+ if(order.getStatus().equals(DealStatusEnum.SUCCESS)){
|
|
|
+ sysUserCashAccountService.updateBalance(order.getUserId(), order.getExpectAmount(), PlatformCashAccountDetailTypeEnum.REFUNDS, "重复支付,退还余额");
|
|
|
+ order.setMemo("重复支付,进入余额");
|
|
|
+ }
|
|
|
+ studentPaymentOrderDao.update(order);
|
|
|
+ return;
|
|
|
+ }
|
|
|
+
|
|
|
+ Long ingOrderNum=statusOrderNumMap.get(DealStatusEnum.ING);
|
|
|
+ if(Objects.nonNull(ingOrderNum)&&ingOrderNum>1&&order.getStatus().equals(DealStatusEnum.FAILED)){
|
|
|
+ if(Objects.nonNull(order.getBalancePaymentAmount())&&order.getBalancePaymentAmount().compareTo(BigDecimal.ZERO)>0){
|
|
|
+ sysUserCashAccountService.updateBalance(order.getUserId(), order.getBalancePaymentAmount(), PlatformCashAccountDetailTypeEnum.REFUNDS, "网管课支付失败,退还余额");
|
|
|
+ }
|
|
|
+ studentPaymentOrderDao.update(order);
|
|
|
+ return;
|
|
|
+ }
|
|
|
+
|
|
|
+ if(order.getStatus().equals(DealStatusEnum.SUCCESS)){
|
|
|
+ courseScheduleDao.updateGroupCourseLock(order.getMusicGroupId(),GroupType.PRACTICE,0);
|
|
|
+ }else{
|
|
|
+ if(Objects.nonNull(order.getBalancePaymentAmount())&&order.getBalancePaymentAmount().compareTo(BigDecimal.ZERO)>0){
|
|
|
+ sysUserCashAccountService.updateBalance(order.getUserId(), order.getBalancePaymentAmount(), PlatformCashAccountDetailTypeEnum.REFUNDS, "网管课支付失败,退还余额");
|
|
|
+ }
|
|
|
+ studentPaymentOrderDao.update(order);
|
|
|
+ CoursesGroup coursesGroup = coursesGroupDao.get(Long.valueOf(order.getMusicGroupId()));
|
|
|
+ coursesGroup.setStatus(GroupStatusEnum.CANCEL);
|
|
|
+ coursesGroupDao.update(coursesGroup);
|
|
|
+ groupService.deleteGroupOtherInfo(order.getMusicGroupId(),GroupType.PRACTICE);
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ studentPaymentOrderDao.update(order);
|
|
|
+
|
|
|
+ //插入缴费明细
|
|
|
+ //收入
|
|
|
+ SysUserCashAccountDetail sysUserIncomeCashAccountDetail = new SysUserCashAccountDetail();
|
|
|
+ sysUserIncomeCashAccountDetail.setUserId(order.getUserId());
|
|
|
+ sysUserIncomeCashAccountDetail.setType(PlatformCashAccountDetailTypeEnum.RECHARGE);
|
|
|
+ sysUserIncomeCashAccountDetail.setStatus(DealStatusEnum.SUCCESS);
|
|
|
+ sysUserIncomeCashAccountDetail.setAmount(order.getActualAmount());
|
|
|
+ sysUserIncomeCashAccountDetail.setBalance(sysUserCashAccount.getBalance().add(order.getActualAmount()));
|
|
|
+ sysUserIncomeCashAccountDetail.setAttribute(order.getTransNo());
|
|
|
+ sysUserIncomeCashAccountDetail.setChannel(studentPaymentOrder.getPaymentChannel());
|
|
|
+ sysUserIncomeCashAccountDetail.setComAmount(studentPaymentOrder.getComAmount());
|
|
|
+ sysUserIncomeCashAccountDetail.setPerAmount(studentPaymentOrder.getPerAmount());
|
|
|
+
|
|
|
+ //支出
|
|
|
+ SysUserCashAccountDetail sysUserExpendCashAccountDetail = new SysUserCashAccountDetail();
|
|
|
+ sysUserExpendCashAccountDetail.setUserId(order.getUserId());
|
|
|
+ sysUserExpendCashAccountDetail.setType(PlatformCashAccountDetailTypeEnum.PAY_FEE);
|
|
|
+ sysUserExpendCashAccountDetail.setStatus(DealStatusEnum.SUCCESS);
|
|
|
+ sysUserExpendCashAccountDetail.setAmount(order.getActualAmount().negate());
|
|
|
+ sysUserExpendCashAccountDetail.setBalance(sysUserCashAccount.getBalance());
|
|
|
+ sysUserExpendCashAccountDetail.setAttribute(order.getTransNo());
|
|
|
+ sysUserExpendCashAccountDetail.setChannel(studentPaymentOrder.getPaymentChannel());
|
|
|
+
|
|
|
+ if(studentPaymentOrder.getComAmount() != null){
|
|
|
+ sysUserIncomeCashAccountDetail.setComAmount(studentPaymentOrder.getComAmount().negate());
|
|
|
+ }
|
|
|
+ if(studentPaymentOrder.getPerAmount() != null){
|
|
|
+ sysUserExpendCashAccountDetail.setPerAmount(studentPaymentOrder.getPerAmount().negate());
|
|
|
+ }
|
|
|
+
|
|
|
+ sysUserCashAccountDetailService.insert(sysUserIncomeCashAccountDetail);
|
|
|
+ sysUserCashAccountDetailService.insert(sysUserExpendCashAccountDetail);
|
|
|
+
|
|
|
+ CoursesGroup coursesGroup = coursesGroupDao.get(Long.valueOf(order.getMusicGroupId()));
|
|
|
+ if(!coursesGroup.getStatus().equals(GroupStatusEnum.NORMAL)){
|
|
|
+ order.setVersion(order.getVersion()+1);
|
|
|
+ order.setMemo("支付成功,但课程组不处于正常状态");
|
|
|
+ studentPaymentOrderDao.update(order);
|
|
|
+
|
|
|
+ sysUserCashAccountService.updateBalance(order.getUserId(), order.getExpectAmount(), PlatformCashAccountDetailTypeEnum.REFUNDS, "支付成功,但课程组不处于正常状态");
|
|
|
+
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ CoursesGroup coursesGroup = coursesGroupDao.get(Long.valueOf(order.getMusicGroupId()));
|
|
|
+ ClassGroup classGroup = classGroupDao.findByMusicGroupAndType(order.getMusicGroupId(), GroupType.COMM.getCode());
|
|
|
+
|
|
|
+ ClassGroupStudentMapper classGroupStudentMapper = new ClassGroupStudentMapper();
|
|
|
+ classGroupStudentMapper.setMusicGroupId(order.getMusicGroupId());
|
|
|
+ classGroupStudentMapper.setClassGroupId(classGroup.getId());
|
|
|
+ classGroupStudentMapper.setUserId(order.getUserId());
|
|
|
+ classGroupStudentMapper.setStatus(ClassGroupStudentStatusEnum.NORMAL);
|
|
|
+ classGroupStudentMapper.setGroupType(GroupType.COMM);
|
|
|
+ classGroupStudentMapperDao.insert(classGroupStudentMapper);
|
|
|
+
|
|
|
+ List<CourseScheduleStudentPayment> courseScheduleStudentPayments = new ArrayList<>();
|
|
|
+ List<CourseSchedule> groupNotStartCourses = courseScheduleDao.findGroupNotStartCourses(order.getMusicGroupId(), GroupType.COMM);
|
|
|
+ if(CollectionUtils.isEmpty(groupNotStartCourses)){
|
|
|
+ throw new BizException("没有剩余课时");
|
|
|
+ }
|
|
|
+ BigDecimal singleCoursePrice = order.getExpectAmount().divide(new BigDecimal(groupNotStartCourses.size()), CommonConstants.DECIMAL_PLACE, BigDecimal.ROUND_DOWN);
|
|
|
+ for (CourseSchedule courseSchedule : groupNotStartCourses) {
|
|
|
+ //学生缴费记录
|
|
|
+ CourseScheduleStudentPayment courseScheduleStudentPayment = new CourseScheduleStudentPayment();
|
|
|
+ courseScheduleStudentPayment.setGroupType(GroupType.COMM);
|
|
|
+ courseScheduleStudentPayment.setMusicGroupId(order.getMusicGroupId());
|
|
|
+ courseScheduleStudentPayment.setCourseScheduleId(courseSchedule.getId());
|
|
|
+ courseScheduleStudentPayment.setUserId(order.getUserId());
|
|
|
+ courseScheduleStudentPayment.setExpectPrice(singleCoursePrice);
|
|
|
+ courseScheduleStudentPayment.setClassGroupId(classGroup.getId());
|
|
|
+ courseScheduleStudentPayments.add(courseScheduleStudentPayment);
|
|
|
+ }
|
|
|
+ courseScheduleStudentPaymentDao.batchInsert(courseScheduleStudentPayments);
|
|
|
+
|
|
|
+ try {
|
|
|
+// contractService.transferPracticeCoursesContract(order.getUserId(),classGroup.getTotalClassTimes(),practiceGroup.getCoursesStartDate(),practiceGroup.getCoursesExpireDate(),order.getExpectAmount());
|
|
|
+ } catch (Exception e) {
|
|
|
+ LOGGER.error("网管课[{}]购买协议错误:{}",order.getMusicGroupId(),e.getMessage(),e.getMessage());
|
|
|
+ }
|
|
|
+
|
|
|
+ List<ImGroupMember> imGroupMemberList = new ArrayList<>();
|
|
|
+ imGroupMemberList.add(new ImGroupMember(coursesGroup.getTeacherId().toString()));
|
|
|
+ imGroupMemberList.add(new ImGroupMember(order.getUserId().toString()));
|
|
|
+ ImGroupMember[] imGroupMembers = imGroupMemberList.toArray(new ImGroupMember[imGroupMemberList.size()]);
|
|
|
+ // 创建群组
|
|
|
+ imFeignService.groupCreate(new ImGroupModel(classGroup.getId().toString(), imGroupMembers, classGroup.getName()));
|
|
|
+ }
|
|
|
}
|