|
@@ -4,18 +4,13 @@ import static com.ym.mec.biz.dal.entity.ApprovalStatus.PROCESSING;
|
|
|
import static com.ym.mec.biz.dal.enums.DealStatusEnum.CLOSE;
|
|
|
import static com.ym.mec.biz.dal.enums.DealStatusEnum.ING;
|
|
|
import static com.ym.mec.biz.dal.enums.DealStatusEnum.SUCCESS;
|
|
|
-import static com.ym.mec.biz.dal.enums.OrderDetailTypeEnum.ACCESSORIES;
|
|
|
-import static com.ym.mec.biz.dal.enums.OrderDetailTypeEnum.CLOUD_TEACHER;
|
|
|
-import static com.ym.mec.biz.dal.enums.OrderDetailTypeEnum.CLOUD_TEACHER_PLUS;
|
|
|
-import static com.ym.mec.biz.dal.enums.OrderDetailTypeEnum.DEGREE_REGISTRATION;
|
|
|
-import static com.ym.mec.biz.dal.enums.OrderDetailTypeEnum.MAINTENANCE;
|
|
|
-import static com.ym.mec.biz.dal.enums.OrderDetailTypeEnum.MUSICAL;
|
|
|
-import static com.ym.mec.biz.dal.enums.OrderDetailTypeEnum.OTHER;
|
|
|
-import static com.ym.mec.biz.dal.enums.OrderDetailTypeEnum.TEACHING;
|
|
|
+import static com.ym.mec.biz.dal.enums.OrderDetailTypeEnum.*;
|
|
|
+import static com.ym.mec.biz.dal.enums.OrderDetailTypeEnum.VIP;
|
|
|
import static com.ym.mec.biz.dal.enums.PaymentStatusEnum.YES;
|
|
|
|
|
|
import java.io.IOException;
|
|
|
import java.math.BigDecimal;
|
|
|
+import java.sql.Connection;
|
|
|
import java.text.SimpleDateFormat;
|
|
|
import java.util.ArrayList;
|
|
|
import java.util.Arrays;
|
|
@@ -31,14 +26,17 @@ import java.util.function.Function;
|
|
|
import java.util.stream.Collectors;
|
|
|
|
|
|
import com.ym.mec.biz.dal.dao.*;
|
|
|
+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.*;
|
|
|
+import com.ym.mec.common.controller.BaseController;
|
|
|
import com.ym.mec.common.tenant.TenantContextHolder;
|
|
|
import org.apache.commons.lang3.StringUtils;
|
|
|
import org.slf4j.Logger;
|
|
|
import org.slf4j.LoggerFactory;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
+import org.springframework.http.HttpStatus;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
import org.springframework.transaction.annotation.Propagation;
|
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
@@ -48,19 +46,6 @@ import com.alibaba.fastjson.TypeReference;
|
|
|
import com.ym.mec.auth.api.client.SysUserFeignService;
|
|
|
import com.ym.mec.auth.api.entity.SysUser;
|
|
|
import com.ym.mec.auth.api.entity.SysUserRole;
|
|
|
-import com.ym.mec.biz.dal.dto.BasicUserDto;
|
|
|
-import com.ym.mec.biz.dal.dto.CloseMusicGroupDto;
|
|
|
-import com.ym.mec.biz.dal.dto.CourseScheduleTeachersDto;
|
|
|
-import com.ym.mec.biz.dal.dto.HighClassGroupDto;
|
|
|
-import com.ym.mec.biz.dal.dto.MusicCardDto;
|
|
|
-import com.ym.mec.biz.dal.dto.MusicGroupBasicDto;
|
|
|
-import com.ym.mec.biz.dal.dto.RegisterPayDto;
|
|
|
-import com.ym.mec.biz.dal.dto.RenewParamDto;
|
|
|
-import com.ym.mec.biz.dal.dto.SporadicPayDto;
|
|
|
-import com.ym.mec.biz.dal.dto.StudentApplyInstrumentDto;
|
|
|
-import com.ym.mec.biz.dal.dto.SubFeeSettingDto;
|
|
|
-import com.ym.mec.biz.dal.dto.SubjectRegisterDto;
|
|
|
-import com.ym.mec.biz.dal.dto.UpdateExpectedNumDto;
|
|
|
import com.ym.mec.biz.dal.entity.MusicGroupPaymentCalender.PayUserType;
|
|
|
import com.ym.mec.biz.dal.entity.MusicGroupPaymentCalender.PaymentCalenderStatusEnum;
|
|
|
import com.ym.mec.biz.dal.entity.MusicGroupPaymentCalender.PaymentType;
|
|
@@ -148,6 +133,8 @@ public class MusicGroupServiceImpl extends BaseServiceImpl<String, MusicGroup> i
|
|
|
@Autowired
|
|
|
private StudentPaymentOrderDetailService studentPaymentOrderDetailService;
|
|
|
@Autowired
|
|
|
+ private SellOrderService sellOrderService;
|
|
|
+ @Autowired
|
|
|
private PayService payService;
|
|
|
@Autowired
|
|
|
private SysUserFeignService sysUserFeignService;
|
|
@@ -176,6 +163,8 @@ public class MusicGroupServiceImpl extends BaseServiceImpl<String, MusicGroup> i
|
|
|
@Autowired
|
|
|
private ClassGroupStudentMapperService classGroupStudentMapperService;
|
|
|
@Autowired
|
|
|
+ private MusicGroupPaymentCalenderDetailService musicGroupPaymentCalenderDetailService;
|
|
|
+ @Autowired
|
|
|
private MusicGroupPaymentCalenderDetailDao musicGroupPaymentCalenderDetailDao;
|
|
|
@Autowired
|
|
|
private ImGroupMemberService imGroupMemberService;
|
|
@@ -205,7 +194,7 @@ public class MusicGroupServiceImpl extends BaseServiceImpl<String, MusicGroup> i
|
|
|
@Autowired
|
|
|
private StudentPreRegistrationDao studentPreRegistrationDao;
|
|
|
@Autowired
|
|
|
- private OrganizationCloudTeacherFeeDao organizationCloudTeacherFeeDao;
|
|
|
+ private ActivityUserMapperService activityUserMapperService;
|
|
|
|
|
|
@Autowired
|
|
|
private GroupEventSource groupEventSource;
|
|
@@ -230,6 +219,8 @@ public class MusicGroupServiceImpl extends BaseServiceImpl<String, MusicGroup> i
|
|
|
|
|
|
@Autowired
|
|
|
private SysCouponCodeService sysCouponCodeService;
|
|
|
+ @Autowired
|
|
|
+ private StudentInstrumentService studentInstrumentService;
|
|
|
|
|
|
private SimpleDateFormat sdf_ymd = new SimpleDateFormat("yyyy-MM-dd");
|
|
|
|
|
@@ -661,157 +652,263 @@ public class MusicGroupServiceImpl extends BaseServiceImpl<String, MusicGroup> i
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
- @Transactional(rollbackFor = Exception.class)
|
|
|
- public Map pay(RegisterPayDto registerPayDto) throws Exception {
|
|
|
-
|
|
|
- StudentRegistration studentRegistration = studentRegistrationService.get(registerPayDto.getRegisterId().longValue());
|
|
|
+ @Transactional(propagation = Propagation.REQUIRED, rollbackFor = Exception.class)
|
|
|
+ public HttpResponseResult renew(RegisterPayDto renewParamDto) throws Exception {
|
|
|
+ Long calenderId = renewParamDto.getCalenderId();
|
|
|
+ Integer userId = renewParamDto.getUserId();
|
|
|
+ MusicGroupPaymentCalender calender = musicGroupPaymentCalenderDao.get(calenderId);
|
|
|
+ StudentRegistration studentRegistration = studentRegistrationService.queryByUserIdAndMusicGroupId(userId, calender.getMusicGroupId());
|
|
|
if (studentRegistration == null) {
|
|
|
- throw new BizException("报名信息有误,请核查");
|
|
|
+ throw new BizException("请走报名缴费流程");
|
|
|
}
|
|
|
-
|
|
|
- MusicGroupPaymentCalender musicGroupRegCalender = musicGroupPaymentCalenderDao.findByMusicGroupRegCalender(studentRegistration.getMusicGroupId());
|
|
|
- if(musicGroupRegCalender == null){
|
|
|
- throw new BizException("缴费信息不存在");
|
|
|
+ Integer organId = studentRegistration.getOrganId();
|
|
|
+ MusicGroupPaymentCalenderDetail calenderDetail = musicGroupPaymentCalenderDetailDao.findByCalenderIdAndUserId(calenderId, userId);
|
|
|
+ //关闭之前的订单
|
|
|
+ if (calenderDetail.getPaymentOrderId() != null) {
|
|
|
+ StudentPaymentOrder oldStudentPaymentOrder = studentPaymentOrderDao.get(calenderDetail.getPaymentOrderId());
|
|
|
+ HttpResponseResult result = studentPaymentOrderService.checkRepeatPay(oldStudentPaymentOrder, renewParamDto.getRepeatPay());
|
|
|
+ if(result.getCode() != 200){
|
|
|
+ return result;
|
|
|
+ }
|
|
|
}
|
|
|
- MusicGroup musicGroup = musicGroupDao.get(studentRegistration.getMusicGroupId());
|
|
|
- if(musicGroup == null){
|
|
|
- throw new BizException("查询乐团信息失败");
|
|
|
+
|
|
|
+ //获取订单总金额
|
|
|
+ MusicGroupApplyGoodsDto goodsDto = getCalenderTotalAmount(renewParamDto,calender);
|
|
|
+
|
|
|
+ String orderNo = idGeneratorService.generatorId("payment") + "";
|
|
|
+
|
|
|
+ Date date = new Date();
|
|
|
+ //使用优惠券
|
|
|
+ StudentPaymentOrder studentPaymentOrder = sysCouponCodeService.use(renewParamDto.getCouponIdList(),goodsDto.getOrderAmount(),true);
|
|
|
+ studentPaymentOrder.setGroupType(GroupType.MUSIC);
|
|
|
+ studentPaymentOrder.setUserId(userId);
|
|
|
+ studentPaymentOrder.setOrderNo(orderNo);
|
|
|
+ if (calender.getPaymentType() == PaymentType.ADD_STUDENT) {
|
|
|
+ studentPaymentOrder.setType(OrderTypeEnum.ADD_STUDENT);
|
|
|
+ } else {
|
|
|
+ studentPaymentOrder.setType(OrderTypeEnum.RENEW);
|
|
|
}
|
|
|
- Integer tenantId = TenantContextHolder.getTenantId();
|
|
|
+ studentPaymentOrder.setStatus(DealStatusEnum.ING);
|
|
|
+ studentPaymentOrder.setMusicGroupId(calender.getMusicGroupId());
|
|
|
+ studentPaymentOrder.setBatchNo(calender.getId() + "");
|
|
|
+ studentPaymentOrder.setCreateTime(date);
|
|
|
+ studentPaymentOrder.setUpdateTime(date);
|
|
|
+ studentPaymentOrder.setVersion(0);
|
|
|
+ studentPaymentOrderService.insert(studentPaymentOrder);
|
|
|
+ // 订单详情
|
|
|
+ studentPaymentOrder = studentRegistrationService.addOrder(studentRegistration,studentPaymentOrder,goodsDto,renewParamDto);
|
|
|
+ BigDecimal actualAmount = studentPaymentOrder.getActualAmount();
|
|
|
|
|
|
- Integer userId = studentRegistration.getUserId();
|
|
|
+ BigDecimal amount = renewParamDto.getAmount(); //前端获取的价格
|
|
|
+ if (amount.compareTo(actualAmount) != 0) {
|
|
|
+ throw new BizException("商品价格不符");
|
|
|
+ }
|
|
|
+ if (amount.compareTo(BigDecimal.ZERO) < 0) {
|
|
|
+ throw new BizException("价格异常");
|
|
|
+ }
|
|
|
+ calenderDetail.setPaymentStatus(PaymentStatus.PROCESSING);
|
|
|
+ calenderDetail.setPaymentOrderId(studentPaymentOrder.getId());
|
|
|
+ musicGroupPaymentCalenderDetailDao.update(calenderDetail);
|
|
|
|
|
|
- BigDecimal amount = registerPayDto.getAmount(); //前端获取的价格
|
|
|
- BigDecimal orderAmount = new BigDecimal("0");
|
|
|
+ BigDecimal balance = BigDecimal.ZERO;
|
|
|
+ if (renewParamDto.getUseBalancePayment() || amount.doubleValue() == 0) {
|
|
|
+ SysUserCashAccount userCashAccount = sysUserCashAccountService.getLocked(userId);
|
|
|
+ if (userCashAccount == null) {
|
|
|
+ throw new BizException("用户账户找不到");
|
|
|
+ }
|
|
|
+ studentPaymentOrder.setPaymentChannel("BALANCE");
|
|
|
+ if (userCashAccount.getBalance().subtract(amount).doubleValue() >= 0) {
|
|
|
+ // 更新订单信息
|
|
|
+ balance = amount;
|
|
|
+ studentPaymentOrder.setActualAmount(BigDecimal.ZERO);
|
|
|
+ studentPaymentOrder.setBalancePaymentAmount(amount);
|
|
|
+ studentPaymentOrder.setActualAmount(new BigDecimal(0));
|
|
|
+ studentPaymentOrder.setUpdateTime(date);
|
|
|
+ studentPaymentOrder.setOrganId(organId);
|
|
|
+ studentPaymentOrder.setRoutingOrganId(organId);
|
|
|
+ studentPaymentOrderService.update(studentPaymentOrder);
|
|
|
+ sysUserCashAccountService.updateBalance(userId, amount.negate(), PlatformCashAccountDetailTypeEnum.PAY_FEE, "乐团续费");
|
|
|
+ amount = BigDecimal.ZERO;
|
|
|
+ } else {
|
|
|
+ if (userCashAccount.getBalance().doubleValue() > 0) {
|
|
|
+ balance = userCashAccount.getBalance();
|
|
|
+ sysUserCashAccountService.updateBalance(userId, balance.negate(), PlatformCashAccountDetailTypeEnum.PAY_FEE, "乐团续费");
|
|
|
+ amount = amount.subtract(userCashAccount.getBalance());
|
|
|
+ studentPaymentOrder.setBalancePaymentAmount(userCashAccount.getBalance());
|
|
|
+ studentPaymentOrder.setActualAmount(studentPaymentOrder.getActualAmount().subtract(userCashAccount.getBalance()));
|
|
|
+ } else {
|
|
|
+ studentPaymentOrder.setBalancePaymentAmount(new BigDecimal(0));
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ String baseApiUrl = sysConfigDao.findConfigValue("base_api_url");
|
|
|
|
|
|
- //获取课程价格
|
|
|
-// MusicGroupSubjectPlan musicOneSubjectClassPlan = musicGroupSubjectPlanService.getMusicOneSubjectClassPlan(studentRegistration.getMusicGroupId(), studentRegistration.getActualSubjectId());
|
|
|
-// BigDecimal courseFee = musicOneSubjectClassPlan.getFee() == null ? BigDecimal.ZERO : musicOneSubjectClassPlan.getFee();
|
|
|
-// orderAmount = orderAmount.add(courseFee);
|
|
|
+ if (amount.compareTo(BigDecimal.ZERO) == 0) {
|
|
|
+ studentPaymentRouteOrderService.addRouteOrder(orderNo, organId, balance);
|
|
|
+ Map<String, String> notifyMap = new HashMap<>(4);
|
|
|
+ notifyMap.put("tradeState", "1");
|
|
|
+ notifyMap.put("merOrderNo", studentPaymentOrder.getOrderNo());
|
|
|
+ notifyMap.put("channelType", "");
|
|
|
+ notifyMap.put("orderNo", "");
|
|
|
+ studentPaymentOrderService.updateOrder(notifyMap);
|
|
|
+ return BaseController.failed(HttpStatus.CREATED, notifyMap, "恭喜您,缴费成功!");
|
|
|
+ }
|
|
|
|
|
|
- BigDecimal remitFee = BigDecimal.ZERO; //乐器减免金额
|
|
|
- BigDecimal courseRemitFee = BigDecimal.ZERO; //课程减免费用
|
|
|
- boolean remitCourseRFeeFlag = false; //减免课程费用标识
|
|
|
+ Map<String, Object> payMap = payService.getPayMap(
|
|
|
+ amount,
|
|
|
+ balance,
|
|
|
+ orderNo,
|
|
|
+ baseApiUrl + "/api-student/studentOrder/notify",
|
|
|
+ baseApiUrl + "/api-student/studentOrder/paymentResult?orderNo=" + studentPaymentOrder.getOrderNo(),
|
|
|
+ "续费",
|
|
|
+ "乐团续费",
|
|
|
+ organId,
|
|
|
+ "renew"
|
|
|
+ );
|
|
|
|
|
|
- //乐器及打包辅件
|
|
|
- List<MusicGroupSubjectGoodsGroup> goodsGroups = new ArrayList<>();
|
|
|
+ studentPaymentOrder.setActualAmount(amount);
|
|
|
+ studentPaymentOrder.setOrganId(organId);
|
|
|
+ studentPaymentOrder.setMerNos((String) payMap.get("routingMerNos"));
|
|
|
+ studentPaymentOrder.setPaymentChannel((String) payMap.get("type"));
|
|
|
+ studentPaymentOrder.setUpdateTime(date);
|
|
|
+ studentPaymentOrderService.update(studentPaymentOrder);
|
|
|
+ return BaseController.succeed(payMap);
|
|
|
+ }
|
|
|
+
|
|
|
+ private MusicGroupApplyGoodsDto getCalenderTotalAmount(RegisterPayDto registerPayDto,MusicGroupPaymentCalender calender){
|
|
|
+ MusicGroupApplyGoodsDto goodsDto = new MusicGroupApplyGoodsDto();
|
|
|
+ //乐器及打包辅件价格
|
|
|
+ List<MusicGroupSubjectGoodsGroup> goodsGroups;
|
|
|
if (registerPayDto.getGoodsGroups() != null && registerPayDto.getGoodsGroups().size() > 0) {
|
|
|
String goodsGroupIds = registerPayDto.getGoodsGroups().keySet().stream().map(Object::toString).collect(Collectors.joining(","));
|
|
|
goodsGroups = musicGroupSubjectGoodsGroupService.findGoodsGroupByIds(goodsGroupIds);
|
|
|
- }
|
|
|
- for (MusicGroupSubjectGoodsGroup goodsGroup : goodsGroups) {
|
|
|
- Map<String, BigDecimal> groupType = JSONObject.parseObject(goodsGroup.getKitGroupPurchaseTypeJson(), new TypeReference<Map<String, BigDecimal>>() {});
|
|
|
-
|
|
|
- if (goodsGroup.getType().equals(GoodsType.INSTRUMENT)) {
|
|
|
- String kitGroupPurchaseType = registerPayDto.getGoodsGroups().get(goodsGroup.getId());
|
|
|
- if (!groupType.containsKey(kitGroupPurchaseType)) {
|
|
|
- throw new BizException("乐器提供方式不存在,请核查");
|
|
|
- }
|
|
|
- if (!kitGroupPurchaseType.equals("GROUP")) {
|
|
|
- goodsGroup.setPrice(kitGroupPurchaseType.equals("FREE") ? new BigDecimal(0) : goodsGroup.getDepositFee());
|
|
|
- } else {
|
|
|
- remitCourseRFeeFlag = goodsGroup.getGroupRemissionCourseFee().equals(1);
|
|
|
+ goodsDto.setGoodsGroups(goodsGroups);
|
|
|
+ for (MusicGroupSubjectGoodsGroup goodsGroup : goodsGroups) {
|
|
|
+ Map<String, BigDecimal> groupType = JSONObject.parseObject(goodsGroup.getKitGroupPurchaseTypeJson(), new TypeReference<Map<String, BigDecimal>>() {});
|
|
|
+
|
|
|
+ if (goodsGroup.getType().equals(GoodsType.INSTRUMENT)) {
|
|
|
+ String kitGroupPurchaseType = registerPayDto.getGoodsGroups().get(goodsGroup.getId());
|
|
|
+ if (!groupType.containsKey(kitGroupPurchaseType)) {
|
|
|
+ throw new BizException("乐器提供方式不存在,请核查");
|
|
|
+ }
|
|
|
+ if (!kitGroupPurchaseType.equals("GROUP")) {
|
|
|
+ goodsGroup.setPrice(kitGroupPurchaseType.equals("FREE") ? new BigDecimal(0) : goodsGroup.getDepositFee());
|
|
|
+ } else {
|
|
|
+ //购买乐器是否减免课程费用
|
|
|
+ goodsDto.setRemitCourseRFeeFlag(goodsGroup.getGroupRemissionCourseFee().equals(1));
|
|
|
+ }
|
|
|
+ goodsGroup.setKitGroupPurchaseType(KitGroupPurchaseTypeEnum.valueOf(kitGroupPurchaseType));
|
|
|
+ goodsDto.setRemitFee(groupType.get(kitGroupPurchaseType) == null ? BigDecimal.ZERO : groupType.get(kitGroupPurchaseType));
|
|
|
}
|
|
|
- goodsGroup.setKitGroupPurchaseType(KitGroupPurchaseTypeEnum.valueOf(kitGroupPurchaseType));
|
|
|
- remitFee = groupType.get(kitGroupPurchaseType) == null ? BigDecimal.ZERO : groupType.get(kitGroupPurchaseType);
|
|
|
- }
|
|
|
- goodsGroup.setGoodsList(goodsService.findGoodsByIds(goodsGroup.getGoodsIdList()));
|
|
|
-
|
|
|
- if(goodsGroup.getType().equals(GoodsType.ACCESSORIES)){
|
|
|
- if((registerPayDto.getBuyCloudTeacher() || registerPayDto.getBuyCloudTeacherPlus()) && musicGroup.getCourseViewType() == CourseViewTypeEnum.MEMBER_FEE){
|
|
|
- goodsGroup.setPrice(BigDecimal.ZERO);
|
|
|
- continue;
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- if(musicGroup.getOrganId() == 55 && (registerPayDto.getNewCourse() == null || registerPayDto.getNewCourse().size() == 0) && !(registerPayDto.getBuyCloudTeacher() || registerPayDto.getBuyCloudTeacherPlus())){
|
|
|
- //取商品零售价
|
|
|
- if (StringUtils.isNotBlank(goodsGroup.getGoodsIdList())) {
|
|
|
- List<Goods> goodsList = goodsDao.findGoodsByIds(goodsGroup.getGoodsIdList());
|
|
|
- for(Goods goods : goodsList){
|
|
|
- orderAmount = orderAmount.add(goods.getDiscountPrice());
|
|
|
- }
|
|
|
+ goodsGroup.setGoodsList(goodsService.findGoodsByIds(goodsGroup.getGoodsIdList()));
|
|
|
+
|
|
|
+ //齐齐哈尔走特殊规则
|
|
|
+ if(calender.getOrganId() == 55 && (registerPayDto.getNewCourse() == null || registerPayDto.getNewCourse().size() == 0) && !(registerPayDto.getBuyCloudTeacher() || registerPayDto.getBuyCloudTeacherPlus())){
|
|
|
+ //取商品零售价
|
|
|
+ if (StringUtils.isNotBlank(goodsGroup.getGoodsIdList())) {
|
|
|
+ List<Goods> goodsList = goodsDao.findGoodsByIds(goodsGroup.getGoodsIdList());
|
|
|
+ for(Goods goods : goodsList){
|
|
|
+ goodsDto.setOrderAmount(goodsDto.getOrderAmount().add(goods.getDiscountPrice()));
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }else{
|
|
|
+ goodsDto.setOrderAmount(goodsDto.getOrderAmount().add(goodsGroup.getPrice()));
|
|
|
}
|
|
|
- }else{
|
|
|
- orderAmount = orderAmount.add(goodsGroup.getPrice());
|
|
|
}
|
|
|
+ goodsDto.setOrderAmount(goodsDto.getOrderAmount().subtract(goodsDto.getRemitFee()));
|
|
|
}
|
|
|
- orderAmount = orderAmount.subtract(remitFee);
|
|
|
-
|
|
|
//新课程形态
|
|
|
- List<MusicGroupPaymentCalenderCourseSettings> newCourses = new ArrayList<>();
|
|
|
- if (musicGroupRegCalender.getPayUserType() == PayUserType.STUDENT && registerPayDto.getNewCourse() != null && registerPayDto.getNewCourse().size() > 0) {
|
|
|
+ List<MusicGroupPaymentCalenderCourseSettings> newCourses;
|
|
|
+ if (calender.getPayUserType() == PayUserType.STUDENT && registerPayDto.getNewCourse() != null && registerPayDto.getNewCourse().size() > 0) {
|
|
|
newCourses = musicGroupPaymentCalenderCourseSettingsDao.getCalenderCourseSettings(registerPayDto.getNewCourse());
|
|
|
for (MusicGroupPaymentCalenderCourseSettings calenderCourseSetting : newCourses) {
|
|
|
- if (remitCourseRFeeFlag && !calenderCourseSetting.getIsStudentOptional()) {
|
|
|
- courseRemitFee = courseRemitFee.add(calenderCourseSetting.getCourseCurrentPrice());
|
|
|
- continue;
|
|
|
+ if (goodsDto.isRemitCourseRFeeFlag()) {
|
|
|
+ goodsDto.setCourseRemitFee(goodsDto.getCourseRemitFee().add(calenderCourseSetting.getCourseCurrentPrice()));
|
|
|
+ }else {
|
|
|
+ goodsDto.setOrderAmount(goodsDto.getOrderAmount().add(calenderCourseSetting.getCourseCurrentPrice()));
|
|
|
}
|
|
|
- orderAmount = orderAmount.add(calenderCourseSetting.getCourseCurrentPrice());
|
|
|
}
|
|
|
+ goodsDto.setNewCourses(newCourses);
|
|
|
+ }
|
|
|
+ //活动价格
|
|
|
+ List<Long> buyCalenderActivityIdList = registerPayDto.getBuyCalenderActivityId();
|
|
|
+ if(buyCalenderActivityIdList != null && buyCalenderActivityIdList.size() > 0){
|
|
|
+ goodsDto.setOrderAmount(goodsDto.getOrderAmount().add(musicGroupPaymentCalenderService.getActivityAmount(buyCalenderActivityIdList)));
|
|
|
}
|
|
|
- //乐器保养
|
|
|
+ //乐器保养价格
|
|
|
if (registerPayDto.getBuyMaintenance()) {
|
|
|
- String configValue = sysTenantConfigService.getTenantConfigValue(SysConfigService.ONE_YEAR_MUSICAL_REPAIR_AMOUNT, tenantId);
|
|
|
- if(StringUtils.isEmpty(configValue)){
|
|
|
- throw new BizException("乐保价格异常,请联系指导老师");
|
|
|
+ goodsDto.setOrderAmount(goodsDto.getOrderAmount().add(musicGroupPaymentCalenderService.getRepairAmount(calender.getId())));
|
|
|
+ }
|
|
|
+ //云教练价格和订单
|
|
|
+ if (registerPayDto.getBuyCloudTeacher()){
|
|
|
+ goodsDto.setOrderAmount(goodsDto.getOrderAmount().add(musicGroupPaymentCalenderService.getMemberAmount(calender.getId())));
|
|
|
+ }
|
|
|
+ //合班缴费
|
|
|
+ List<MusicGroupPaymentCalenderStudentDetail> studentDetails = musicGroupPaymentCalenderStudentDetailDao.findByBatchNoAndUserId(registerPayDto.getBatchNo(), registerPayDto.getUserId());
|
|
|
+ if(studentDetails != null && studentDetails.size() > 0){
|
|
|
+ goodsDto.setOrderAmount(goodsDto.getOrderAmount().add(studentDetails.stream().map(e->e.getCourseCurrentPrice()).reduce(BigDecimal.ZERO,BigDecimal::add)));
|
|
|
+ }
|
|
|
+ return goodsDto;
|
|
|
+ }
|
|
|
+
|
|
|
+ @Override
|
|
|
+ @Transactional(rollbackFor = Exception.class)
|
|
|
+ public HttpResponseResult pay(RegisterPayDto registerPayDto) throws Exception {
|
|
|
+ //判断用户是否已存在订单
|
|
|
+ List<StudentPaymentOrder> applyOrderList = studentPaymentOrderService.findMusicGroupApplyOrderByStatus(registerPayDto.getUserId(), registerPayDto.getMusicGroupId(), DealStatusEnum.ING);
|
|
|
+
|
|
|
+ if (applyOrderList != null && applyOrderList.size() > 0) {
|
|
|
+ HttpResponseResult result = studentPaymentOrderService.checkRepeatPay(applyOrderList.get(0), registerPayDto.getRepeatPay());
|
|
|
+ if(result.getCode() != 200){
|
|
|
+ return result;
|
|
|
}
|
|
|
- orderAmount = orderAmount.add(new BigDecimal(configValue));
|
|
|
}
|
|
|
-
|
|
|
+ StudentRegistration studentRegistration = studentRegistrationService.get(registerPayDto.getRegisterId().longValue());
|
|
|
+ if (studentRegistration == null) {
|
|
|
+ throw new BizException("报名信息有误,请核查");
|
|
|
+ }
|
|
|
+ MusicGroupPaymentCalender musicGroupRegCalender = musicGroupPaymentCalenderDao.findByMusicGroupRegCalender(studentRegistration.getMusicGroupId());
|
|
|
+ if(musicGroupRegCalender == null){
|
|
|
+ throw new BizException("缴费信息不存在");
|
|
|
+ }
|
|
|
+ registerPayDto.setBatchNo(musicGroupRegCalender.getBatchNo());
|
|
|
+ MusicGroup musicGroup = musicGroupDao.get(studentRegistration.getMusicGroupId());
|
|
|
+ if(musicGroup == null){
|
|
|
+ throw new BizException("查询乐团信息失败");
|
|
|
+ }
|
|
|
+
|
|
|
+ Long calenderId = musicGroupRegCalender.getId();
|
|
|
+ Integer userId = studentRegistration.getUserId();
|
|
|
+
|
|
|
+ //获取缴费项目金额
|
|
|
+ MusicGroupApplyGoodsDto goodsDto = getCalenderTotalAmount(registerPayDto,musicGroupRegCalender);
|
|
|
+
|
|
|
studentRegistration.setMusicGroupPaymentCalenderId(musicGroupRegCalender.getId());
|
|
|
studentRegistration.setOrganId(musicGroup.getOrganId());
|
|
|
-
|
|
|
studentRegistration.setPayingStatus(1);
|
|
|
|
|
|
Date date = new Date();
|
|
|
|
|
|
- CloudTeacherOrder cloudTeacherOrder = null;
|
|
|
- //云教练/云教练+
|
|
|
- if (registerPayDto.getBuyCloudTeacher() || registerPayDto.getBuyCloudTeacherPlus()) {
|
|
|
- BigDecimal cloudTeacherPrice = BigDecimal.ZERO;
|
|
|
- if (musicGroupRegCalender.getMemberRankSettingId() != null) {
|
|
|
- cloudTeacherPrice = musicGroupRegCalender.getMemberPaymentAmount();
|
|
|
- } else {
|
|
|
- if (musicGroup.getCloudTeacherType() != null) {
|
|
|
- OrganizationCloudTeacherFee cloudTeacher = organizationCloudTeacherFeeDao.getByOrganId(studentRegistration.getOrganId());
|
|
|
- cloudTeacherPrice = musicGroup.getCloudTeacherType() == 0 ? cloudTeacher.getPrice() : cloudTeacher.getPlusPrice();
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- orderAmount = orderAmount.add(cloudTeacherPrice);
|
|
|
- studentRegistration.setHasCloudTeacher(0);
|
|
|
-
|
|
|
-
|
|
|
- //创建订单
|
|
|
- cloudTeacherOrder = new CloudTeacherOrder();
|
|
|
-
|
|
|
- cloudTeacherOrder.setType(PeriodEnum.MONTH);//月
|
|
|
- cloudTeacherOrder.setTime(musicGroupRegCalender.getMemberValidDate() == null ? 6 : musicGroupRegCalender.getMemberValidDate());
|
|
|
-
|
|
|
- cloudTeacherOrder.setOrganId(musicGroup.getOrganId());
|
|
|
- cloudTeacherOrder.setStudentId(studentRegistration.getUserId());
|
|
|
- cloudTeacherOrder.setLevel(musicGroupRegCalender.getMemberRankSettingId() == null ? 1 : musicGroupRegCalender.getMemberRankSettingId());
|
|
|
- cloudTeacherOrder.setAmount(cloudTeacherPrice);
|
|
|
- cloudTeacherOrder.setStatus(0);
|
|
|
- cloudTeacherOrder.setMusicGroupId(musicGroup.getId());
|
|
|
- }
|
|
|
String orderNo = idGeneratorService.generatorId("payment") + "";
|
|
|
|
|
|
String channelType = "";
|
|
|
- StudentPaymentOrder studentPaymentOrder = studentRegistrationService.addOrder(studentRegistration,
|
|
|
- orderAmount,
|
|
|
- orderNo,
|
|
|
- channelType,
|
|
|
- goodsGroups,
|
|
|
- remitFee,
|
|
|
- courseRemitFee,
|
|
|
- newCourses,
|
|
|
- registerPayDto.getBuyMaintenance(),
|
|
|
- registerPayDto.getBuyCloudTeacher(),
|
|
|
- registerPayDto.getBuyCloudTeacherPlus(),registerPayDto.getCouponIdList());
|
|
|
- orderAmount = studentPaymentOrder.getActualAmount();
|
|
|
- if (amount.compareTo(orderAmount) != 0) {
|
|
|
+ //生成订单、
|
|
|
+ StudentPaymentOrder studentPaymentOrder = sysCouponCodeService.use(registerPayDto.getCouponIdList(),goodsDto.getOrderAmount(),true);
|
|
|
+ studentPaymentOrder.setUserId(studentRegistration.getUserId());
|
|
|
+ studentPaymentOrder.setGroupType(GroupType.MUSIC);
|
|
|
+ studentPaymentOrder.setOrderNo(orderNo);
|
|
|
+ studentPaymentOrder.setType(OrderTypeEnum.APPLY);
|
|
|
+ studentPaymentOrder.setStatus(DealStatusEnum.ING);
|
|
|
+ studentPaymentOrder.setPaymentChannel(channelType);
|
|
|
+ studentPaymentOrder.setMusicGroupId(studentRegistration.getMusicGroupId());
|
|
|
+ studentPaymentOrder.setCalenderId(calenderId);
|
|
|
+ studentPaymentOrderService.insert(studentPaymentOrder);
|
|
|
+ // 订单详情
|
|
|
+ studentPaymentOrder = studentRegistrationService.addOrder(studentRegistration,studentPaymentOrder,goodsDto,registerPayDto);
|
|
|
+ BigDecimal actualAmount = studentPaymentOrder.getActualAmount();
|
|
|
+
|
|
|
+ BigDecimal amount = registerPayDto.getAmount(); //前端获取的价格
|
|
|
+ if (amount.compareTo(actualAmount) != 0) {
|
|
|
throw new BizException("商品价格不符");
|
|
|
}
|
|
|
if (amount.compareTo(BigDecimal.ZERO) < 0) {
|
|
@@ -820,13 +917,6 @@ public class MusicGroupServiceImpl extends BaseServiceImpl<String, MusicGroup> i
|
|
|
studentPaymentOrder = studentPaymentOrderService.get(studentPaymentOrder.getId());
|
|
|
boolean canPay = studentPaymentOrder.getClassGroupId() != null && studentPaymentOrder.getClassGroupId().equals(206);
|
|
|
|
|
|
- if(cloudTeacherOrder != null){
|
|
|
- cloudTeacherOrder.setOrderId(studentPaymentOrder.getId());
|
|
|
- cloudTeacherOrder.setCreateTime(date);
|
|
|
- cloudTeacherOrder.setUpdateTime(date);
|
|
|
- cloudTeacherOrderService.insert(cloudTeacherOrder);
|
|
|
- }
|
|
|
-
|
|
|
BigDecimal balance = BigDecimal.ZERO;
|
|
|
if (registerPayDto.getUseBalancePayment() && amount.compareTo(BigDecimal.ZERO) > 0) {
|
|
|
SysUserCashAccount userCashAccount = sysUserCashAccountService.getLocked(userId);
|
|
@@ -844,8 +934,8 @@ public class MusicGroupServiceImpl extends BaseServiceImpl<String, MusicGroup> i
|
|
|
}
|
|
|
studentPaymentOrder.setBatchNo(musicGroupRegCalender.getId() + "");
|
|
|
studentPaymentOrder.setPaymentChannel("BALANCE");
|
|
|
- studentPaymentOrder.setRemitFee(remitFee);
|
|
|
- studentPaymentOrder.setCourseRemitFee(courseRemitFee);
|
|
|
+ studentPaymentOrder.setRemitFee(goodsDto.getRemitFee());
|
|
|
+ studentPaymentOrder.setCourseRemitFee(goodsDto.getCourseRemitFee());
|
|
|
studentPaymentOrder.setOrganId(musicGroup.getOrganId());
|
|
|
studentPaymentOrder.setRoutingOrganId(musicGroup.getOrganId());
|
|
|
studentPaymentOrder.setUpdateTime(date);
|
|
@@ -869,12 +959,11 @@ public class MusicGroupServiceImpl extends BaseServiceImpl<String, MusicGroup> i
|
|
|
userPhoneMap.put(endTeacher.getId(), endTeacher.getPhone());
|
|
|
sysMessageService.batchSendMessage(MessageSenderPluginContext.MessageSender.AWSMS, MessageTypeEnum.NO_BUY_CLOUD_TEACHER_MSG,
|
|
|
userPhoneMap, null, 0, null, null, musicGroup.getName(), studentRegistration.getName());
|
|
|
-
|
|
|
if(!canPay){
|
|
|
Map<String, String> notifyMap = new HashMap<>();
|
|
|
notifyMap.put("hasPaidZero", "205");
|
|
|
notifyMap.put("orderNo", studentPaymentOrder.getOrderNo());
|
|
|
- return notifyMap;
|
|
|
+ return BaseController.failed(HttpStatus.RESET_CONTENT, notifyMap, "报名审核中");
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -886,7 +975,7 @@ public class MusicGroupServiceImpl extends BaseServiceImpl<String, MusicGroup> i
|
|
|
notifyMap.put("channelType", channelType);
|
|
|
notifyMap.put("orderNo", "");
|
|
|
studentPaymentOrderService.updateOrder(notifyMap);
|
|
|
- return notifyMap;
|
|
|
+ return BaseController.failed(HttpStatus.CREATED, notifyMap, "恭喜您,报名成功!");
|
|
|
}
|
|
|
|
|
|
String orderSubject = "乐团报名";
|
|
@@ -913,16 +1002,10 @@ public class MusicGroupServiceImpl extends BaseServiceImpl<String, MusicGroup> i
|
|
|
studentPaymentOrder.setPaymentChannel((String) payMap.get("type"));
|
|
|
studentPaymentOrder.setUpdateTime(date);
|
|
|
studentPaymentOrderService.update(studentPaymentOrder);
|
|
|
- return payMap;
|
|
|
+ return BaseController.succeed(payMap);
|
|
|
}
|
|
|
|
|
|
- private BigDecimal getCalenderAmount(Long calenderId,Function<Long,BigDecimal> func){
|
|
|
- return func.apply(calenderId);
|
|
|
- }
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
- @Override
|
|
|
+ /*@Override
|
|
|
@Transactional(rollbackFor = Exception.class)
|
|
|
public Map rePay(RegisterPayDto registerPayDto) throws Exception {
|
|
|
StudentRegistration studentRegistration = studentRegistrationService.get(registerPayDto.getRegisterId().longValue());
|
|
@@ -950,9 +1033,9 @@ public class MusicGroupServiceImpl extends BaseServiceImpl<String, MusicGroup> i
|
|
|
if(payStatus != PayStatus.FAILED){
|
|
|
if(payStatus == PayStatus.SUCCESSED){
|
|
|
throw new BizException("订单已支付成功,请勿重复支付");
|
|
|
- }/*else if(payStatus == PayStatus.PAYING){
|
|
|
+ }*//*else if(payStatus == PayStatus.PAYING){
|
|
|
throw new BizException("订单还在交易中,请稍后重试");
|
|
|
- }*/
|
|
|
+ }*//*
|
|
|
}
|
|
|
|
|
|
MusicGroupPaymentCalender musicGroupRegCalender = musicGroupPaymentCalenderDao.findByMusicGroupRegCalender(studentRegistration.getMusicGroupId());
|
|
@@ -1090,17 +1173,21 @@ public class MusicGroupServiceImpl extends BaseServiceImpl<String, MusicGroup> i
|
|
|
String orderNo = idGeneratorService.generatorId("payment") + "";
|
|
|
|
|
|
String channelType = "";
|
|
|
- StudentPaymentOrder studentPaymentOrder = studentRegistrationService.addOrder(studentRegistration,
|
|
|
- orderAmount,
|
|
|
- orderNo,
|
|
|
- channelType,
|
|
|
- goodsGroups,
|
|
|
- remitFee,
|
|
|
+ StudentPaymentOrder studentPaymentOrder = sysCouponCodeService.use(registerPayDto.getCouponIdList(),amount,true);
|
|
|
+ studentPaymentOrder.setUserId(studentRegistration.getUserId());
|
|
|
+ studentPaymentOrder.setGroupType(GroupType.MUSIC);
|
|
|
+ studentPaymentOrder.setOrderNo(orderNo);
|
|
|
+ studentPaymentOrder.setType(OrderTypeEnum.APPLY);
|
|
|
+ studentPaymentOrder.setStatus(DealStatusEnum.ING);
|
|
|
+ studentPaymentOrder.setPaymentChannel(channelType);
|
|
|
+ studentPaymentOrder.setMusicGroupId(studentRegistration.getMusicGroupId());
|
|
|
+ studentPaymentOrder.setCalenderId(musicGroupRegCalender.getId());
|
|
|
+ studentPaymentOrderService.insert(studentPaymentOrder);
|
|
|
+ //生成订单详情
|
|
|
+ studentPaymentOrder = studentRegistrationService.addOrder(studentRegistration,studentPaymentOrder,goodsGroups,remitFee,
|
|
|
courseRemitFee,
|
|
|
newCourses,
|
|
|
- registerPayDto.getBuyMaintenance(),
|
|
|
- registerPayDto.getBuyCloudTeacher(),
|
|
|
- registerPayDto.getBuyCloudTeacherPlus(),registerPayDto.getCouponIdList());
|
|
|
+ registerPayDto);
|
|
|
studentPaymentOrder = studentPaymentOrderService.get(studentPaymentOrder.getId());
|
|
|
orderAmount = studentPaymentOrder.getActualAmount();
|
|
|
if (amount.compareTo(orderAmount) != 0) {
|
|
@@ -1203,7 +1290,7 @@ public class MusicGroupServiceImpl extends BaseServiceImpl<String, MusicGroup> i
|
|
|
studentPaymentOrder.setUpdateTime(date);
|
|
|
studentPaymentOrderService.update(studentPaymentOrder);
|
|
|
return payMap;
|
|
|
- }
|
|
|
+ }*/
|
|
|
|
|
|
@Override
|
|
|
@Transactional(rollbackFor = Exception.class)
|
|
@@ -2967,161 +3054,7 @@ public class MusicGroupServiceImpl extends BaseServiceImpl<String, MusicGroup> i
|
|
|
|
|
|
@Override
|
|
|
@Transactional(propagation = Propagation.REQUIRED, rollbackFor = Exception.class)
|
|
|
- public Map renew(RenewParamDto renewParamDto) throws Exception {
|
|
|
- Long calenderId = renewParamDto.getCalenderId();
|
|
|
- Integer userId = renewParamDto.getUserId();
|
|
|
- MusicGroupPaymentCalender calender = musicGroupPaymentCalenderDao.get(calenderId);
|
|
|
- if (calender == null) {
|
|
|
- throw new BizException("缴费项目不存在");
|
|
|
- }
|
|
|
- StudentRegistration studentRegistration = studentRegistrationService.queryByUserIdAndMusicGroupId(userId, calender.getMusicGroupId());
|
|
|
- if (studentRegistration == null) {
|
|
|
- throw new BizException("请走报名缴费流程");
|
|
|
- }
|
|
|
- Integer organId = studentRegistration.getOrganId();
|
|
|
- MusicGroupPaymentCalenderDetail calenderDetail = musicGroupPaymentCalenderDetailDao.findByCalenderIdAndUserId(calenderId, userId);
|
|
|
- //关闭之前的订单
|
|
|
- if (calenderDetail.getPaymentOrderId() != null) {
|
|
|
- StudentPaymentOrder oldStudentPaymentOrder = studentPaymentOrderDao.get(calenderDetail.getPaymentOrderId());
|
|
|
- if (oldStudentPaymentOrder != null && oldStudentPaymentOrder.getStatus() == ING) {
|
|
|
-
|
|
|
- // 查询订单状态
|
|
|
- PayStatus payStatus = studentPaymentOrderService.queryPayStatus(oldStudentPaymentOrder.getPaymentChannel(), oldStudentPaymentOrder.getOrderNo(), oldStudentPaymentOrder.getTransNo());
|
|
|
- if(payStatus != PayStatus.FAILED){
|
|
|
- if(payStatus == PayStatus.SUCCESSED){
|
|
|
- throw new BizException("订单已支付成功,请勿重复支付");
|
|
|
- }/*else if(payStatus == PayStatus.PAYING){
|
|
|
- throw new BizException("订单还在交易中,请稍后重试");
|
|
|
- }*/
|
|
|
- }
|
|
|
- oldStudentPaymentOrder.setStatus(CLOSE);
|
|
|
- studentPaymentOrderService.update(oldStudentPaymentOrder);
|
|
|
- if (oldStudentPaymentOrder.getBalancePaymentAmount() != null && oldStudentPaymentOrder.getBalancePaymentAmount().compareTo(BigDecimal.ZERO) > 0) {
|
|
|
- sysUserCashAccountService.updateBalance(oldStudentPaymentOrder.getUserId(), oldStudentPaymentOrder.getBalancePaymentAmount(), PlatformCashAccountDetailTypeEnum.REFUNDS, "关闭订单");
|
|
|
- }
|
|
|
- sysCouponCodeService.quit(oldStudentPaymentOrder.getCouponCodeId());
|
|
|
- }
|
|
|
- }
|
|
|
- String orderNo = idGeneratorService.generatorId("payment") + "";
|
|
|
-
|
|
|
- BigDecimal amount = calenderDetail.getExpectAmount().add(calenderDetail.getExpectMemberAmount());
|
|
|
-
|
|
|
- Date date = new Date();
|
|
|
- //使用优惠券
|
|
|
- StudentPaymentOrder studentPaymentOrder = sysCouponCodeService.use(renewParamDto.getCouponIdList(),amount,true);
|
|
|
- amount = studentPaymentOrder.getActualAmount();
|
|
|
- studentPaymentOrder.setGroupType(GroupType.MUSIC);
|
|
|
- studentPaymentOrder.setUserId(userId);
|
|
|
- studentPaymentOrder.setOrderNo(orderNo);
|
|
|
-
|
|
|
- if (calender.getPaymentType() == PaymentType.ADD_STUDENT) {
|
|
|
- studentPaymentOrder.setType(OrderTypeEnum.ADD_STUDENT);
|
|
|
- } else {
|
|
|
- studentPaymentOrder.setType(OrderTypeEnum.RENEW);
|
|
|
- }
|
|
|
- studentPaymentOrder.setStatus(DealStatusEnum.ING);
|
|
|
- studentPaymentOrder.setMusicGroupId(calender.getMusicGroupId());
|
|
|
- studentPaymentOrder.setBatchNo(calender.getId() + "");
|
|
|
- studentPaymentOrder.setCreateTime(date);
|
|
|
- studentPaymentOrder.setUpdateTime(date);
|
|
|
- studentPaymentOrder.setVersion(0);
|
|
|
- studentPaymentOrderService.insert(studentPaymentOrder);
|
|
|
- calenderDetail.setPaymentStatus(PaymentStatus.PROCESSING);
|
|
|
- calenderDetail.setPaymentOrderId(studentPaymentOrder.getId());
|
|
|
- musicGroupPaymentCalenderDetailDao.update(calenderDetail);
|
|
|
-
|
|
|
-
|
|
|
- CloudTeacherOrder cloudTeacherOrder = null;
|
|
|
-
|
|
|
- //云教练/云教练+
|
|
|
- if (calender.getMemberRankSettingId() != null) {
|
|
|
-
|
|
|
- //创建订单
|
|
|
- cloudTeacherOrder = new CloudTeacherOrder();
|
|
|
-
|
|
|
- cloudTeacherOrder.setType(PeriodEnum.MONTH);//月
|
|
|
- cloudTeacherOrder.setTime(calender.getMemberValidDate());
|
|
|
- cloudTeacherOrder.setOrganId(organId);
|
|
|
- cloudTeacherOrder.setStudentId(studentRegistration.getUserId());
|
|
|
- cloudTeacherOrder.setLevel(calender.getMemberRankSettingId());
|
|
|
- cloudTeacherOrder.setAmount(calender.getMemberPaymentAmount());
|
|
|
- cloudTeacherOrder.setStatus(0);
|
|
|
- cloudTeacherOrder.setOrderId(studentPaymentOrder.getId());
|
|
|
- cloudTeacherOrder.setCreateTime(date);
|
|
|
- cloudTeacherOrder.setUpdateTime(date);
|
|
|
- cloudTeacherOrder.setMusicGroupId(calender.getMusicGroupId());
|
|
|
- cloudTeacherOrderService.insert(cloudTeacherOrder);
|
|
|
- }
|
|
|
-
|
|
|
- BigDecimal balance = BigDecimal.ZERO;
|
|
|
- if (renewParamDto.getUseBalancePayment() || amount.doubleValue() == 0) {
|
|
|
- SysUserCashAccount userCashAccount = sysUserCashAccountService.getLocked(userId);
|
|
|
- if (userCashAccount == null) {
|
|
|
- throw new BizException("用户账户找不到");
|
|
|
- }
|
|
|
- studentPaymentOrder.setPaymentChannel("BALANCE");
|
|
|
- if (userCashAccount.getBalance().subtract(amount).doubleValue() >= 0) {
|
|
|
- // 更新订单信息
|
|
|
- balance = amount;
|
|
|
- studentPaymentOrder.setActualAmount(BigDecimal.ZERO);
|
|
|
- studentPaymentOrder.setBalancePaymentAmount(amount);
|
|
|
- studentPaymentOrder.setActualAmount(new BigDecimal(0));
|
|
|
- studentPaymentOrder.setUpdateTime(date);
|
|
|
- studentPaymentOrder.setOrganId(organId);
|
|
|
- studentPaymentOrder.setRoutingOrganId(organId);
|
|
|
- studentPaymentOrderService.update(studentPaymentOrder);
|
|
|
- sysUserCashAccountService.updateBalance(userId, amount.negate(), PlatformCashAccountDetailTypeEnum.PAY_FEE, "乐团续费");
|
|
|
- amount = BigDecimal.ZERO;
|
|
|
- } else {
|
|
|
- if (userCashAccount.getBalance().doubleValue() > 0) {
|
|
|
- balance = userCashAccount.getBalance();
|
|
|
- sysUserCashAccountService.updateBalance(userId, balance.negate(), PlatformCashAccountDetailTypeEnum.PAY_FEE, "乐团续费");
|
|
|
- amount = amount.subtract(userCashAccount.getBalance());
|
|
|
- studentPaymentOrder.setBalancePaymentAmount(userCashAccount.getBalance());
|
|
|
- studentPaymentOrder.setActualAmount(studentPaymentOrder.getActualAmount().subtract(userCashAccount.getBalance()));
|
|
|
- } else {
|
|
|
- studentPaymentOrder.setBalancePaymentAmount(new BigDecimal(0));
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- String baseApiUrl = sysConfigDao.findConfigValue("base_api_url");
|
|
|
-
|
|
|
- if (amount.compareTo(BigDecimal.ZERO) == 0) {
|
|
|
- studentPaymentRouteOrderService.addRouteOrder(orderNo, organId, balance);
|
|
|
- Map<String, String> notifyMap = new HashMap<>(4);
|
|
|
- notifyMap.put("tradeState", "1");
|
|
|
- notifyMap.put("merOrderNo", studentPaymentOrder.getOrderNo());
|
|
|
- notifyMap.put("channelType", "");
|
|
|
- notifyMap.put("orderNo", "");
|
|
|
- studentPaymentOrderService.updateOrder(notifyMap);
|
|
|
- return notifyMap;
|
|
|
- }
|
|
|
-
|
|
|
- Map<String, Object> payMap = payService.getPayMap(
|
|
|
- amount,
|
|
|
- balance,
|
|
|
- orderNo,
|
|
|
- baseApiUrl + "/api-student/studentOrder/notify",
|
|
|
- baseApiUrl + "/api-student/studentOrder/paymentResult?orderNo=" + studentPaymentOrder.getOrderNo(),
|
|
|
- "续费",
|
|
|
- "乐团续费",
|
|
|
- organId,
|
|
|
- "renew"
|
|
|
- );
|
|
|
-
|
|
|
- studentPaymentOrder.setActualAmount(amount);
|
|
|
- studentPaymentOrder.setOrganId(organId);
|
|
|
- studentPaymentOrder.setMerNos((String) payMap.get("routingMerNos"));
|
|
|
- studentPaymentOrder.setPaymentChannel((String) payMap.get("type"));
|
|
|
- studentPaymentOrder.setUpdateTime(date);
|
|
|
- studentPaymentOrderService.update(studentPaymentOrder);
|
|
|
- return payMap;
|
|
|
- }
|
|
|
-
|
|
|
- @Override
|
|
|
- @Transactional(propagation = Propagation.REQUIRED, rollbackFor = Exception.class)
|
|
|
public boolean renewForCallback(StudentPaymentOrder studentPaymentOrder) throws IOException {
|
|
|
-
|
|
|
int updateNum = studentPaymentOrderService.update(studentPaymentOrder);
|
|
|
if (updateNum <= 0) {
|
|
|
throw new BizException("订单更新失败");
|
|
@@ -3131,14 +3064,10 @@ public class MusicGroupServiceImpl extends BaseServiceImpl<String, MusicGroup> i
|
|
|
|
|
|
Date date = new Date();
|
|
|
StudentRegistration studentRegistration = studentRegistrationDao.queryByUserIdAndMusicGroupId(userId, musicGroupId);
|
|
|
- Map<Integer, String> yimei = new HashMap<>(1);
|
|
|
- Map<Integer, String> push = new HashMap<>(1);
|
|
|
- push.put(userId, userId.toString());
|
|
|
- yimei.put(userId, studentRegistration.getParentsPhone());
|
|
|
-
|
|
|
MusicGroupPaymentCalenderDetail calenderDetail = musicGroupPaymentCalenderDetailDao.findByOrderId(studentPaymentOrder.getId());
|
|
|
|
|
|
if (studentPaymentOrder.getStatus() == SUCCESS) {
|
|
|
+ MusicGroup musicGroup = musicGroupDao.get(musicGroupId);
|
|
|
//当前乐团报名是否赠送乐团网管课
|
|
|
MusicGroupStudentFee musicGroupStudentFee = musicGroupPaymentCalenderService.updateCalender(calenderDetail.getId(), studentRegistration.getUserId());
|
|
|
if (musicGroupStudentFee != null) {
|
|
@@ -3155,45 +3084,66 @@ public class MusicGroupServiceImpl extends BaseServiceImpl<String, MusicGroup> i
|
|
|
studentRegistration.setMusicGroupStatus(StudentMusicGroupStatusEnum.NORMAL);
|
|
|
studentRegistration.setMusicGroupPaymentCalenderId(paymentCalender.getId());
|
|
|
studentRegistrationDao.update(studentRegistration);
|
|
|
-
|
|
|
//统计变更学员数
|
|
|
groupEventSource.musicGroupStudentChangeEvent(studentRegistration.getMusicGroupId(), StudentMusicGroupStatusEnum.NORMAL, new ArrayList<>(Arrays.asList(userId)));
|
|
|
}
|
|
|
|
|
|
- List<StudentPaymentOrderDetail> paymentOrderDetails = new ArrayList<>();
|
|
|
+ //缴费项目详情
|
|
|
+ musicGroupPaymentCalenderDetailService.addCalenderDetail(studentPaymentOrder, studentRegistration);
|
|
|
+
|
|
|
+ List<StudentPaymentOrderDetail> allDetails = studentPaymentOrderDetailService.getOrderGoodsDetail(studentPaymentOrder.getId());
|
|
|
+ BigDecimal courseFee = allDetails.stream().filter(o -> !(o.getType() == MUSICAL)
|
|
|
+ && !(o.getType() == VIP)
|
|
|
+ && !(o.getType() == PRACTICE)
|
|
|
+ && !(o.getType() == MAINTENANCE)
|
|
|
+ && !(o.getType() == CLOUD_TEACHER)
|
|
|
+ && !(o.getType() == CLOUD_TEACHER)
|
|
|
+ && !(o.getType() == ACCESSORIES))
|
|
|
+ .map(o -> o.getPrice().subtract(o.getRemitFee() == null ? BigDecimal.ZERO : o.getRemitFee()))
|
|
|
+ .reduce(BigDecimal.ZERO, BigDecimal::add);
|
|
|
+
|
|
|
+ //销售订单详情
|
|
|
+ if (allDetails.size() > 0) {
|
|
|
+ BigDecimal couponRemitFee = studentPaymentOrder.getCouponRemitFee();
|
|
|
+ if(couponRemitFee.compareTo(BigDecimal.ZERO) > 0){
|
|
|
+ BigDecimal musicFee = allDetails.stream().filter(o -> o.getType()==MUSICAL
|
|
|
+ || o.getType()==ACCESSORIES || o.getType()==TEACHING)
|
|
|
+ .map(o -> o.getPrice()).reduce(BigDecimal.ZERO, BigDecimal::add);
|
|
|
+ BigDecimal expectAmount = studentPaymentOrder.getExpectAmount();
|
|
|
+ //获取比例
|
|
|
+ BigDecimal ratioAmount = musicFee.divide(expectAmount, 6, BigDecimal.ROUND_HALF_UP);
|
|
|
+ //获取分配的减免金额
|
|
|
+ couponRemitFee = couponRemitFee.multiply(ratioAmount).setScale(2, BigDecimal.ROUND_HALF_UP);
|
|
|
+ }
|
|
|
+ sellOrderService.addOrderDetail2SellOrder(allDetails, studentPaymentOrder, musicGroup,couponRemitFee);
|
|
|
+ }
|
|
|
|
|
|
- // 查询会员订单信息
|
|
|
- CloudTeacherOrder cloudTeacherOrder = cloudTeacherOrderService.queryByOrderId(studentPaymentOrder.getId());
|
|
|
- if (cloudTeacherOrder != null) {
|
|
|
- Student student = studentService.getLocked(userId);
|
|
|
- if (student == null) {
|
|
|
- throw new BizException("学员信息不存在");
|
|
|
- }
|
|
|
- cloudTeacherOrder.setStatus(1);
|
|
|
- cloudTeacherOrder.setUpdateTime(date);
|
|
|
-// if (student.getMemberRankSettingId() == null || date.after(student.getMembershipEndTime())) {
|
|
|
-// cloudTeacherOrder.setStartTime(date);
|
|
|
-// cloudTeacherOrder.setEndTime(studentService.getMembershipEndTime(cloudTeacherOrder.getType(),date, cloudTeacherOrder.getTime()));
|
|
|
-// } else {
|
|
|
-// cloudTeacherOrder.setStartTime(DateUtil.addDays(student.getMembershipEndTime(), 1));
|
|
|
-// cloudTeacherOrder.setEndTime(studentService.getMembershipEndTime(cloudTeacherOrder.getType(),student.getMembershipEndTime(), cloudTeacherOrder.getTime()));
|
|
|
-// }
|
|
|
-
|
|
|
- cloudTeacherOrder.setAmount(calenderDetail.getExpectMemberAmount());
|
|
|
- cloudTeacherOrderService.update(cloudTeacherOrder);
|
|
|
- // 添加会员有效时长
|
|
|
-// studentService.updateMemberRank(cloudTeacherOrder);
|
|
|
-
|
|
|
- //添加订单明细
|
|
|
- StudentPaymentOrderDetail studentPaymentOrderDetail = new StudentPaymentOrderDetail();
|
|
|
- studentPaymentOrderDetail.setType(OrderDetailTypeEnum.CLOUD_TEACHER);
|
|
|
- studentPaymentOrderDetail.setPrice(cloudTeacherOrder.getAmount());
|
|
|
- studentPaymentOrderDetail.setCreateTime(date);
|
|
|
- studentPaymentOrderDetail.setUpdateTime(date);
|
|
|
- studentPaymentOrderDetail.setPaymentOrderId(studentPaymentOrder.getId());
|
|
|
-
|
|
|
- paymentOrderDetails.add(studentPaymentOrderDetail);
|
|
|
- }
|
|
|
+ //活动小课包处理
|
|
|
+ List<StudentPaymentOrderDetail> activity = allDetails.stream().filter(o -> o.getType()==PRACTICE || o.getType() == VIP).collect(Collectors.toList());
|
|
|
+ if(activity != null && activity.size() > 0){
|
|
|
+ activityUserMapperService.addOrderDetail2Activity(studentPaymentOrder,activity);
|
|
|
+ }
|
|
|
+
|
|
|
+ //学生乐器与月保处理
|
|
|
+ StudentPaymentOrderDetail repair = allDetails.stream().filter(o -> o.getType()==MAINTENANCE).findFirst().get();
|
|
|
+ if(repair != null){
|
|
|
+ BigDecimal repairFee = allDetails.stream() .filter(o -> o.getType()==MAINTENANCE)
|
|
|
+ .map(o -> o.getPrice().subtract(o.getRemitFee() == null ? BigDecimal.ZERO : o.getRemitFee()))
|
|
|
+ .reduce(BigDecimal.ZERO, BigDecimal::add);
|
|
|
+ StudentPaymentOrderDetail musical = allDetails.stream().filter(o -> o.getType()==MUSICAL).findFirst().get();
|
|
|
+ Long studentInstrumentId = studentInstrumentService.addOrderDetail2Instrument(studentPaymentOrder, repairFee, Integer.valueOf(musical.getGoodsIdList()));
|
|
|
+ repair.setStudentInstrumentId(studentInstrumentId);
|
|
|
+ studentPaymentOrderDetailDao.update(repair);
|
|
|
+ }
|
|
|
+
|
|
|
+ //学生云教练处理
|
|
|
+ StudentPaymentOrderDetail cloudTeacher = allDetails.stream().filter(o -> o.getType()==CLOUD_TEACHER).findFirst().get();
|
|
|
+ if(cloudTeacher != null){
|
|
|
+ BigDecimal cloudTeacherFee = allDetails.stream() .filter(o -> o.getType()==CLOUD_TEACHER)
|
|
|
+ .map(o -> o.getPrice().subtract(o.getRemitFee() == null ? BigDecimal.ZERO : o.getRemitFee()))
|
|
|
+ .reduce(BigDecimal.ZERO, BigDecimal::add);
|
|
|
+ cloudTeacherOrderService.addOrderDetail2CloudTeacher(studentPaymentOrder,cloudTeacherFee);
|
|
|
+ }
|
|
|
|
|
|
//插入交易明细
|
|
|
SysUserCashAccount cashAccount = sysUserCashAccountService.get(userId);
|
|
@@ -3213,50 +3163,6 @@ public class MusicGroupServiceImpl extends BaseServiceImpl<String, MusicGroup> i
|
|
|
rechargeDetail.setComAmount(studentPaymentOrder.getComAmount());
|
|
|
rechargeDetail.setPerAmount(studentPaymentOrder.getPerAmount());
|
|
|
sysUserCashAccountDetailService.insert(rechargeDetail);
|
|
|
-
|
|
|
- //不包含云教练费用
|
|
|
- BigDecimal courseFee = BigDecimal.ZERO;
|
|
|
- //跨团合班没有settings
|
|
|
- if(paymentCalender.getPaymentType() == PaymentType.SPAN_GROUP_CLASS_ADJUST){
|
|
|
- List<MusicGroupPaymentCalenderStudentDetail> studentDetails = musicGroupPaymentCalenderStudentDetailDao.findByBatchNoAndUserId(paymentCalender.getBatchNo(), userId);
|
|
|
- for (MusicGroupPaymentCalenderStudentDetail studentDetail : studentDetails) {
|
|
|
- StudentPaymentOrderDetail studentPaymentOrderDetail = new StudentPaymentOrderDetail();
|
|
|
- studentPaymentOrderDetail.setType(OrderDetailTypeEnum.valueOf(studentDetail.getCourseType()));
|
|
|
- studentPaymentOrderDetail.setPrice(studentDetail.getCourseCurrentPrice());
|
|
|
- studentPaymentOrderDetail.setCreateTime(date);
|
|
|
- studentPaymentOrderDetail.setUpdateTime(date);
|
|
|
- studentPaymentOrderDetail.setPaymentOrderId(studentPaymentOrder.getId());
|
|
|
- paymentOrderDetails.add(studentPaymentOrderDetail);
|
|
|
- courseFee = courseFee.add(studentDetail.getCourseCurrentPrice());
|
|
|
- }
|
|
|
- } else {
|
|
|
- List<MusicGroupPaymentStudentCourseDetail> studentCourseDetails = musicGroupPaymentStudentCourseDetailDao.findByCalenderAndUserId(calenderDetail.getMusicGroupPaymentCalenderId(), userId);
|
|
|
- for (MusicGroupPaymentStudentCourseDetail e : studentCourseDetails) {
|
|
|
- StudentPaymentOrderDetail studentPaymentOrderDetail = new StudentPaymentOrderDetail();
|
|
|
- studentPaymentOrderDetail.setType(OrderDetailTypeEnum.valueOf(e.getCourseType().getCode()));
|
|
|
- studentPaymentOrderDetail.setPrice(e.getCourseCurrentPrice());
|
|
|
- studentPaymentOrderDetail.setCreateTime(date);
|
|
|
- studentPaymentOrderDetail.setUpdateTime(date);
|
|
|
- studentPaymentOrderDetail.setPaymentOrderId(studentPaymentOrder.getId());
|
|
|
- paymentOrderDetails.add(studentPaymentOrderDetail);
|
|
|
- courseFee = courseFee.add(e.getCourseCurrentPrice());
|
|
|
- }
|
|
|
- }
|
|
|
- if (paymentOrderDetails.size() > 0) {
|
|
|
- studentPaymentOrderDetailService.batchAdd(paymentOrderDetails,studentPaymentOrder.getCouponRemitFee());
|
|
|
- //获取实际支付课程费用
|
|
|
- courseFee = paymentOrderDetails.stream().filter(e->e.getType() != MUSICAL && e.getType() != ACCESSORIES
|
|
|
- && e.getType() != TEACHING && e.getType() != OTHER && e.getType() != DEGREE_REGISTRATION
|
|
|
- && e.getType() != MAINTENANCE && e.getType() != CLOUD_TEACHER && e.getType() != CLOUD_TEACHER_PLUS).map(t -> t.getPrice()).reduce(BigDecimal.ZERO, BigDecimal::add);
|
|
|
- //获取云教练订单费用
|
|
|
- if(cloudTeacherOrder != null){
|
|
|
- CloudTeacherOrder teacherOrder = cloudTeacherOrderService.get(cloudTeacherOrder.getId());
|
|
|
- BigDecimal cloudTeacherFee = paymentOrderDetails.stream().filter(e->e.getType() == CLOUD_TEACHER).map(t -> t.getPrice()).reduce(BigDecimal.ZERO, BigDecimal::add);
|
|
|
- teacherOrder.setAmount(cloudTeacherFee);
|
|
|
- cloudTeacherOrderService.update(teacherOrder);
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
//缴费
|
|
|
SysUserCashAccountDetail paymentDetail = new SysUserCashAccountDetail();
|
|
|
paymentDetail.setAmount(amount.negate());
|
|
@@ -3270,7 +3176,6 @@ public class MusicGroupServiceImpl extends BaseServiceImpl<String, MusicGroup> i
|
|
|
paymentDetail.setUserId(userId);
|
|
|
paymentDetail.setChannel(studentPaymentOrder.getPaymentChannel());
|
|
|
sysUserCashAccountDetailService.insert(paymentDetail);
|
|
|
- MusicGroup musicGroup = musicGroupDao.get(musicGroupId);
|
|
|
|
|
|
studentRegistrationService.updateUserSurplusCourseFee(userId, musicGroupId, courseFee, "乐团续费", userId);
|
|
|
|
|
@@ -3280,6 +3185,10 @@ public class MusicGroupServiceImpl extends BaseServiceImpl<String, MusicGroup> i
|
|
|
logger.error("产品协议生成失败", e);
|
|
|
}
|
|
|
if (musicGroup.getOwnershipType() != null && musicGroup.getOwnershipType() == CooperationOrgan.OwnershipType.OWN) {
|
|
|
+ Map<Integer, String> yimei = new HashMap<>(1);
|
|
|
+ Map<Integer, String> push = new HashMap<>(1);
|
|
|
+ push.put(userId, userId.toString());
|
|
|
+ yimei.put(userId, studentRegistration.getParentsPhone());
|
|
|
// 发送续费结果通知
|
|
|
sysMessageService.batchSendMessage(MessageSender.JIGUANG, MessageTypeEnum.STUDENT_SMS_PUSH_MUSIC_GROUP_RENEW_SUCCESS, push, null, 0, "1", "STUDENT",
|
|
|
studentRegistration.getName(), studentPaymentOrder.getActualAmount());
|
|
@@ -3288,7 +3197,6 @@ public class MusicGroupServiceImpl extends BaseServiceImpl<String, MusicGroup> i
|
|
|
}
|
|
|
return true;
|
|
|
} else {
|
|
|
-
|
|
|
//更新学生的缴费记录状态
|
|
|
calenderDetail.setPaymentStatus(MusicGroupStudentFee.PaymentStatus.NON_PAYMENT);
|
|
|
calenderDetail.setUpdateTime(date);
|
|
@@ -3299,17 +3207,6 @@ public class MusicGroupServiceImpl extends BaseServiceImpl<String, MusicGroup> i
|
|
|
"乐团续费失败");
|
|
|
}
|
|
|
}
|
|
|
- /*MusicGroup musicGroup = musicGroupDao.get(musicGroupId);
|
|
|
- if (musicGroup.getOwnershipType() != null && musicGroup.getOwnershipType() == CooperationOrgan.OwnershipType.OWN) {
|
|
|
- if (studentPaymentOrder.getStatus() == CLOSE || studentPaymentOrder.getStatus() == DealStatusEnum.FAILED) {
|
|
|
- String baseUrl = sysConfigDao.findConfigValue(SysConfigService.BASE_API_URL);
|
|
|
- String memo = baseUrl + "/#/renew?musicGroupId=" + musicGroupId;
|
|
|
- //4?http://mstudev.dayaedu.com/#/renew?musicGroupId=" +musicGroupId
|
|
|
- sysMessageService.batchSendMessage(MessageSender.JIGUANG, MessageTypeEnum.STUDENT_PUSH_MUSIC_GROUP_RENEW_FAILED, push, null, 0, "4?" + memo, "STUDENT",
|
|
|
- HttpUtil.getSortUrl(memo));
|
|
|
- return false;
|
|
|
- }
|
|
|
- }*/
|
|
|
return false;
|
|
|
}
|
|
|
|
|
@@ -3897,7 +3794,7 @@ public class MusicGroupServiceImpl extends BaseServiceImpl<String, MusicGroup> i
|
|
|
|
|
|
@Override
|
|
|
@Transactional(rollbackFor = Exception.class)
|
|
|
- public List<StudentRegistration> addMusicGroupRegs(String musicGroupId, List<Long> registerIds) throws Exception {
|
|
|
+ public HttpResponseResult addMusicGroupRegs(String musicGroupId, List<Long> registerIds) throws Exception {
|
|
|
SysUser sysUser = sysUserFeignService.queryUserInfo();
|
|
|
if (sysUser == null || sysUser.getId() == null) {
|
|
|
throw new BizException("获取用户信息失败");
|
|
@@ -3976,7 +3873,10 @@ public class MusicGroupServiceImpl extends BaseServiceImpl<String, MusicGroup> i
|
|
|
registerPayDto.setNewCourse(courseSettings);
|
|
|
for (StudentRegistration studentRegistration : studentRegistrationList) {
|
|
|
registerPayDto.setRegisterId(studentRegistration.getId().intValue());
|
|
|
- Map payMap = this.pay(registerPayDto);
|
|
|
+ HttpResponseResult result = this.pay(registerPayDto);
|
|
|
+ if(result.getCode() != 200){
|
|
|
+ return result;
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -3984,10 +3884,8 @@ public class MusicGroupServiceImpl extends BaseServiceImpl<String, MusicGroup> i
|
|
|
MusicGroup musicGroup = musicGroupDao.get(musicGroupId);
|
|
|
musicGroup.setIsExtraClass(YesOrNoEnum.YES);
|
|
|
musicGroupDao.update(musicGroup);
|
|
|
-
|
|
|
musicGroupBuildLogDao.insert(new MusicGroupBuildLog(musicGroupId, "添加报名学员", sysUser.getId(), ""));
|
|
|
-
|
|
|
- return studentRegistrationList;
|
|
|
+ return BaseController.succeed(studentRegistrationList);
|
|
|
}
|
|
|
|
|
|
@Override
|