修改充值时插入充值记录
This commit is contained in:
@@ -19,6 +19,6 @@ public interface PayPaymentOrderService extends IService<PayPaymentOrderEntity>
|
||||
|
||||
PageUtils queryPage(Map<String, Object> params);
|
||||
|
||||
void insertDetail(MyUserEntity user, BookBuyConfigEntity bookBuyConfigEntity, int payXxxOrderId);
|
||||
void insertDetail(MyUserEntity user, BookBuyConfigEntity bookBuyConfigEntity, String payXxxOrderId);
|
||||
}
|
||||
|
||||
|
||||
@@ -37,10 +37,10 @@ public class PayPaymentOrderServiceImpl extends ServiceImpl<PayPaymentOrderDao,
|
||||
}
|
||||
|
||||
@Override
|
||||
public void insertDetail(MyUserEntity user, BookBuyConfigEntity bookBuyConfigEntity,int payXxxOrderId) {
|
||||
public void insertDetail(MyUserEntity user, BookBuyConfigEntity bookBuyConfigEntity,String payXxxOrderId) {
|
||||
PayPaymentOrderEntity payPaymentOrderEntity = new PayPaymentOrderEntity();
|
||||
payPaymentOrderEntity.setUserId(user.getId());
|
||||
payPaymentOrderEntity.setOrderId(payXxxOrderId+"");
|
||||
payPaymentOrderEntity.setOrderId(payXxxOrderId);
|
||||
payPaymentOrderEntity.setRealAmount(new BigDecimal(bookBuyConfigEntity.getRealMoney()));
|
||||
payPaymentOrderEntity.setRechargeAmount(new BigDecimal(bookBuyConfigEntity.getMoney()));
|
||||
payPaymentOrderEntity.setRechargeChannel(bookBuyConfigEntity.getQudao());
|
||||
|
||||
@@ -127,12 +127,11 @@ public class AppController {
|
||||
//插入虚拟币消费记录
|
||||
transactionDetailsService.rechargeRecord(userEntity,realMoney,order.getId(),"苹果",order.getOrderid());
|
||||
//插入花生币充值记录
|
||||
payPaymentOrderService.insertDetail(userEntity,bookBuyConfigEntity,Integer.parseInt(order.getTransactionId()));
|
||||
payPaymentOrderService.insertDetail(userEntity,bookBuyConfigEntity,order.getTransactionId());
|
||||
buyOrderService.updateOrderStatus(Integer.valueOf(customerid), dto.getOrderId(), "2");
|
||||
order.setMoney(Integer.valueOf(bookBuyConfigEntity.getRealMoney()));
|
||||
order.setUsername(userEntity.getName());
|
||||
orderService.saveOrUpdate(order);
|
||||
orderService.update();
|
||||
return Result.ok0();
|
||||
}else {
|
||||
return Result.nook(500,"订单id错误或者商品id");
|
||||
|
||||
@@ -231,7 +231,7 @@ public class AliPayServiceImpl implements AliPayService {
|
||||
//插入虚拟币消费记录
|
||||
transactionDetailsService.rechargeRecord(userEntity,realMoney,oldPayZfbOrderEntity.getId().intValue(),"支付宝",order.getOrderSn());
|
||||
//插入花生币充值记录
|
||||
payPaymentOrderService.insertDetail(userEntity,bookBuyConfigEntity,oldPayZfbOrderEntity.getId().intValue());
|
||||
payPaymentOrderService.insertDetail(userEntity,bookBuyConfigEntity,oldPayZfbOrderEntity.getId().toString());
|
||||
buyOrderService.updateOrderStatus(Integer.valueOf(customerid),oldPayZfbOrderEntity.getRelevanceoid(),"2");
|
||||
}
|
||||
if ("order".equals(subject)) {
|
||||
|
||||
@@ -171,7 +171,7 @@ public class ApplePayServiceImpl implements ApplePayService {
|
||||
//插入虚拟币消费记录
|
||||
transactionDetailsService.rechargeRecord(userEntity,realMoney,wechat.getId().intValue(),"苹果支付",order.getOrderSn());
|
||||
//插入花生币充值记录
|
||||
payPaymentOrderService.insertDetail(userEntity,bookBuyConfigEntity,wechat.getId().intValue());
|
||||
payPaymentOrderService.insertDetail(userEntity,bookBuyConfigEntity,wechat.getId().toString());
|
||||
buyOrderService.updateOrderStatus(Integer.valueOf(order.getUserId()),order.getOrderSn(),"2");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -114,7 +114,7 @@ public class PaypalController {
|
||||
//插入虚拟币消费记录
|
||||
transactionDetailsService.rechargeRecord(userEntity,realMoney,payPaypalOrder.getId(),"PayPal",buyOrder.getOrderSn());
|
||||
//插入花生币充值记录
|
||||
payPaymentOrderService.insertDetail(userEntity,bookBuyConfigEntity,payPaypalOrder.getId());
|
||||
payPaymentOrderService.insertDetail(userEntity,bookBuyConfigEntity,payPaypalOrder.getId().toString());
|
||||
}
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
@@ -302,7 +302,7 @@ public class WxpayServiceImpl extends ServiceImpl<PayWechatOrderDao, PayWechatOr
|
||||
//插入虚拟币消费记录
|
||||
transactionDetailsService.rechargeRecord(userEntity,realMoney,buy_order_id.getId().intValue(),"微信",order.getOrderSn());
|
||||
//插入花生币充值记录
|
||||
payPaymentOrderService.insertDetail(userEntity,bookBuyConfigEntity,buy_order_id.getId().intValue());
|
||||
payPaymentOrderService.insertDetail(userEntity,bookBuyConfigEntity,buy_order_id.getId().toString());
|
||||
buyOrderService.updateOrderStatus(order.getUserId(), order.getOrderSn(), "2");
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user