| | |
| | | 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; |
| | |
| | | |
| | | @Resource |
| | | private StaffSuggestService staffSuggestService; |
| | | |
| | | @Resource |
| | | private RedisService redisService; |
| | | |
| | | /** |
| | | * @param key |
| | |
| | | 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); |
| | |
| | | } |
| | | |
| | | /** |
| | | * @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 |