jf
消费
This commit is contained in:
@@ -289,7 +289,9 @@ public class BuyOrderController {
|
|||||||
buyOrderService.updateOrderStatus(user.getId(), buyOrder.getOrderSn(), "2");
|
buyOrderService.updateOrderStatus(user.getId(), buyOrder.getOrderSn(), "2");
|
||||||
}
|
}
|
||||||
//记录用户虚拟币消费
|
//记录用户虚拟币消费
|
||||||
|
if(totalPrice.compareTo(BigDecimal.ZERO)>0){
|
||||||
recordTransaction(buyOrder, user, totalPrice);
|
recordTransaction(buyOrder, user, totalPrice);
|
||||||
|
}
|
||||||
//记录用户积分消费情况
|
//记录用户积分消费情况
|
||||||
if(buyOrder.getJfDeduction().compareTo(BigDecimal.ZERO) > 0){
|
if(buyOrder.getJfDeduction().compareTo(BigDecimal.ZERO) > 0){
|
||||||
recordJfTransaction(buyOrder, user, buyOrder.getJfDeduction());
|
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) {
|
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 (user.getPeanutCoin().compareTo(totalPrice) >= 0) {
|
||||||
|
if(totalPrice.compareTo(BigDecimal.ZERO)==0){//纯积分支付,虚拟币不用支付
|
||||||
|
return true;
|
||||||
|
}
|
||||||
user.setPeanutCoin(user.getPeanutCoin().subtract(totalPrice));
|
user.setPeanutCoin(user.getPeanutCoin().subtract(totalPrice));
|
||||||
if (sj_check){
|
if (sj_check){
|
||||||
user.setPointPower(1);
|
user.setPointPower(1);
|
||||||
|
|||||||
Reference in New Issue
Block a user