| | |
| | | import com.ruoyi.system.domain.pojo.config.Advert; |
| | | import com.ruoyi.system.domain.pojo.config.CustomConfig; |
| | | import com.ruoyi.system.domain.vo.MgtActivenessVo; |
| | | import com.ruoyi.system.domain.vo.MgtAllCustomConfigVo; |
| | | import com.ruoyi.system.domain.vo.MgtCustomConfigVo; |
| | | import com.ruoyi.system.domain.vo.MgtOperLogPageVo; |
| | | import com.ruoyi.system.mapper.config.CustomConfigMapper; |
| | |
| | | * @date 2023/6/7 15:02 |
| | | */ |
| | | @Override |
| | | public MgtCustomConfigVo getCustomConfig() { |
| | | MgtCustomConfigVo mgtCustomConfigVo = new MgtCustomConfigVo(); |
| | | public MgtAllCustomConfigVo getAllCustomConfig() { |
| | | MgtAllCustomConfigVo mgtAllCustomConfigVo = new MgtAllCustomConfigVo(); |
| | | //获取自定义配置 |
| | | List<CustomConfig> customConfigList = customConfigMapper.selectList(new LambdaQueryWrapper<CustomConfig>().eq(CustomConfig::getDelFlag, 0)); |
| | | Optional.ofNullable(customConfigList).ifPresent(list -> { |
| | |
| | | configMap.forEach((key, value) -> { |
| | | switch (key) { |
| | | case "SHARE_INTEGRAL": |
| | | mgtCustomConfigVo.setShareIntegral(Integer.valueOf(value.getValue())); |
| | | mgtAllCustomConfigVo.setShareIntegral(Integer.valueOf(value.getValue())); |
| | | break; |
| | | case "SUGGEST_PLATFORM_INTEGRAL": |
| | | mgtCustomConfigVo.setSuggestPlatformIntegral(Integer.valueOf(value.getValue())); |
| | | mgtAllCustomConfigVo.setSuggestPlatformIntegral(Integer.valueOf(value.getValue())); |
| | | break; |
| | | case "SIGN_IN_INTEGRAL": |
| | | mgtCustomConfigVo.setSignInIntegral(Integer.valueOf(value.getValue())); |
| | | mgtAllCustomConfigVo.setSignInIntegral(Integer.valueOf(value.getValue())); |
| | | break; |
| | | case "SUGGEST_SHOP_INTEGRAL": |
| | | mgtCustomConfigVo.setSuggestShopIntegral(Integer.valueOf(value.getValue())); |
| | | mgtAllCustomConfigVo.setSuggestShopIntegral(Integer.valueOf(value.getValue())); |
| | | break; |
| | | case "PAY_MONEY_INTEGRAL": |
| | | mgtCustomConfigVo.setPayMoneyIntegral(Integer.valueOf(value.getValue())); |
| | | mgtAllCustomConfigVo.setPayMoneyIntegral(Integer.valueOf(value.getValue())); |
| | | break; |
| | | case "ORDER_AUTO_CANCEL_TIME": |
| | | mgtCustomConfigVo.setOrderAutoCancelTime(Integer.valueOf(value.getValue())); |
| | | mgtAllCustomConfigVo.setOrderAutoCancelTime(Integer.valueOf(value.getValue())); |
| | | break; |
| | | case "HOME_STYLE": |
| | | mgtCustomConfigVo.setHomeStyle(Integer.valueOf(value.getValue())); |
| | | mgtAllCustomConfigVo.setHomeStyle(Integer.valueOf(value.getValue())); |
| | | break; |
| | | case "SHOP_EMERGENCY_DEGREE": |
| | | mgtCustomConfigVo.setShopEmergencyDegree(value.getValue()); |
| | | mgtAllCustomConfigVo.setShopEmergencyDegree(value.getValue()); |
| | | break; |
| | | case "SHOP_FOLLOW_TYPE": |
| | | mgtCustomConfigVo.setShopFollowType(value.getValue()); |
| | | mgtAllCustomConfigVo.setShopFollowType(value.getValue()); |
| | | break; |
| | | case "SHOP_CUSTOM_STATUS": |
| | | mgtCustomConfigVo.setShopCustomStatus(value.getValue()); |
| | | mgtAllCustomConfigVo.setShopCustomStatus(value.getValue()); |
| | | break; |
| | | case "SHOP_SOURCE_CHANNEL": |
| | | mgtCustomConfigVo.setShopSourceChannel(value.getValue()); |
| | | mgtAllCustomConfigVo.setShopSourceChannel(value.getValue()); |
| | | break; |
| | | case "MEMBER_SOURCE_CHANNEL": |
| | | mgtCustomConfigVo.setMemberSourceChannel(value.getValue()); |
| | | mgtAllCustomConfigVo.setMemberSourceChannel(value.getValue()); |
| | | break; |
| | | case "MEMBER_CHARACTER": |
| | | mgtCustomConfigVo.setMemberCharacter(value.getValue()); |
| | | mgtAllCustomConfigVo.setMemberCharacter(value.getValue()); |
| | | break; |
| | | case "MEMBER_LEVEL": |
| | | mgtCustomConfigVo.setMemberLevel(value.getValue()); |
| | | mgtAllCustomConfigVo.setMemberLevel(value.getValue()); |
| | | break; |
| | | case "MEMBER_TYPE": |
| | | mgtCustomConfigVo.setMemberType(value.getValue()); |
| | | mgtAllCustomConfigVo.setMemberType(value.getValue()); |
| | | break; |
| | | case "NURSE_PROBLEM": |
| | | mgtCustomConfigVo.setNurseProblem(value.getValue()); |
| | | mgtAllCustomConfigVo.setNurseProblem(value.getValue()); |
| | | break; |
| | | default: |
| | | break; |
| | |
| | | //获取广告配置 |
| | | Advert advert = advertService.getAdvert(); |
| | | if (advert != null) { |
| | | mgtCustomConfigVo.setHomeSlogan(advert.getAdContent()); |
| | | mgtCustomConfigVo.setHomeLogo(advert.getLogoUrl()); |
| | | mgtCustomConfigVo.setAdUrl(advert.getAdUrl()); |
| | | mgtCustomConfigVo.setTargetType(advert.getTargetType()); |
| | | mgtCustomConfigVo.setLinkUrl(advert.getLinkUrl()); |
| | | mgtCustomConfigVo.setJumpType(advert.getJumpType()); |
| | | mgtCustomConfigVo.setJumpId(advert.getJumpId()); |
| | | mgtAllCustomConfigVo.setHomeSlogan(advert.getAdContent()); |
| | | mgtAllCustomConfigVo.setHomeLogo(advert.getLogoUrl()); |
| | | mgtAllCustomConfigVo.setAdUrl(advert.getAdUrl()); |
| | | mgtAllCustomConfigVo.setTargetType(advert.getTargetType()); |
| | | mgtAllCustomConfigVo.setLinkUrl(advert.getLinkUrl()); |
| | | mgtAllCustomConfigVo.setJumpType(advert.getJumpType()); |
| | | mgtAllCustomConfigVo.setJumpId(advert.getJumpId()); |
| | | } |
| | | //获取活跃度配置 |
| | | List<Activeness> activenessList = activenessService.listActiveness(); |
| | |
| | | return mgtActivenessVo; |
| | | }) |
| | | .collect(Collectors.toList()); |
| | | mgtCustomConfigVo.setMgtActivenessVoList(mgtActivenessVoList); |
| | | mgtAllCustomConfigVo.setMgtActivenessVoList(mgtActivenessVoList); |
| | | } |
| | | return mgtCustomConfigVo; |
| | | return mgtAllCustomConfigVo; |
| | | } |
| | | |
| | | |
| | |
| | | public List<MgtOperLogPageVo> pageOperLog(Page page, MgtOperLogPageDto mgtOperLogPageDto){ |
| | | return customConfigMapper.pageOperLog(page, mgtOperLogPageDto); |
| | | } |
| | | |
| | | /** |
| | | * @description 获取单个自定义配置 |
| | | * @author jqs |
| | | * @date 2023/6/9 15:40 |
| | | * @param mgtCustomConfigDto |
| | | * @return MgtCustomConfigVo |
| | | */ |
| | | @Override |
| | | public MgtCustomConfigVo getCustomConfig(MgtCustomConfigDto mgtCustomConfigDto){ |
| | | CustomConfig customConfig = this.getByKey(mgtCustomConfigDto.getConfigType()); |
| | | MgtCustomConfigVo mgtCustomConfigVo = new MgtCustomConfigVo(); |
| | | mgtCustomConfigVo.setCustomConfig(customConfig.getValue()); |
| | | mgtCustomConfigVo.setConfigType(mgtCustomConfigDto.getConfigType()); |
| | | return mgtCustomConfigVo; |
| | | } |
| | | } |