开通aiVip
This commit is contained in:
@@ -78,6 +78,8 @@ public class AliPayServiceImpl implements AliPayService {
|
||||
private CouponHistoryService couponHistoryService;
|
||||
@Autowired
|
||||
private TrainingClassService trainingClassService;
|
||||
@Autowired
|
||||
private AiVipLogService aiVipLogService;
|
||||
|
||||
@Override
|
||||
public String pay(AlipayDTO payDto) {
|
||||
@@ -199,6 +201,17 @@ public class AliPayServiceImpl implements AliPayService {
|
||||
userVipService.openVipForUser(order);
|
||||
}
|
||||
|
||||
if ("vip".equals(subject)) {
|
||||
//更新 订单 记录
|
||||
buyOrderService.updateOrderStatus(Integer.valueOf(customerid),oldPayZfbOrderEntity.getRelevanceoid(),"2");
|
||||
//处理抵扣积分
|
||||
if(order.getJfDeduction().compareTo(BigDecimal.ZERO)>0){
|
||||
userCoinJf(order);
|
||||
}
|
||||
//开通aivip
|
||||
aiVipLogService.openAiVip(order.getAiBuyConfigId());
|
||||
}
|
||||
|
||||
if("point".equals(subject)){
|
||||
// 插入花生币 变动记录
|
||||
BookBuyConfigEntity bookBuyConfigEntity = bookBuyConfigService.getById(Integer.valueOf(body));
|
||||
|
||||
@@ -85,6 +85,8 @@ public class WxpayServiceImpl extends ServiceImpl<PayWechatOrderDao, PayWechatOr
|
||||
private CouponHistoryService couponHistoryService;
|
||||
@Autowired
|
||||
private TrainingClassService trainingClassService;
|
||||
@Autowired
|
||||
private AiVipLogService aiVipLogService;
|
||||
|
||||
@Override
|
||||
public void prepay(WechatPaymentInfo paymentInfo){
|
||||
@@ -186,6 +188,17 @@ public class WxpayServiceImpl extends ServiceImpl<PayWechatOrderDao, PayWechatOr
|
||||
userVipService.openVipForUser(order);
|
||||
}
|
||||
|
||||
if("aiVip".equals(order.getOrderType())){
|
||||
//更新 订单 记录
|
||||
buyOrderService.updateOrderStatus(order.getUserId(),orderNo,"2");
|
||||
//处理抵扣积分
|
||||
if(order.getJfDeduction().compareTo(BigDecimal.ZERO)>0){
|
||||
userCoinJf(order);
|
||||
}
|
||||
//开通aivip
|
||||
aiVipLogService.openAiVip(order.getAiBuyConfigId());
|
||||
}
|
||||
|
||||
// 1.根据订单id获取订单信息
|
||||
if ("order".equals(order.getOrderType())) {
|
||||
if(order.getJfDeduction().compareTo(BigDecimal.ZERO)>0){
|
||||
|
||||
Reference in New Issue
Block a user