| | |
| | | AppUser byId = appUserService.lambdaQuery() |
| | | .eq(AppUser::getPhone, phone) |
| | | .eq(AppUser::getDelFlag,0) |
| | | .eq(AppUser::getStatus,1) |
| | | .one(); |
| | | if (byId == null) { |
| | | return R.fail("搜索失败,手机号错误。"); |
| | |
| | | // 过滤商城购物 |
| | | List<BalanceChangeRecord> collect = balanceChangeRecordIPage.getRecords().stream().filter(e -> e.getChangeType() != 5).collect(Collectors.toList()); |
| | | for (BalanceChangeRecord changeRecord : collect) { |
| | | if (changeRecord.getBeforeAmount()!=null && changeRecord.getAfterAmount()!=null){ |
| | | BigDecimal subtract = changeRecord.getBeforeAmount().subtract(changeRecord.getAfterAmount()); |
| | | if (subtract.compareTo(BigDecimal.ZERO)>0){ |
| | | // 减少 |
| | |
| | | changeRecord.setChangeAmountString("¥"+changeRecord.getChangeAmount()); |
| | | } |
| | | } |
| | | } |
| | | balanceChangeRecordIPage.setRecords(collect); |
| | | return new CommissionStatistics(totalCommission, balanceChangeRecordIPage); |
| | | } |
| | |
| | | tau.phone userPhone, |
| | | tbcr.change_type, |
| | | tbcr.create_time, |
| | | tbcr.change_amount |
| | | tbcr.change_amount, |
| | | tbcr.beforeAmount, |
| | | tbcr.afterAmount |
| | | FROM |
| | | t_balance_change_record tbcr |
| | | LEFT JOIN t_app_user tau ON tbcr.app_user_id = tau.id |
| | |
| | | //添加明细 |
| | | List<GoodsBargainPriceDetail> list = vo.getList(); |
| | | for (GoodsBargainPriceDetail goodsBargainPriceDetail : list) { |
| | | goodsBargainPriceDetail.setId(null); |
| | | goodsBargainPriceDetail.setGoodsBargainPriceId(bargainPrice.getId()); |
| | | } |
| | | goodsBargainPriceDetailService.saveBatch(list); |