| | |
| | | public ShopPointStatistics statistics(IPage<ShopPoint> page, ShopPoint shopPoint) { |
| | | Long userid = tokenService.getLoginUser().getUserid(); |
| | | SysUser sysUser = sysUserClient.getSysUser(userid).getData(); |
| | | |
| | | List<Shop> shopList = shopService.list(new LambdaQueryWrapper<Shop>() |
| | | .eq(Shop::getAppUserId,sysUser.getObjectId())); |
| | | Integer sPoint = 0; |
| | | Integer shopCommissionPoint = 0; |
| | | Integer subShopCommissionPoint = 0; |
| | | for (Shop shop : shopList) { |
| | | sPoint += shop.getServerPoint(); |
| | | shopCommissionPoint += shop.getSharePoint(); |
| | | subShopCommissionPoint += shop.getLowerLevelSharePoint(); |
| | | } |
| | | |
| | | Shop shop = shopService.getById(sysUser.getObjectId()); |
| | | sPoint += shop.getServerPoint(); |
| | | shopCommissionPoint += shop.getSharePoint(); |
| | | subShopCommissionPoint += shop.getLowerLevelSharePoint(); |
| | | ShopPointStatistics shopPointStatistics = new ShopPointStatistics(); |
| | | shopPointStatistics.setTotalPoint(sPoint + shopCommissionPoint + subShopCommissionPoint); |
| | | shopPointStatistics.setShopPoint(sPoint); |