| | |
| | | package com.stylefeng.guns.modular.api; |
| | | |
| | | |
| | | import com.stylefeng.guns.core.util.ToolUtil; |
| | | import com.stylefeng.guns.modular.system.model.BankCard; |
| | | import com.stylefeng.guns.modular.system.service.IBankCardService; |
| | | import com.stylefeng.guns.modular.system.service.IDriverService; |
| | | import com.stylefeng.guns.modular.system.util.LiuZhouBank.ProtocolSignUtil; |
| | | import com.stylefeng.guns.modular.system.util.ResultUtil; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiImplicitParam; |
| | |
| | | |
| | | @Autowired |
| | | private IDriverService driverService; |
| | | |
| | | |
| | | // @ResponseBody |
| | | // @PostMapping("/getSignSendSms") |
| | | // @ApiOperation(value = "发送签约银行验证短信", tags = {"司机端-个人中心"}, notes = "") |
| | | // @ApiImplicitParams({ |
| | | // @ApiImplicitParam(value = "身份证号码", name = "IdNum", required = true, dataType = "String"), |
| | | // @ApiImplicitParam(value = "银行预留电话", name = "phone", required = true, dataType = "String"), |
| | | // @ApiImplicitParam(value = "开户姓名", name = "acctName", required = true, dataType = "String"), |
| | | // @ApiImplicitParam(value = "银行卡号", name = "acctNum", required = true, dataType = "String"), |
| | | // @ApiImplicitParam(name = "Authorization", value = "Bearer +token", required = true, dataType = "String", paramType = "header", defaultValue = "Bearer eyJhbGciOiJIUzUxMiJ9.....") |
| | | // }) |
| | | // public ResultUtil getSignSendSms(String IdNum, String phone, String acctName, String acctNum){ |
| | | // try { |
| | | // ResultUtil<String> stringResultUtil = ProtocolSignUtil.protocolSignSendSms(IdNum, phone, acctName, acctNum); |
| | | // if(200 != stringResultUtil.getCode()){ |
| | | // return stringResultUtil; |
| | | // } |
| | | // return ResultUtil.success(); |
| | | // }catch (Exception e){ |
| | | // e.printStackTrace(); |
| | | // return ResultUtil.runErr(); |
| | | // } |
| | | // } |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | /** |
| | |
| | | } |
| | | } |
| | | |
| | | |
| | | @ResponseBody |
| | | @PostMapping("/saveBankCard1") |
| | | @ApiOperation(value = "保存银行卡信息【新】", tags = {"司机端-个人中心"}, notes = "") |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(value = "身份证号码", name = "IdNum", required = true, dataType = "String"), |
| | | @ApiImplicitParam(value = "银行预留电话", name = "phone", required = true, dataType = "String"), |
| | | @ApiImplicitParam(value = "开户姓名", name = "acctName", required = true, dataType = "String"), |
| | | @ApiImplicitParam(value = "银行卡号", name = "acctNum", required = true, dataType = "String"), |
| | | @ApiImplicitParam(value = "短信验证码", name = "code", required = true, dataType = "String"), |
| | | @ApiImplicitParam(name = "Authorization", value = "Bearer +token", required = true, dataType = "String", paramType = "header", defaultValue = "Bearer eyJhbGciOiJIUzUxMiJ9.....") |
| | | }) |
| | | public ResultUtil saveBankCard1(String IdNum, String phone, String acctName, String acctNum, String code, HttpServletRequest request){ |
| | | try { |
| | | Integer driverId = driverService.getUserIdFormRedis(request); |
| | | if(null == driverId){ |
| | | return ResultUtil.tokenErr(); |
| | | } |
| | | return bankCardService.saveBankCard1(driverId, IdNum, phone, acctName, acctNum, code); |
| | | }catch (Exception e){ |
| | | e.printStackTrace(); |
| | | return ResultUtil.runErr(); |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * 删除银行卡号 |
| | | * @param id |