| | |
| | | BeanUtils.copyProperties(paymentMethodConfig, c2cPaymentMethodConfigListDto); |
| | | c2cPaymentMethodConfigListDto.setMethodType(paymentMethodConfig.getMethodType()+""); |
| | | c2cPaymentMethodConfigListDto.setMethodTypeName(map.get(c2cPaymentMethodConfigListDto.getMethodType())); |
| | | //awsS3OSSFileService.getUrl(paymentMethodConfig.getMethodImg()) |
| | | //awsS3OSSFileService.getUrl(paymentMethodConfig.getMethodImg()) |
| | | c2cPaymentMethodConfigListDto.setMethodImgUrl(awsS3OSSFileService.getUrl(paymentMethodConfig.getMethodImg())); |
| | | c2cPaymentMethodConfigListDto.setMethodImgUrl(Constants.IMAGES_HTTP+paymentMethodConfig.getMethodImg()); |
| | | |
| | | c2cPaymentMethodConfigListDto.setMethodImg(paymentMethodConfig.getMethodImg()); |
| | | list.add(c2cPaymentMethodConfigListDto); |
| | |
| | | public Result<GetC2cPaymentMethodConfigDto> getDesc(@RequestParam String id) { |
| | | C2cPaymentMethodConfig cfg = this.c2cPaymentMethodConfigService.getById(id); |
| | | if (null == cfg) { |
| | | throw new YamiShopBindException("支付方式模板不存在"); |
| | | throw new YamiShopBindException("Payment method template does not exist"); |
| | | } |
| | | Map<String, String> map = c2cAdvertService.getC2cSyspara("c2c_payment_method_type"); |
| | | GetC2cPaymentMethodConfigDto dto = new GetC2cPaymentMethodConfigDto(); |
| | |
| | | dto.setMethodName(cfg.getMethodName()); |
| | | dto.setMethodTypeName(map.get(dto.getMethodType())); |
| | | dto.setMethodImg(cfg.getMethodImg()); |
| | | dto.setMethodImgUrl(awsS3OSSFileService.getUrl(cfg.getMethodImg())); |
| | | dto.setMethodImgUrl(Constants.IMAGES_HTTP+cfg.getMethodImg()); |
| | | dto.setParamName1(cfg.getParamName1()); |
| | | dto.setParamName2(cfg.getParamName2()); |
| | | dto.setParamName3(cfg.getParamName3()); |
| | |
| | | sysUserService.checkSafeWord(config.getLoginSafeword()); |
| | | C2cPaymentMethodConfig cfg = this.c2cPaymentMethodConfigService.getById(id); |
| | | if (null == cfg) { |
| | | throw new YamiShopBindException("支付方式模板不存在"); |
| | | throw new YamiShopBindException("Payment method template does not exist"); |
| | | } |
| | | String log = MessageFormat.format("ip:" + IPHelper.getIpAddr() |
| | | + ",管理员更新支付方式模板,id:{0},原支付方式类型:{1},原支付方式名称:{2},原支付方式图片:{3},原参数名1:{4},原参数名2:{5},原参数名3:{6},原参数名4:{7},原参数名5:{8}," |
| | |
| | | String content = model.getContent(); |
| | | String lang_trans = model.getLangTrans(); |
| | | if (StringUtils.isEmptyString(content_name)) { |
| | | throw new YamiShopBindException("内容名称不能为空"); |
| | | throw new YamiShopBindException("Content name cannot be empty"); |
| | | } |
| | | if (StringUtils.isEmptyString(content)) { |
| | | throw new YamiShopBindException("要翻译的内容不能为空"); |
| | | throw new YamiShopBindException("Content to translate cannot be empty"); |
| | | } |
| | | if (StringUtils.isEmptyString(lang_trans)) { |
| | | throw new YamiShopBindException("翻译不能为空"); |
| | | throw new YamiShopBindException("Translation cannot be empty"); |
| | | } |
| | | |
| | | this.c2cTranslateService.saveTranslate(content, lang_trans); |
| | |
| | | String name = model.getName(); |
| | | String trans = model.getTrans(); |
| | | if (StringUtils.isEmpty(name)) { |
| | | throw new YamiShopBindException("要翻译的内容不能为空"); |
| | | throw new YamiShopBindException("Content to translate cannot be empty"); |
| | | } |
| | | if (StringUtils.isEmpty(trans)) { |
| | | throw new YamiShopBindException("翻译不能为空"); |
| | | throw new YamiShopBindException("Translation cannot be empty"); |
| | | } |
| | | |
| | | c2cTranslateService.saveTranslate(name, trans); |