Commit 5377f553 by 吕明尚

修改订单查询

parent b20a9465
......@@ -27,7 +27,7 @@
</encoder>
<filter class="ch.qos.logback.classic.filter.LevelFilter">
<!-- 过滤的级别 -->
<level>INFO</level>
<level>DEBUG</level>
<!-- 匹配时的操作:接收(记录) -->
<onMatch>ACCEPT</onMatch>
<!-- 不匹配时的操作:拒绝(不记录) -->
......
......@@ -194,7 +194,7 @@ public class ConsumerWalletServiceImpl extends ServiceImpl<ConsumerWalletMapper,
logger.debug("修改会员用户");
BigDecimal balance = consumerWallet.getBalance().add(recharge.getRechargeAmount());
if (rechargeConf.getGiveType().contains(GiveTypeEnum.AMOUNT.getIndex())) {
balance.add(rechargeConf.getGiveAmount());
balance = balance.add(rechargeConf.getGiveAmount());
consumerWallet.setBalance(balance);
} else {
consumerWallet.setBalance(balance);
......
......@@ -362,7 +362,7 @@ public class SOrderServiceImpl extends ServiceImpl<SOrderMapper, SOrder> impleme
HashMap<String, Object> summedPrice = baseMapper.sumPrice(sOrder);
List<Long> ids = sOrderVos.stream().map(SOrderVo::getCouponId).collect(Collectors.toList());
Map<Long, SConsumerCoupon> couponMap = new HashMap<>();
SConsumerCoupon sConsumerCoupon = new SConsumerCoupon();
SConsumerCoupon sConsumerCoupon = null;
if (CollectionUtils.isNotEmpty(ids)) {
couponMap = consumerCouponService.listByIds(ids)
.stream().collect(Collectors.toMap(SConsumerCoupon::getId, s -> s));
......@@ -401,7 +401,11 @@ public class SOrderServiceImpl extends ServiceImpl<SOrderMapper, SOrder> impleme
tableDataInfo.setTotalRealRefundAmount(BigDecimal.ZERO);
}
tableDataInfo.setTotalSalesAmount(ObjectUtil.isNotEmpty(sConsumerCoupon.getCouponPayPrice()) ? sConsumerCoupon.getCouponPayPrice() : BigDecimal.ZERO);
if (ObjectUtil.isNotEmpty(sConsumerCoupon)) {
tableDataInfo.setTotalSalesAmount(sConsumerCoupon.getCouponPayPrice());
} else {
tableDataInfo.setTotalSalesAmount(BigDecimal.ZERO);
}
return tableDataInfo;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment