| | |
| | | @ApiOperation(value = "保存银行卡") |
| | | public AjaxResult saveAppUserBank(@RequestBody AppUserBank appUserBank){ |
| | | LoginUser loginUserApplet = tokenService.getLoginUserApplet(); |
| | | AppUserBank bank = appUserBankService.getById(loginUserApplet.getUserid()); |
| | | if (bank == null){ |
| | | appUserBankService.save(appUserBank); |
| | | }else { |
| | | BeanUtils.copyBeanProp(bank,appUserBank); |
| | | appUserBankService.updateById(bank); |
| | | } |
| | | appUserBank.setAppUserId(loginUserApplet.getUserid()); |
| | | appUserBankService.saveOrUpdate(appUserBank); |
| | | return AjaxResult.success(); |
| | | } |
| | | |