|
@@ -1,6 +1,7 @@
|
|
|
package com.ym.mec.biz.service.impl;
|
|
|
|
|
|
import com.alibaba.fastjson.JSON;
|
|
|
+import com.alibaba.fastjson.JSONArray;
|
|
|
import com.ym.mec.auth.api.entity.SysUser;
|
|
|
import com.ym.mec.biz.dal.dao.*;
|
|
|
import com.ym.mec.biz.dal.dto.*;
|
|
@@ -595,7 +596,20 @@ public class VipGroupActivityServiceImpl extends BaseServiceImpl<Integer, VipGro
|
|
|
}
|
|
|
if (studentPaymentOrder.getStatus() == DealStatusEnum.SUCCESS) {
|
|
|
Student student = studentDao.get(studentPaymentOrder.getUserId());
|
|
|
- //活动赠送
|
|
|
+ String activeConfig = sysConfigDao.findConfigValue("2022_double_eleven_give_config");
|
|
|
+ List<SysConfigJsonDto> cloud2022ActivityDtos = JSONArray.parseArray(activeConfig, SysConfigJsonDto.class);
|
|
|
+ List<SysConfigJsonDto> activityDtos = cloud2022ActivityDtos.stream().
|
|
|
+ filter(e -> Arrays.stream(e.getKey().split(",")).collect(Collectors.toList()).
|
|
|
+ contains(studentPaymentOrder.getActivityId())).collect(Collectors.toList());
|
|
|
+ if(!CollectionUtils.isEmpty(activityDtos)){
|
|
|
+ SysConfigJsonDto jsonDto = activityDtos.get(0);
|
|
|
+ //处理双十一活动特殊处理
|
|
|
+// if(){
|
|
|
+//
|
|
|
+// }
|
|
|
+ //赠送抽奖机会
|
|
|
+ }
|
|
|
+ //处理活动赠送
|
|
|
studentPaymentOrderService.activityGive(Integer.parseInt(studentPaymentOrder.getActivityId()), studentPaymentOrder,
|
|
|
null, null, student.getTeacherId());
|
|
|
//保存账户信息
|
|
@@ -677,7 +691,7 @@ public class VipGroupActivityServiceImpl extends BaseServiceImpl<Integer, VipGro
|
|
|
|
|
|
//计算订单金额
|
|
|
StudentPaymentOrder studentPaymentOrder = sysCouponCodeService.use(payParam.getCouponIdList(), activityFee, true);
|
|
|
- if (studentPaymentOrder.getActualAmount().compareTo(activityFee) != 0) {
|
|
|
+ if (studentPaymentOrder.getActualAmount().compareTo(payParam.getAmount()) != 0) {
|
|
|
throw new BizException("非法请求");
|
|
|
}
|
|
|
activityFee = studentPaymentOrder.getActualAmount();
|
|
@@ -699,7 +713,6 @@ public class VipGroupActivityServiceImpl extends BaseServiceImpl<Integer, VipGro
|
|
|
studentPaymentOrder.setVersion(0);
|
|
|
studentPaymentOrderService.insert(studentPaymentOrder);
|
|
|
|
|
|
-
|
|
|
//消耗余额
|
|
|
Boolean success = sysUserCashAccountService.use(payParam,studentPaymentOrder);
|
|
|
if(success){
|