| | |
| | | if(null == uid){ |
| | | return ResultUtil.tokenErr(); |
| | | } |
| | | withdrawalService.addWithdrawal(receivePaymentName, receivePaymentAccount, withdrawalType, openBank, withdrawalMoney, uid); |
| | | return ResultUtil.success(); |
| | | return withdrawalService.addWithdrawal(receivePaymentName, receivePaymentAccount, withdrawalType, openBank, withdrawalMoney, uid); |
| | | }catch (Exception e){ |
| | | e.printStackTrace(); |
| | | return ResultUtil.runErr(); |
| | |
| | | @PostMapping("/queryList") |
| | | @ApiOperation(value = "提现查看分页列表", tags = {"司机端-个人中心"}, notes = "") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(value = "pageNum", name = "pageNum", required = true, dataType = "int"), |
| | | @ApiImplicitParam(value = "size", name = "size", required = true, dataType = "int"), |
| | | @ApiImplicitParam(name = "Authorization", value = "Bearer +token", required = true, dataType = "String", paramType = "header", defaultValue = "Bearer eyJhbGciOiJIUzUxMiJ9.....") |
| | | }) |
| | | public ResultUtil queryList(HttpServletRequest request){ |
| | | public ResultUtil queryList(Integer pageNum,Integer size,HttpServletRequest request){ |
| | | try { |
| | | Integer uid = driverService.getUserIdFormRedis(request); |
| | | if(null == uid){ |
| | | return ResultUtil.tokenErr(); |
| | | } |
| | | Page<TWithdrawal> page = new PageFactory<TWithdrawal>().defaultPage(); |
| | | Page<TWithdrawal> page = new Page<>(pageNum,size); |
| | | List<TWithdrawal> result = withdrawalService.queryList(page, uid); |
| | | page.setRecords(result); |
| | | return ResultUtil.success(super.packForBT(page)); |
| | |
| | | Driver driver = driverService.selectById(uid); |
| | | Company company = companyService.selectById(driver.getCompanyId()); |
| | | Double driverRestriction = company.getDriverRestriction(); |
| | | if(driverRestriction>=driver.getBalance()){ |
| | | if(driverRestriction>driver.getBalance()){ |
| | | return ResultUtil.success(0); |
| | | }else { |
| | | return ResultUtil.success(1); |