-- 新版提交

This commit is contained in:
yc13649764453
2023-09-09 13:51:35 +08:00
parent 763e24b4e0
commit 0b193caa03
92 changed files with 3451 additions and 1120 deletions

View File

@@ -124,7 +124,7 @@ public class AliPayServiceImpl implements AliPayService {
return "success";
}
PayZfbOrderEntity oldPayZfbOrderEntity = payZfbOrderService.getOne(new QueryWrapper<PayZfbOrderEntity>().eq("out_trade_no", aliNotifyDto.getOutTradeNo()));
CopyUtils.copyProperties(aliNotifyDto,oldPayZfbOrderEntity);
CopyUtils.copyProperties(aliNotifyDto,oldPayZfbOrderEntity);
payZfbOrderService.updateById(oldPayZfbOrderEntity);
@@ -160,10 +160,12 @@ public class AliPayServiceImpl implements AliPayService {
transactionDetailsEntity.setOrderType("充值");
transactionDetailsEntity.setRelationId(oldPayZfbOrderEntity.getId().intValue());
transactionDetailsEntity.setRemark("充值");
MyUserEntity user = userService.getById(Integer.valueOf(customerid));
Integer peanutCoin = user.getPeanutCoin();
BigDecimal balance = new BigDecimal(peanutCoin);
transactionDetailsEntity.setUserBalance(balance);
BigDecimal peanutCoin = user.getPeanutCoin();
transactionDetailsEntity.setUserBalance(peanutCoin);
transactionDetailsEntity.setUserName(user.getNickname());
transactionDetailsEntity.setTel(user.getTel());
transactionDetailsService.save(transactionDetailsEntity);
// 插入 花生币 充值记录
PayPaymentOrderEntity payPaymentOrderEntity = new PayPaymentOrderEntity();
@@ -174,15 +176,20 @@ public class AliPayServiceImpl implements AliPayService {
payPaymentOrderEntity.setRechargeChannel(bookBuyConfigEntity.getQudao());
payPaymentOrderEntity.setRechargeStatus("success");
payPaymentOrderEntity.setSuccessTime(new Date());
payPaymentOrderEntity.setUserName(user.getNickname());
payPaymentOrderEntity.setTel(user.getTel());
payPaymentOrderService.save(payPaymentOrderEntity);
buyOrderService.updateOrderStatus(Integer.valueOf(customerid),oldPayZfbOrderEntity.getRelevanceoid(),"2");
}
if ("order".equals(subject)) {
System.out.println("=====到order更新字段==================================================================================================================");
BuyOrderEntity orderEntity = buyOrderService.getBaseMapper().selectOne(new QueryWrapper<BuyOrderEntity>().eq("order_sn", oldPayZfbOrderEntity.getRelevanceoid()));
System.out.println("======orderEntity=========="+orderEntity);
BigDecimal realMoney = orderEntity.getRealMoney();
System.out.println("======realMoney=========="+realMoney);
BigDecimal bigDecimal = new BigDecimal(oldPayZfbOrderEntity.getBuyerPayAmount());
System.out.println("======bigDecimal=========="+bigDecimal);
//更新 订单 记录
if (bigDecimal.compareTo(realMoney) == 0) {
buyOrderService.updateOrderStatus(Integer.valueOf(customerid),oldPayZfbOrderEntity.getRelevanceoid(),"0");