| | |
| | | |
| | | import com.stylefeng.guns.modular.system.model.Withdrawal; |
| | | import com.stylefeng.guns.modular.system.service.IDriverService; |
| | | import com.stylefeng.guns.modular.system.service.ISysWithdrawalPoundageService; |
| | | import com.stylefeng.guns.modular.system.service.IWithdrawalService; |
| | | import com.stylefeng.guns.modular.system.util.ICBCPayUtil; |
| | | import com.stylefeng.guns.modular.system.util.ResultUtil; |
| | |
| | | @Autowired |
| | | private IDriverService driverService; |
| | | |
| | | @Autowired |
| | | private ISysWithdrawalPoundageService sysWithdrawalPoundageService; |
| | | |
| | | |
| | | /** |
| | | * 账户余额提现操作 |
| | |
| | | @ApiOperation(value = "账户余额提现", tags = {"司机端-个人中心"}, notes = "") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(value = "提现金额", name = "money", required = true, dataType = "double"), |
| | | @ApiImplicitParam(value = "银行名称", name = "bankName", required = true, dataType = "string"), |
| | | @ApiImplicitParam(value = "银行卡号", name = "code", required = true, dataType = "string"), |
| | | @ApiImplicitParam(value = "银行卡id", name = "bankCardId", required = true, dataType = "string"), |
| | | @ApiImplicitParam(value = "银行卡持有人姓名", name = "name", required = true, dataType = "string"), |
| | | @ApiImplicitParam(value = "提现类型(1=活动收入提现,2=业务收入提现)", name = "type", required = true, dataType = "int"), |
| | | @ApiImplicitParam(name = "Authorization", value = "Bearer +token", required = true, dataType = "String", paramType = "header", defaultValue = "Bearer eyJhbGciOiJIUzUxMiJ9.....") |
| | | }) |
| | | public ResultUtil withdrawal(Double money, String bankName, String code, String name, Integer type, HttpServletRequest request){ |
| | | public ResultUtil withdrawal(Double money, Integer bankCardId, String name, Integer type, HttpServletRequest request){ |
| | | try { |
| | | Integer uid = driverService.getUserIdFormRedis(request); |
| | | if(null == uid){ |
| | | return ResultUtil.tokenErr(); |
| | | } |
| | | return withdrawalService.withdrawal(money, bankName, code, name, uid, type); |
| | | return withdrawalService.withdrawal(money, bankCardId, name, uid, type); |
| | | }catch (Exception e){ |
| | | e.printStackTrace(); |
| | | return ResultUtil.runErr(); |
| | |
| | | public ResultUtil withdrawalAudit(Integer id, Integer state){ |
| | | try { |
| | | return withdrawalService.withdrawalAudit(id, state); |
| | | }catch (Exception e){ |
| | | e.printStackTrace(); |
| | | return ResultUtil.runErr(); |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * 提现手续说明 |
| | | * @return |
| | | */ |
| | | @ResponseBody |
| | | @PostMapping("/base/withdrawal/withdrawalPoundage") |
| | | @ApiOperation(value = "提现手续说明", tags = {"司机端-个人中心"}, notes = "") |
| | | public ResultUtil withdrawalPoundage(){ |
| | | try { |
| | | return ResultUtil.success(sysWithdrawalPoundageService.selectOne(null).getPercentage() + "%"); |
| | | }catch (Exception e){ |
| | | e.printStackTrace(); |
| | | return ResultUtil.runErr(); |