处理积分抵扣
This commit is contained in:
@@ -173,6 +173,10 @@ public class AliPayServiceImpl implements AliPayService {
|
||||
couponHistory.setOrderId(order.getOrderId());
|
||||
couponService.useCouponAmount(couponHistory);
|
||||
}
|
||||
//处理抵扣积分
|
||||
if(order.getJfDeduction().compareTo(BigDecimal.ZERO)>0){
|
||||
userCoinJf(order);
|
||||
}
|
||||
|
||||
if("trainingClass".equals(subject)){
|
||||
//更新 订单 记录
|
||||
@@ -182,10 +186,6 @@ public class AliPayServiceImpl implements AliPayService {
|
||||
}
|
||||
|
||||
if("relearn".equals(subject)){
|
||||
//处理抵扣积分
|
||||
if(order.getJfDeduction().compareTo(BigDecimal.ZERO)>0){
|
||||
userCoinJf(order);
|
||||
}
|
||||
//更新 订单 记录
|
||||
buyOrderService.updateOrderStatus(Integer.valueOf(customerid),oldPayZfbOrderEntity.getRelevanceoid(),"2");
|
||||
//插入复读记录
|
||||
@@ -195,10 +195,6 @@ public class AliPayServiceImpl implements AliPayService {
|
||||
if ("vip".equals(subject)) {
|
||||
//更新 订单 记录
|
||||
buyOrderService.updateOrderStatus(Integer.valueOf(customerid),oldPayZfbOrderEntity.getRelevanceoid(),"2");
|
||||
//处理抵扣积分
|
||||
if(order.getJfDeduction().compareTo(BigDecimal.ZERO)>0){
|
||||
userCoinJf(order);
|
||||
}
|
||||
//开通vip
|
||||
userVipService.openVipForUser(order);
|
||||
}
|
||||
@@ -206,10 +202,6 @@ public class AliPayServiceImpl implements AliPayService {
|
||||
if ("aiVip".equals(subject)) {
|
||||
//更新 订单 记录
|
||||
buyOrderService.updateOrderStatus(Integer.valueOf(customerid),oldPayZfbOrderEntity.getRelevanceoid(),"2");
|
||||
//处理抵扣积分
|
||||
if(order.getJfDeduction().compareTo(BigDecimal.ZERO)>0){
|
||||
userCoinJf(order);
|
||||
}
|
||||
//开通aivip
|
||||
aiVipLogService.openAiVip(order);
|
||||
}
|
||||
@@ -248,10 +240,6 @@ public class AliPayServiceImpl implements AliPayService {
|
||||
//更新 订单 记录
|
||||
String ActString = buyOrderService.checkWlOrder(order.getOrderSn())?"0":"2";
|
||||
buyOrderService.updateOrderStatus(Integer.valueOf(customerid),oldPayZfbOrderEntity.getRelevanceoid(),ActString);
|
||||
//处理抵扣积分
|
||||
if(order.getJfDeduction().compareTo(BigDecimal.ZERO)>0){
|
||||
userCoinJf(order);
|
||||
}
|
||||
/* 记录用户购买的书籍 */
|
||||
// 查询订单的所有 book_id
|
||||
List<Integer> orderBookIdList = shopProductBookDao.getOrderBookId(order.getOrderSn());
|
||||
|
||||
@@ -161,7 +161,10 @@ public class WxpayServiceImpl extends ServiceImpl<PayWechatOrderDao, PayWechatOr
|
||||
couponHistory.setOrderId(order.getOrderId());
|
||||
couponService.useCouponAmount(couponHistory);
|
||||
}
|
||||
|
||||
//处理抵扣积分
|
||||
if(order.getJfDeduction().compareTo(BigDecimal.ZERO)>0){
|
||||
userCoinJf(order);
|
||||
}
|
||||
if("trainingClass".equals(order.getOrderType())){
|
||||
//更新 订单 记录
|
||||
buyOrderService.updateOrderStatus(order.getUserId(),orderNo,"2");
|
||||
@@ -169,10 +172,6 @@ public class WxpayServiceImpl extends ServiceImpl<PayWechatOrderDao, PayWechatOr
|
||||
trainingClassService.addTrainingClassForUser(order);
|
||||
}
|
||||
if("relearn".equals(order.getOrderType())){
|
||||
//处理抵扣积分
|
||||
if(order.getJfDeduction().compareTo(BigDecimal.ZERO)>0){
|
||||
userCoinJf(order);
|
||||
}
|
||||
//更新 订单 记录
|
||||
buyOrderService.updateOrderStatus(order.getUserId(),orderNo,"2");
|
||||
//插入复读记录
|
||||
@@ -182,10 +181,6 @@ public class WxpayServiceImpl extends ServiceImpl<PayWechatOrderDao, PayWechatOr
|
||||
if("vip".equals(order.getOrderType())){
|
||||
//更新 订单 记录
|
||||
buyOrderService.updateOrderStatus(order.getUserId(),orderNo,"2");
|
||||
//处理抵扣积分
|
||||
if(order.getJfDeduction().compareTo(BigDecimal.ZERO)>0){
|
||||
userCoinJf(order);
|
||||
}
|
||||
//开通vip
|
||||
userVipService.openVipForUser(order);
|
||||
}
|
||||
@@ -193,20 +188,11 @@ public class WxpayServiceImpl extends ServiceImpl<PayWechatOrderDao, PayWechatOr
|
||||
if("aiVip".equals(order.getOrderType())){
|
||||
//更新 订单 记录
|
||||
buyOrderService.updateOrderStatus(order.getUserId(),orderNo,"2");
|
||||
//处理抵扣积分
|
||||
if(order.getJfDeduction().compareTo(BigDecimal.ZERO)>0){
|
||||
userCoinJf(order);
|
||||
}
|
||||
//开通aivip
|
||||
aiVipLogService.openAiVip(order);
|
||||
}
|
||||
|
||||
// 1.根据订单id获取订单信息
|
||||
if ("order".equals(order.getOrderType())) {
|
||||
if(order.getJfDeduction().compareTo(BigDecimal.ZERO)>0){
|
||||
userCoinJf(order);
|
||||
}
|
||||
|
||||
//开通book,start
|
||||
// 查询订单的所有 book_id
|
||||
List<Integer> orderBookIdList = shopProductBookService.getOrderBookId(order.getOrderSn());
|
||||
|
||||
Reference in New Issue
Block a user