280c1bf9b93fb57b65d2c3f88cc4924aa9d780b4..a31466965504b949403770c7c03eb9ee873640a9
2021-07-02 Helius
Merge branch 'score-shop' of http://120.27.238.55:7000/r/xzx into score-shop
a31466 diff | tree
2021-07-02 Helius
fix
2166cb diff | tree
1 files modified
3 ■■■■■ changed files
gc-shop/src/main/java/com/xzx/gc/shop/service/OrderService.java 3 ●●●●● patch | view | raw | blame | history
gc-shop/src/main/java/com/xzx/gc/shop/service/OrderService.java
@@ -205,15 +205,12 @@
        }
        AccountInfo accountInfo = accountInfoMapper.selectAccountInfoByUserId(addGoodsOrderDto.getUserId());
        log.info("积分:{}", accountInfo.getCollectScore());
        if (accountInfo.getCollectScore() == null) {
            throw new RestException(-3, "积分不足");
        }
        BigDecimal totalPrice = sku.getPresentPrice().multiply(BigDecimal.valueOf(addGoodsOrderDto.getCnt()));
        BigDecimal score = new BigDecimal(accountInfo.getCollectScore());
        log.info("积分:{}", score);
        log.info("积分1:{}", totalPrice);
        if (score.compareTo(totalPrice) < 0) {
            throw new RestException(-3, "积分不足");
        }