| | |
| | | return R.ok(appUser); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 设置指定用户的下级用户绑定门店 |
| | | */ |
| | | @PutMapping("setLowerUserShop") |
| | | public R<Void> setLowerUserShop(@RequestParam("userId") Long userId,@RequestParam("shopId") Integer shopId) { |
| | | appUserService.update(new LambdaUpdateWrapper<AppUser>() |
| | | .set(AppUser::getShopId,shopId) |
| | | .eq(AppUser::getInviteUserId, userId)); |
| | | return R.ok(); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 用户统计 |
| | | */ |
| | |
| | | BigDecimal totalServiceFee = BigDecimal.ZERO; |
| | | BigDecimal totalUserCommission = BigDecimal.ZERO; |
| | | Map<Integer, BigDecimal> vipCommissions = new HashMap<>(); |
| | | Map<String, Map<Integer, BigDecimal>> dailyVipCommissions = new HashMap<>(); |
| | | Map<String, Map<Integer, BigDecimal>> dailyVipCommissions = new TreeMap<>(); |
| | | for (AppUser appUser : appUserList) { |
| | | BigDecimal distributionAmount = Optional.ofNullable(appUser.getTotalDistributionAmount()).orElse(BigDecimal.ZERO); |
| | | totalCommission = totalCommission.add(distributionAmount); |