自定金额修改
This commit is contained in:
@@ -228,12 +228,13 @@ public class AliPayServiceImpl implements AliPayService {
|
|||||||
BookBuyConfigEntity bookBuyConfigEntity = bookBuyConfigService.getById(Integer.valueOf(body));
|
BookBuyConfigEntity bookBuyConfigEntity = bookBuyConfigService.getById(Integer.valueOf(body));
|
||||||
MyUserEntity userEntity = userService.getById(order.getUserId());
|
MyUserEntity userEntity = userService.getById(order.getUserId());
|
||||||
if (Integer.valueOf(body)==0){//自定义充值
|
if (Integer.valueOf(body)==0){//自定义充值
|
||||||
|
bookBuyConfigEntity = new BookBuyConfigEntity();
|
||||||
bookBuyConfigEntity.setRealMoney(order.getRealMoney());
|
bookBuyConfigEntity.setRealMoney(order.getRealMoney());
|
||||||
bookBuyConfigEntity.setMoney(order.getRealMoney());
|
bookBuyConfigEntity.setMoney(order.getRealMoney());
|
||||||
bookBuyConfigEntity.setQudao("Android");
|
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()));
|
userEntity.setJf(userEntity.getJf().add(bookBuyConfigEntity.getGivejf()));
|
||||||
userService.updateById(userEntity);
|
userService.updateById(userEntity);
|
||||||
JfTransactionDetails jfTransactionDetails = new JfTransactionDetails();
|
JfTransactionDetails jfTransactionDetails = new JfTransactionDetails();
|
||||||
|
|||||||
@@ -320,13 +320,14 @@ public class WxpayServiceImpl extends ServiceImpl<PayWechatOrderDao, PayWechatOr
|
|||||||
Integer buyorder = payWechatOrder.getBuyOrderId();
|
Integer buyorder = payWechatOrder.getBuyOrderId();
|
||||||
BookBuyConfigEntity bookBuyConfigEntity = bookBuyConfigService.getById(buyorder);
|
BookBuyConfigEntity bookBuyConfigEntity = bookBuyConfigService.getById(buyorder);
|
||||||
if (buyorder==0){//自定义充值
|
if (buyorder==0){//自定义充值
|
||||||
|
bookBuyConfigEntity = new BookBuyConfigEntity();
|
||||||
bookBuyConfigEntity.setRealMoney(payWechatOrder.getTotalAmount());
|
bookBuyConfigEntity.setRealMoney(payWechatOrder.getTotalAmount());
|
||||||
bookBuyConfigEntity.setMoney(payWechatOrder.getTotalAmount());
|
bookBuyConfigEntity.setMoney(payWechatOrder.getTotalAmount());
|
||||||
bookBuyConfigEntity.setQudao("Android");
|
bookBuyConfigEntity.setQudao("Android");
|
||||||
}
|
}
|
||||||
MyUserEntity userEntity = userService.getById(order.getUserId());
|
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()));
|
userEntity.setJf(userEntity.getJf().add(bookBuyConfigEntity.getGivejf()));
|
||||||
userService.updateById(userEntity);
|
userService.updateById(userEntity);
|
||||||
JfTransactionDetails jfTransactionDetails = new JfTransactionDetails();
|
JfTransactionDetails jfTransactionDetails = new JfTransactionDetails();
|
||||||
|
|||||||
Reference in New Issue
Block a user