mitao
2024-06-17 444a36ac307d1c9863a5f1dd38368598b089359f
ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/CustomConfigServiceImpl.java
@@ -60,7 +60,7 @@
    private Optional<CustomConfig> getCustomConfigByKey(String key) {
        return this.lambdaQuery()
                .eq(CustomConfig::getConfigType, key)
                .eq(CustomConfig::getConfigKey, key)
                .eq(CustomConfig::getDelFlag, 0).oneOpt();
    }
@@ -111,6 +111,11 @@
        this.saveOrUpdate(orderDescription);
    }
    /**
     * 售后设置
     *
     * @param dto 售后设置对象
     */
    @Override
    @Transactional(rollbackFor = Exception.class, propagation = Propagation.REQUIRES_NEW)
    public void saveAfterSaleSetting(MgtAfterSaleSettingDTO dto) {
@@ -133,4 +138,19 @@
        receiverNameConfig.setConfigValue(value);
        this.saveOrUpdate(receiverNameConfig);
    }
    /**
     * 获取售后设置
     *
     * @return List<CustomConfigVO>
     */
    @Override
    public List<CustomConfigVO> getAfterSaleSetting() {
        List<CustomConfig> list = this.lambdaQuery()
                .in(CustomConfig::getConfigType, ConfigEnum.RETURN_ADDRESS_USER_NAME,
                        ConfigEnum.RETURN_ADDRESS_USER_PHONE,
                        ConfigEnum.RETURN_ADDRESS_USER_ADDRESS, ConfigEnum.RETURN_CYCLE)
                .eq(CustomConfig::getDelFlag, 0).list();
        return BeanUtils.copyList(list, CustomConfigVO.class);
    }
}