| | |
| | | } |
| | | |
| | | @Override |
| | | public R<Map<String, BigDecimal>> getShopStatistics() { |
| | | public R<Map<String, BigDecimal>> getShopStatistics(Integer shopId) { |
| | | return R.fail(); |
| | | } |
| | | }; |
| | |
| | | |
| | | |
| | | @GetMapping("/shop/getShopStatistics") |
| | | public R<Map<String, BigDecimal>> getShopStatistics(); |
| | | public R<Map<String, BigDecimal>> getShopStatistics(@RequestParam("shopId") Integer shopId); |
| | | } |
| | |
| | | } |
| | | } |
| | | }); |
| | | Integer objectId = 0; |
| | | if(sysUser.getRoleType() == 2){ |
| | | objectId = sysUser.getObjectId(); |
| | | } |
| | | |
| | | |
| | | R<Map<String, BigDecimal>> shopStatistics = shopClient.getShopStatistics(); |
| | | R<Map<String, BigDecimal>> shopStatistics = shopClient.getShopStatistics(objectId); |
| | | Map<String, BigDecimal> data = shopStatistics.getData(); |
| | | BigDecimal totalServiceFee = BigDecimal.ZERO; |
| | | BigDecimal totalUserCommission = BigDecimal.ZERO; |
| | |
| | | |
| | | |
| | | @GetMapping("/getShopStatistics") |
| | | public R<Map<String, BigDecimal> > getShopStatistics(){ |
| | | List<Shop> shopList = shopService.list(); |
| | | public R<Map<String, BigDecimal> > getShopStatistics(@RequestParam("shopId") Integer shopId){ |
| | | LambdaQueryWrapper<Shop> queryWrapper = new LambdaQueryWrapper<Shop>().eq(Shop::getDelFlag, 0).eq(Shop::getStatus, 1); |
| | | if(null != shopId){ |
| | | queryWrapper.eq(Shop::getId, shopId); |
| | | } |
| | | List<Shop> shopList = shopService.list(queryWrapper); |
| | | BigDecimal serverGiveawayMoney = BigDecimal.ZERO; |
| | | BigDecimal giveawayMoney = BigDecimal.ZERO; |
| | | for (Shop shop : shopList) { |