| | |
| | | * 提现申请列表 |
| | | */ |
| | | @GetMapping("/list") |
| | | @ApiOperation("提现申请列表") |
| | | @ApiOperation(value = "提现申请列表" ) |
| | | public R<IPage<ShopWithdraw>> list(@ApiParam("页码") @RequestParam Integer pageNum, |
| | | @ApiParam("每一页数据大小") Integer pageSize, |
| | | ShopWithdraw shopWithdraw) { |
| | |
| | | .eq(auditStatus!=null,ShopWithdraw::getAuditStatus,auditStatus) |
| | | .orderByDesc(ShopWithdraw::getCreateTime) |
| | | ); |
| | | page.getRecords().forEach(s->s.setIdStr(s.getId().toString())); |
| | | return R.ok(page); |
| | | } |
| | | |
| | |
| | | } |
| | | ShopWithdraw shopWithdraw = new ShopWithdraw(); |
| | | shopWithdraw.setShopId(shopId); |
| | | shopWithdraw.setShopName(shop.getName()); |
| | | shopWithdraw.setCreateUserId(userId); |
| | | shopWithdraw.setMoney(money); |
| | | shopWithdraw.setAuditStatus(0);//待审核 |
| | | shopWithdraw.setStatus(1);//申请中 |
| | |
| | | BigDecimal withdrawMoney = shop.getWithdrawMoney();//审核中金额 |
| | | shop.setBalance(balance.subtract(money).setScale(2, RoundingMode.HALF_EVEN));//余额减少 |
| | | shop.setCanWithdrawMoney(canWithdrawMoney.subtract(money).setScale(2, RoundingMode.HALF_EVEN));//可提现金额减少 |
| | | shop.setWithdrawMoney(withdrawMoney.add(money).setScale(2, RoundingMode.HALF_EVEN));//审核中金额增加 |
| | | shop.setWithdrawAuditMoney(withdrawMoney.add(money).setScale(2, RoundingMode.HALF_EVEN));//审核中金额增加 |
| | | shopService.updateById(shop); |
| | | //添加余额变动明细 |
| | | ShopBalanceStatement shopBalanceStatement = new ShopBalanceStatement(); |