会员支付

This commit is contained in:
khy 2024-10-21 11:34:53 +08:00
parent 3329093c88
commit caaca7b318
2 changed files with 4 additions and 2 deletions

View File

@ -13,6 +13,7 @@ public interface PaidMemberOrderConvert {
PaidMemberOrderConvert INSTANCE = Mappers.getMapper(PaidMemberOrderConvert.class); PaidMemberOrderConvert INSTANCE = Mappers.getMapper(PaidMemberOrderConvert.class);
PaidMemberOrderDO convert(Long uid, String cardName, Integer type, PaidMemberOrderDO convert(Long uid, String cardName, Integer type,
String payChannel, BigDecimal price, LocalDateTime payTime,String deadlineDay,LocalDateTime cardExpirationTime); String payChannel, BigDecimal price, LocalDateTime payTime,
String deadlineDay,LocalDateTime cardExpirationTime,BigDecimal originalPrice);
} }

View File

@ -102,10 +102,11 @@ public class AppPaidMembeOrderController {
getLoginUserType(),getClientIP(),reqVO.getPrice(),reqVO.getType()); getLoginUserType(),getClientIP(),reqVO.getPrice(),reqVO.getType());
BigDecimal p = payPrice.multiply(new BigDecimal("100")); BigDecimal p = payPrice.multiply(new BigDecimal("100"));
Integer payPriceInt = p.intValue(); Integer payPriceInt = p.intValue();
BigDecimal originalPrice = cardService.selectByName(reqVO.getCardName()).getOriginalPrice();
// PayWalletDO walletDO = memberWalletService.getOrCreateWallet(getLoginUserId(),getLoginUserType()); // PayWalletDO walletDO = memberWalletService.getOrCreateWallet(getLoginUserId(),getLoginUserType());
//订单对象赋值 //订单对象赋值
PaidMemberOrderDO paidMemberOrderDO = PaidMemberOrderConvert.INSTANCE.convert(getLoginUserId(), PaidMemberOrderDO paidMemberOrderDO = PaidMemberOrderConvert.INSTANCE.convert(getLoginUserId(),
reqVO.getCardName(),reqVO.getType(),reqVO.getPayChannel(),reqVO.getPrice(),payTime,deadlineDay,cardExpirationTime); reqVO.getCardName(),reqVO.getType(),reqVO.getPayChannel(),reqVO.getPrice(),payTime,deadlineDay,cardExpirationTime,originalPrice);
paidMemberOrderService1.createOrder(paidMemberOrderDO); paidMemberOrderService1.createOrder(paidMemberOrderDO);
Long payOrderId = payOrderService01.createOrder(new PayOrderCreateReqDTO() Long payOrderId = payOrderService01.createOrder(new PayOrderCreateReqDTO()
.setAppId(1L).setUserIp(getClientIP()) .setAppId(1L).setUserIp(getClientIP())