| | |
| | | List<C2cPaymentMethodDto> list = page.getRecords(); |
| | | for (C2cPaymentMethodDto dto : list) { |
| | | dto.setMethodTypeName(pmtMap.containsKey(dto.getMethodType() + "") ? pmtMap.get(dto.getMethodType() + "") : dto.getMethodType() + ""); |
| | | dto.setQrcodeImg(awsS3OSSFileService.getUrl(dto.getQrcode())); |
| | | dto.setMethodImgUrl(awsS3OSSFileService.getUrl(dto.getMethodImg())); |
| | | dto.setQrcodeImg(Constants.IMAGES_HTTP+dto.getQrcode()); |
| | | dto.setMethodImgUrl(Constants.IMAGES_HTTP+dto.getMethodImg()); |
| | | } |
| | | return Result.ok(page); |
| | | } |
| | |
| | | sysUserService.checkSafeWord(model.getLoginSafeword()); |
| | | User party = userService.findUserByUserCode(model.getUserCode()); |
| | | if (null == party) { |
| | | throw new YamiShopBindException("用户不存在"); |
| | | throw new YamiShopBindException("User does not exist"); |
| | | } |
| | | C2cPaymentMethodConfig methodConfig = this.c2cPaymentMethodConfigService.getById(model.getMethodConfigId()); |
| | | if (null == methodConfig) { |
| | | throw new YamiShopBindException("支付方式模板不存在"); |
| | | throw new YamiShopBindException("Payment method template does not exist"); |
| | | } |
| | | // C2C用户和承兑商添加支付方式最大数量 |
| | | Map<String, C2cPaymentMethod> methodMap = this.c2cPaymentMethodService.getByPartyId(party.getUserId().toString()); |
| | | Object obj = this.sysparaService.find("c2c_payment_method_count_max"); |
| | | if (null != obj) { |
| | | if (methodMap.size() >= Integer.valueOf(this.sysparaService.find("c2c_payment_method_count_max").getSvalue()).intValue()) { |
| | | throw new YamiShopBindException("支付方式数量已达上限"); |
| | | throw new YamiShopBindException("Payment method limit reached"); |
| | | } |
| | | } |
| | | C2cPaymentMethod method = new C2cPaymentMethod(); |
| | |
| | | |
| | | C2cPaymentMethod method = this.adminC2cPaymentMethodService.get(model.getId()); |
| | | if (null == method) { |
| | | throw new YamiShopBindException("支付方式不存在"); |
| | | throw new YamiShopBindException("Payment method does not exist"); |
| | | } |
| | | User party = userService.getById(method.getPartyId()); |
| | | if (null == party) { |
| | | throw new YamiShopBindException("用户不存在"); |
| | | throw new YamiShopBindException("User does not exist"); |
| | | } |
| | | C2cPaymentMethodDto dto = new C2cPaymentMethodDto(); |
| | | BeanUtils.copyProperties(method, dto); |
| | |
| | | Map<String, String> pmtMap = this.c2cAdvertService.getC2cSyspara("c2c_payment_method_type"); |
| | | dto.setMethodTypeName(pmtMap.get(dto.getMethodType()+"")); |
| | | dto.setUserName(party.getUserName()); |
| | | dto.setQrcodeImg(awsS3OSSFileService.getUrl(dto.getQrcode())); |
| | | dto.setMethodImgUrl(awsS3OSSFileService.getUrl(dto.getMethodImg())); |
| | | dto.setQrcodeImg(Constants.IMAGES_HTTP+dto.getQrcode()); |
| | | dto.setMethodImgUrl(Constants.IMAGES_HTTP+dto.getMethodImg()); |
| | | return Result.ok(dto); |
| | | } |
| | | |
| | |
| | | sysUserService.checkSafeWord(model.getLoginSafeword()); |
| | | C2cPaymentMethod method = adminC2cPaymentMethodService.get(model.getId()); |
| | | if (null == method) { |
| | | throw new YamiShopBindException("支付方式不存在"); |
| | | throw new YamiShopBindException("Payment method does not exist"); |
| | | } |
| | | String log = MessageFormat.format("ip:" + IPHelper.getIpAddr() |
| | | + ",管理员修改支付方式,id:{0},原用户PARTY_ID:{1},原支付方式模板:{2},原支付方式类型:{3},原支付方式名称:{4},原支付方式图片:{5},原真实姓名:{6}," |
| | |
| | | sysUserService.checkSafeWord(model.getLoginSafeword()); |
| | | C2cPaymentMethod method = this.adminC2cPaymentMethodService.get(model.getId()); |
| | | if (null == method) { |
| | | throw new YamiShopBindException("支付方式不存在"); |
| | | throw new YamiShopBindException("Payment method does not exist"); |
| | | } |
| | | String log = MessageFormat.format("ip:" + IPHelper.getIpAddr() |
| | | + ",管理员删除支付方式,id:{0},用户PARTY_ID:{1},支付方式模板:{2},支付方式类型:{3},支付方式名称:{4},支付方式图片:{5},真实姓名:{6}," |