From f26537e926d7ad2d725e059700142ba14c0c2b1f Mon Sep 17 00:00:00 2001 From: jiangqs <jiangqs> Date: 星期三, 12 七月 2023 21:04:27 +0800 Subject: [PATCH] 定时任务延时任务 --- ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/config/CustomConfigServiceImpl.java | 46 ++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 46 insertions(+), 0 deletions(-) diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/config/CustomConfigServiceImpl.java b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/config/CustomConfigServiceImpl.java index b3a48fa..c795cc2 100644 --- a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/config/CustomConfigServiceImpl.java +++ b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/config/CustomConfigServiceImpl.java @@ -6,6 +6,7 @@ import com.ruoyi.common.core.utils.StringUtils; import com.ruoyi.system.api.constant.ConfigEnum; import com.ruoyi.system.api.domain.poji.config.Activeness; +import com.ruoyi.system.api.domain.vo.AppOtherConfigGetVo; import com.ruoyi.system.api.domain.vo.MgtBulletinBoardVo; import com.ruoyi.system.api.service.RemoteActivityService; import com.ruoyi.system.api.service.RemoteMemberService; @@ -591,4 +592,49 @@ return mgtBulletinBoardVo; } + /** + * @description 获取其他设置 + * @author jqs + * @date 2023/7/12 15:28 + * @param + * @return AppOtherConfigGetVo + */ + @Override + public AppOtherConfigGetVo getAppOtherConfigGetVo(){ + AppOtherConfigGetVo appOtherConfigGetVo = new AppOtherConfigGetVo(); + //获取自定义配置 + List<CustomConfig> customConfigList = customConfigMapper.selectList(new LambdaQueryWrapper<CustomConfig>().eq(CustomConfig::getDelFlag, 0)); + Optional.ofNullable(customConfigList).ifPresent(list -> { + Map<String, CustomConfig> configMap = list.stream().collect(Collectors.toMap(CustomConfig::getConfigKey, Function.identity())); + // 遍历配置映射,设置相应的属性值 + configMap.forEach((key, value) -> { + switch (key) { + case "SHARE_INTEGRAL": + appOtherConfigGetVo.setShareIntegral(Integer.valueOf(value.getConfigValue())); + break; + case "SUGGEST_PLATFORM_INTEGRAL": + appOtherConfigGetVo.setSuggestPlatformIntegral(Integer.valueOf(value.getConfigValue())); + break; + case "SIGN_IN_INTEGRAL": + appOtherConfigGetVo.setSignInIntegral(Integer.valueOf(value.getConfigValue())); + break; + case "SUGGEST_SHOP_INTEGRAL": + appOtherConfigGetVo.setSuggestShopIntegral(Integer.valueOf(value.getConfigValue())); + break; + case "PAY_MONEY_INTEGRAL": + appOtherConfigGetVo.setPayMoneyIntegral(Integer.valueOf(value.getConfigValue())); + break; + case "ORDER_AUTO_CANCEL_TIME": + appOtherConfigGetVo.setOrderAutoCancelTime(Integer.valueOf(value.getConfigValue())); + break; + case "HOME_STYLE": + appOtherConfigGetVo.setHomeStyle(Integer.valueOf(value.getConfigValue())); + break; + default: + break; + } + }); + }); + return appOtherConfigGetVo; + } } -- Gitblit v1.7.1