自定金额修改

This commit is contained in:
wuchunlei
2025-11-07 14:01:11 +08:00
parent 6ebf682399
commit d5c20725b7
2 changed files with 4 additions and 2 deletions

View File

@@ -228,12 +228,13 @@ public class AliPayServiceImpl implements AliPayService {
BookBuyConfigEntity bookBuyConfigEntity = bookBuyConfigService.getById(Integer.valueOf(body));
MyUserEntity userEntity = userService.getById(order.getUserId());
if (Integer.valueOf(body)==0){//自定义充值
bookBuyConfigEntity = new BookBuyConfigEntity();
bookBuyConfigEntity.setRealMoney(order.getRealMoney());
bookBuyConfigEntity.setMoney(order.getRealMoney());
bookBuyConfigEntity.setQudao("Android");
}
//充值送积分
if (bookBuyConfigEntity != null && bookBuyConfigEntity.getGivejf().compareTo(BigDecimal.ZERO)>0) {
if (bookBuyConfigEntity != null && bookBuyConfigEntity.getGivejf() != null && bookBuyConfigEntity.getGivejf().compareTo(BigDecimal.ZERO)>0) {
userEntity.setJf(userEntity.getJf().add(bookBuyConfigEntity.getGivejf()));
userService.updateById(userEntity);
JfTransactionDetails jfTransactionDetails = new JfTransactionDetails();

View File

@@ -320,13 +320,14 @@ public class WxpayServiceImpl extends ServiceImpl<PayWechatOrderDao, PayWechatOr
Integer buyorder = payWechatOrder.getBuyOrderId();
BookBuyConfigEntity bookBuyConfigEntity = bookBuyConfigService.getById(buyorder);
if (buyorder==0){//自定义充值
bookBuyConfigEntity = new BookBuyConfigEntity();
bookBuyConfigEntity.setRealMoney(payWechatOrder.getTotalAmount());
bookBuyConfigEntity.setMoney(payWechatOrder.getTotalAmount());
bookBuyConfigEntity.setQudao("Android");
}
MyUserEntity userEntity = userService.getById(order.getUserId());
//充值送积分
if (bookBuyConfigEntity != null && bookBuyConfigEntity.getGivejf().compareTo(BigDecimal.ZERO)>0) {
if (bookBuyConfigEntity != null && bookBuyConfigEntity.getGivejf() != null && bookBuyConfigEntity.getGivejf().compareTo(BigDecimal.ZERO)>0) {
userEntity.setJf(userEntity.getJf().add(bookBuyConfigEntity.getGivejf()));
userService.updateById(userEntity);
JfTransactionDetails jfTransactionDetails = new JfTransactionDetails();