|
|
@@ -108,9 +108,11 @@ public class AppShopController {
|
|
|
//店铺会员总数
|
|
|
int allMembers = getTotalMembers(shopId);
|
|
|
|
|
|
- //店铺总资产
|
|
|
+ BalanceAccountInfoVO balanceAccountInfoVO = appShopService.queryBalance(shopId);
|
|
|
+ //店铺总收益
|
|
|
Shop shop = shopService.getById(shopId);
|
|
|
- BigDecimal totalValue = shop.getBalance().add(shop.getCharge()).add(shop.getPoint());
|
|
|
+ //店铺总收益=现金收益+未核销的渠道积分+已核销的渠道积分+总余额收益
|
|
|
+ BigDecimal totalValue = shop.getTotalBalance().add(shop.getCharge()).add(shop.getWithdrawCharge()).add(shop.getTotalPoint());
|
|
|
|
|
|
//积分总价值
|
|
|
BigDecimal pointsTotalValue = shop.getTotalValue();
|
|
|
@@ -125,7 +127,6 @@ public class AppShopController {
|
|
|
.eq(Bills::getPayStatus, AppConstant.BillPayStatus.已完结.name())));
|
|
|
|
|
|
|
|
|
- BalanceAccountInfoVO balanceAccountInfoVO = appShopService.queryBalance(shopId);
|
|
|
//今日现金收益
|
|
|
BigDecimal todayBalance = Convert.toBigDecimal(balanceAccountInfoVO.getTodayNum());
|
|
|
//今日积分收益
|
|
|
@@ -195,13 +196,14 @@ public class AppShopController {
|
|
|
BigDecimal totalCharge = Optional.ofNullable(shop.getCharge()).orElse(BigDecimal.ZERO).add(shop.getWithdrawCharge());
|
|
|
//总收益
|
|
|
BigDecimal totalRevenue = Optional.ofNullable(shop.getTotalBalance()).orElse(BigDecimal.ZERO).add(shop.getTotalPoint()).add(totalCharge);
|
|
|
- //总资产
|
|
|
- BigDecimal totalAssets = shop.getBalance().add(shop.getCharge()).add(shop.getPoint());
|
|
|
+ //总资产 = 可提现余额 + 未核销积分 + 可提现积分
|
|
|
+ BigDecimal availableNum = Convert.toBigDecimal(balanceAccountInfoVO.getAvailableNum());
|
|
|
+ BigDecimal totalAssets = availableNum.add(shop.getCharge()).add(shop.getPoint());
|
|
|
|
|
|
ShopBillsInfoVO shopBillsInfoVO = ShopBillsInfoVO
|
|
|
.builder()
|
|
|
//后端null值返回到前端却是-1
|
|
|
- .balance(Convert.toBigDecimal(balanceAccountInfoVO.getAvailableNum()))
|
|
|
+ .balance(availableNum)
|
|
|
.totalBalance(Convert.toBigDecimal(balanceAccountInfoVO.getTotalNum()))
|
|
|
.todayBalance(Optional.ofNullable(todayBalance).orElse(BigDecimal.ZERO))
|
|
|
.point(Optional.ofNullable(shop.getPoint()).orElse(BigDecimal.ZERO))
|