Merge branch 'master' of https://gitee.com/wjl2008_admin/nuttyreading-java into zcc
This commit is contained in:
@@ -289,7 +289,9 @@ public class BuyOrderController {
|
||||
buyOrderService.updateOrderStatus(user.getId(), buyOrder.getOrderSn(), "2");
|
||||
}
|
||||
//记录用户虚拟币消费
|
||||
recordTransaction(buyOrder, user, totalPrice);
|
||||
if(totalPrice.compareTo(BigDecimal.ZERO)>0){
|
||||
recordTransaction(buyOrder, user, totalPrice);
|
||||
}
|
||||
//记录用户积分消费情况
|
||||
if(buyOrder.getJfDeduction().compareTo(BigDecimal.ZERO) > 0){
|
||||
recordJfTransaction(buyOrder, user, buyOrder.getJfDeduction());
|
||||
@@ -848,6 +850,9 @@ public class BuyOrderController {
|
||||
*/
|
||||
private boolean usePeanutCoin(MyUserEntity user, BigDecimal totalPrice, boolean sj_check, boolean scqq_check, boolean wylq_check, boolean prescript_b_check) {
|
||||
if (user.getPeanutCoin().compareTo(totalPrice) >= 0) {
|
||||
if(totalPrice.compareTo(BigDecimal.ZERO)==0){//纯积分支付,虚拟币不用支付
|
||||
return true;
|
||||
}
|
||||
user.setPeanutCoin(user.getPeanutCoin().subtract(totalPrice));
|
||||
if (sj_check){
|
||||
user.setPointPower(1);
|
||||
|
||||
Reference in New Issue
Block a user