| | |
| | | } |
| | | |
| | | /** |
| | | * @description 修改统一分成 |
| | | * @author jqs |
| | | * @date 2023/9/4 18:05 |
| | | * @param mgtShopCommonProportionEditDto |
| | | * @return void |
| | | */ |
| | | @Override |
| | | public void editShopProportion(MgtShopCommonProportionEditDto mgtShopCommonProportionEditDto){ |
| | | // 获取平台统一分成的配置 |
| | | CustomConfig customConfig = getByKey(ConfigEnum.SHOP_COMMON_PROPORTION.getKey()); |
| | | // 如果配置不存在,则创建一个新的配置 |
| | | if (customConfig == null) { |
| | | customConfig = new CustomConfig(); |
| | | customConfig.setCreateTime(new Date()); |
| | | customConfig.setDelFlag(0); |
| | | } |
| | | // 设置配置的类型、键、名称、值和更新时间 |
| | | customConfig.setConfigType(ConfigEnum.SHOP_COMMON_PROPORTION.getKeyType()); |
| | | customConfig.setConfigKey(ConfigEnum.SHOP_COMMON_PROPORTION.getKey()); |
| | | customConfig.setConfigName(ConfigEnum.SHOP_COMMON_PROPORTION.getKeyName()); |
| | | customConfig.setConfigValue(mgtShopCommonProportionEditDto.getShopCommonProportion()); |
| | | customConfig.setUpdateTime(new Date()); |
| | | // 保存或更新配置 |
| | | this.saveOrUpdate(customConfig); |
| | | redisService.setCacheObject(SecurityConstant.SHOP_COMMON_PROPORTION,mgtShopCommonProportionEditDto.getShopCommonProportion()); |
| | | } |
| | | |
| | | /** |
| | | * @param |
| | | * @return MgtCustomConfigVo |
| | | * @description 平台获取自定义配置 |