自定金额修改
This commit is contained in:
@@ -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();
|
||||
|
||||
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user