From bb58e108a9da48d84b84d30b73c01106dd642550 Mon Sep 17 00:00:00 2001 From: jiangqs <jiangqs> Date: 星期三, 02 八月 2023 19:58:49 +0800 Subject: [PATCH] bug --- ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/config/CustomConfigServiceImpl.java | 86 ++++++++++++++++++++++++++++++++++++++----- 1 files changed, 76 insertions(+), 10 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 c795cc2..303589a 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 @@ -4,7 +4,9 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.ruoyi.common.core.utils.StringUtils; +import com.ruoyi.common.redis.service.RedisService; import com.ruoyi.system.api.constant.ConfigEnum; +import com.ruoyi.system.api.constant.SecurityConstant; 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; @@ -65,6 +67,9 @@ @Resource private StaffSuggestService staffSuggestService; + @Resource + private RedisService redisService; + /** * @param key * @return CustomConfig @@ -99,6 +104,33 @@ customConfig.setConfigKey(ConfigEnum.PLATFORM_SERVICE_PHONE.getKey()); customConfig.setConfigName(ConfigEnum.PLATFORM_SERVICE_PHONE.getKeyName()); customConfig.setConfigValue(mgtServiceMobileEditDto.getServiceMobile()); + customConfig.setUpdateTime(new Date()); + // 保存或更新配置 + this.saveOrUpdate(customConfig); + } + + /** + * @description 修改客服二维码 + * @author jqs + * @date 2023/7/25 16:17 + * @param mgtServiceCodeEditDto + * @return void + */ + @Override + public void editServiceCode(MgtServiceCodeEditDto mgtServiceCodeEditDto){ + // 获取平台服务电话的配置 + CustomConfig customConfig = getByKey(ConfigEnum.PLATFORM_SERVICE_CODE.getKey()); + // 如果配置不存在,则创建一个新的配置 + if (customConfig == null) { + customConfig = new CustomConfig(); + customConfig.setCreateTime(new Date()); + customConfig.setDelFlag(0); + } + // 设置配置的类型、键、名称、值和更新时间 + customConfig.setConfigType(ConfigEnum.PLATFORM_SERVICE_CODE.getKeyType()); + customConfig.setConfigKey(ConfigEnum.PLATFORM_SERVICE_CODE.getKey()); + customConfig.setConfigName(ConfigEnum.PLATFORM_SERVICE_CODE.getKeyName()); + customConfig.setConfigValue(mgtServiceCodeEditDto.getServiceCodeUrl()); customConfig.setUpdateTime(new Date()); // 保存或更新配置 this.saveOrUpdate(customConfig); @@ -181,6 +213,7 @@ mgtAllCustomConfigVo.setHomeLogo(advert.getLogoUrl()); mgtAllCustomConfigVo.setAdUrl(advert.getAdUrl()); mgtAllCustomConfigVo.setTargetType(advert.getTargetType()); + mgtAllCustomConfigVo.setLinkType(advert.getLinkType()); mgtAllCustomConfigVo.setLinkUrl(advert.getLinkUrl()); mgtAllCustomConfigVo.setJumpType(advert.getJumpType()); mgtAllCustomConfigVo.setJumpId(advert.getJumpId()); @@ -257,30 +290,39 @@ customConfig.setCreateTime(updateTime); customConfig.setUpdateTime(updateTime); switch (configEnum) { + //分享小程序可获得积分 case SHARE_INTEGRAL: customConfig.setConfigValue(mgtOtherConfigEditDto.getShareIntegral().toString()); this.saveOrUpdate(customConfig); break; + //平台建议可获得积分 case SUGGEST_PLATFORM_INTEGRAL: customConfig.setConfigValue(mgtOtherConfigEditDto.getSuggestPlatformIntegral().toString()); this.saveOrUpdate(customConfig); break; + //每日签到可获得积分 case SIGN_IN_INTEGRAL: customConfig.setConfigValue(mgtOtherConfigEditDto.getSignInIntegral().toString()); this.saveOrUpdate(customConfig); break; + //门店建议可获得积分 case SUGGEST_SHOP_INTEGRAL: customConfig.setConfigValue(mgtOtherConfigEditDto.getSuggestShopIntegral().toString()); this.saveOrUpdate(customConfig); break; + //C端订单自动取消时间 case ORDER_AUTO_CANCEL_TIME: customConfig.setConfigValue(mgtOtherConfigEditDto.getOrderAutoCancelTime().toString()); + redisService.setCacheObject(SecurityConstant.AUTO_CANCEL_ORDER_TIME,mgtOtherConfigEditDto.getOrderAutoCancelTime()); this.saveOrUpdate(customConfig); break; + //购物满1元可获得积分 case PAY_MONEY_INTEGRAL: customConfig.setConfigValue(mgtOtherConfigEditDto.getPayMoneyIntegral().toString()); + redisService.setCacheObject(SecurityConstant.PAY_MONEY_INTEGRAL,mgtOtherConfigEditDto.getPayMoneyIntegral()); this.saveOrUpdate(customConfig); break; + //首页风格 case HOME_STYLE: customConfig.setConfigValue(mgtOtherConfigEditDto.getHomeStyle().toString()); this.saveOrUpdate(customConfig); @@ -325,8 +367,8 @@ customConfig.setUpdateTime(updateTime); if(oldValue!=null&&!oldValue.isEmpty()){ handleChangeConfig(oldValue, newValue, key); - updatedCustomConfigs.add(customConfig); } + updatedCustomConfigs.add(customConfig); break; case "SHOP_FOLLOW_TYPE": newValue = mgtShopConfigEditDto.getShopFollowType(); @@ -334,8 +376,8 @@ customConfig.setUpdateTime(updateTime); if(oldValue!=null&&!oldValue.isEmpty()){ handleChangeConfig(oldValue, newValue, key); - updatedCustomConfigs.add(customConfig); } + updatedCustomConfigs.add(customConfig); break; case "SHOP_CUSTOM_STATUS": newValue = mgtShopConfigEditDto.getShopCustomStatus(); @@ -343,8 +385,8 @@ customConfig.setUpdateTime(updateTime); if(oldValue!=null&&!oldValue.isEmpty()){ handleChangeConfig(oldValue, newValue, key); - updatedCustomConfigs.add(customConfig); } + updatedCustomConfigs.add(customConfig); break; case "SHOP_SOURCE_CHANNEL": newValue = mgtShopConfigEditDto.getShopSourceChannel(); @@ -352,8 +394,8 @@ customConfig.setUpdateTime(updateTime); if(oldValue!=null&&!oldValue.isEmpty()){ handleChangeConfig(oldValue, newValue, key); - updatedCustomConfigs.add(customConfig); } + updatedCustomConfigs.add(customConfig); break; default: break; @@ -403,8 +445,8 @@ customConfig.setUpdateTime(updateTime); if(oldValue!=null&&!oldValue.isEmpty()){ handleChangeConfig(oldValue, newValue, key); - updatedCustomConfigs.add(customConfig); } + updatedCustomConfigs.add(customConfig); break; case "MEMBER_CHARACTER": newValue = mgtMemberConfigEditDto.getMemberCharacter(); @@ -412,8 +454,8 @@ customConfig.setUpdateTime(updateTime); if(oldValue!=null&&!oldValue.isEmpty()){ handleChangeConfig(oldValue, newValue, key); - updatedCustomConfigs.add(customConfig); } + updatedCustomConfigs.add(customConfig); break; case "MEMBER_LEVEL": newValue = mgtMemberConfigEditDto.getMemberLevel(); @@ -421,8 +463,8 @@ customConfig.setUpdateTime(updateTime); if(oldValue!=null&&!oldValue.isEmpty()){ handleChangeConfig(oldValue, newValue, key); - updatedCustomConfigs.add(customConfig); } + updatedCustomConfigs.add(customConfig); break; case "MEMBER_TYPE": newValue = mgtMemberConfigEditDto.getMemberType(); @@ -430,8 +472,8 @@ customConfig.setUpdateTime(updateTime); if(oldValue!=null&&!oldValue.isEmpty()){ handleChangeConfig(oldValue, newValue, key); - updatedCustomConfigs.add(customConfig); } + updatedCustomConfigs.add(customConfig); break; case "NURSE_PROBLEM": newValue = mgtMemberConfigEditDto.getNurseProblem(); @@ -439,8 +481,8 @@ customConfig.setUpdateTime(updateTime); if(oldValue!=null&&!oldValue.isEmpty()){ handleChangeConfig(oldValue, newValue, key); - updatedCustomConfigs.add(customConfig); } + updatedCustomConfigs.add(customConfig); break; default: break; @@ -533,6 +575,30 @@ } /** + * @description 删除日志 + * @author jqs + * @date 2023/8/1 19:39 + * @param + * @return void + */ + @Override + public void deleteOperlog(){ + customConfigMapper.deleteOperlog(); + } + + /** + * @description + * @author jqs + * @date 2023/7/13 15:52 + * @param + * @return List<String> + */ + @Override + public List<String> listOperTitle(){ + return customConfigMapper.listOperTitle(); + } + + /** * @description 获取单个自定义配置 * @author jqs * @date 2023/6/9 15:40 @@ -568,13 +634,13 @@ MgtBulletinBoardVo mgtBulletinBoardVoCustom = recommendCooperationService.boardMemberTotal(); mgtBulletinBoardVo.setCustomTotal(mgtBulletinBoardVoCustom.getCustomTotal()); mgtBulletinBoardVo.setCustomToday(mgtBulletinBoardVoCustom.getCustomToday()); + mgtBulletinBoardVo.setFollowUserToday(mgtBulletinBoardVoCustom.getFollowUserToday()); // 获取店铺信息 MgtBulletinBoardVo mgtBulletinBoardVoShop = remoteShopService.boardShopTotal().getData(); mgtBulletinBoardVo.setShopTotal(mgtBulletinBoardVoShop.getShopTotal()); mgtBulletinBoardVo.setAgencyTotal(mgtBulletinBoardVoShop.getAgencyTotal()); mgtBulletinBoardVo.setDealerTotal(mgtBulletinBoardVoShop.getDealerTotal()); mgtBulletinBoardVo.setFollowShopToday(mgtBulletinBoardVoShop.getFollowShopToday()); - mgtBulletinBoardVo.setFollowUserToday(0); // 获取订单信息 MgtBulletinBoardVo mgtBulletinBoardVoOrder = remoteOrderService.boardOrderTotal().getData(); mgtBulletinBoardVo.setSalesTotal(mgtBulletinBoardVoOrder.getSalesTotal()); -- Gitblit v1.7.1