变动记录统计

This commit is contained in:
张松 2025-10-30 15:24:08 +08:00
parent 0018f86dfc
commit f9a22f31f2
1 changed files with 4 additions and 4 deletions

View File

@ -60,12 +60,12 @@ public class MkDistributionAmountFlowServiceImpl extends ServiceImpl<MkDistribut
Page<MkDistributionAmountFlowVO> pageInfo = pageAs(PageUtil.buildPage(), queryWrapper.orderBy(MkDistributionAmountFlow::getCreateTime, false), MkDistributionAmountFlowVO.class);
Map<String, Object> map = BeanUtil.beanToMap(pageInfo);
map.put("totalRecharge", getOne(new QueryWrapper().eq(MkDistributionAmountFlow::getShopId, shopId)
map.put("totalRecharge", getOneAs(new QueryWrapper().eq(MkDistributionAmountFlow::getShopId, shopId)
.in(MkDistributionAmountFlow::getType, TableValueConstant.DistributionAmountFlow.Type.MANUAL_RECHARGE.getCode(), TableValueConstant.DistributionAmountFlow.Type.SELF_RECHARGE.getCode())
.select("sum(change_amount)")));
map.put("totalSub", getOne(new QueryWrapper().eq(MkDistributionAmountFlow::getShopId, shopId)
.select("sum(change_amount)"), BigDecimal.class));
map.put("totalSub", getOneAs(new QueryWrapper().eq(MkDistributionAmountFlow::getShopId, shopId)
.in(MkDistributionAmountFlow::getType, TableValueConstant.DistributionAmountFlow.Type.SUB.getCode(), TableValueConstant.DistributionAmountFlow.Type.MANUAL_SUB.getCode())
.select("sum(change_amount)")));
.select("sum(change_amount)"), BigDecimal.class));
return map;
}