44323
2024-01-26 aa6ffcaae173e0ba6372c90261b8a7d4b1fd6052
ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/config/CustomConfigServiceImpl.java
@@ -1,13 +1,17 @@
package com.ruoyi.system.service.impl.config;
import com.alibaba.fastjson.JSON;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
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.common.security.utils.SecurityUtils;
import com.ruoyi.system.api.constant.ConfigEnum;
import com.ruoyi.system.api.constant.SecurityConstant;
import com.ruoyi.system.api.domain.dto.BoardMemberTotalDto;
import com.ruoyi.system.api.domain.poji.config.Activeness;
import com.ruoyi.system.api.domain.poji.sys.SysUser;
import com.ruoyi.system.api.domain.vo.AppOtherConfigGetVo;
import com.ruoyi.system.api.domain.vo.MgtBulletinBoardVo;
import com.ruoyi.system.api.service.RemoteActivityService;
@@ -22,6 +26,8 @@
import com.ruoyi.system.domain.vo.MgtOperLogPageVo;
import com.ruoyi.system.mapper.config.CustomConfigMapper;
import com.ruoyi.system.service.config.*;
import com.ruoyi.system.service.sys.ISysUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
@@ -69,6 +75,12 @@
    @Resource
    private RedisService redisService;
    @Autowired
    private ISysUserService sysUserService;
    /**
     * @param key
@@ -663,25 +675,29 @@
     */
    @Override
    public MgtBulletinBoardVo getBulletinBoard(){
        List<Long> userIds = sysUserService.getScopeOfAuthorityUserId();
        // 创建 MgtBulletinBoardVo 对象
        MgtBulletinBoardVo mgtBulletinBoardVo = new MgtBulletinBoardVo();
        // 获取会员信息
        MgtBulletinBoardVo mgtBulletinBoardVoMember = remoteMemberService.boardMemberTotal().getData();
        BoardMemberTotalDto boardMemberTotalDto = new BoardMemberTotalDto();
        boardMemberTotalDto.setUserIds(userIds);
        MgtBulletinBoardVo mgtBulletinBoardVoMember = remoteMemberService.boardMemberTotal(boardMemberTotalDto).getData();
        mgtBulletinBoardVo.setMemberTotal(mgtBulletinBoardVoMember.getMemberTotal());
        mgtBulletinBoardVo.setMemberToday(mgtBulletinBoardVoMember.getMemberToday());
        // 获取推荐合作信息
        MgtBulletinBoardVo mgtBulletinBoardVoCustom = recommendCooperationService.boardMemberTotal();
        MgtBulletinBoardVo mgtBulletinBoardVoCustom = recommendCooperationService.boardMemberTotal(userIds);
        mgtBulletinBoardVo.setCustomTotal(mgtBulletinBoardVoCustom.getCustomTotal());
        mgtBulletinBoardVo.setCustomToday(mgtBulletinBoardVoCustom.getCustomToday());
        mgtBulletinBoardVo.setFollowUserToday(mgtBulletinBoardVoCustom.getFollowUserToday());
        // 获取店铺信息
        MgtBulletinBoardVo mgtBulletinBoardVoShop = remoteShopService.boardShopTotal().getData();
        MgtBulletinBoardVo mgtBulletinBoardVoShop = remoteShopService.boardShopTotal(boardMemberTotalDto).getData();
        mgtBulletinBoardVo.setShopTotal(mgtBulletinBoardVoShop.getShopTotal());
        mgtBulletinBoardVo.setAgencyTotal(mgtBulletinBoardVoShop.getAgencyTotal());
        mgtBulletinBoardVo.setDealerTotal(mgtBulletinBoardVoShop.getDealerTotal());
        mgtBulletinBoardVo.setFollowShopToday(mgtBulletinBoardVoShop.getFollowShopToday());
        // 获取订单信息
        MgtBulletinBoardVo mgtBulletinBoardVoOrder = remoteOrderService.boardOrderTotal().getData();
        MgtBulletinBoardVo mgtBulletinBoardVoOrder = remoteOrderService.boardOrderTotal(boardMemberTotalDto).getData();
        mgtBulletinBoardVo.setSalesTotal(mgtBulletinBoardVoOrder.getSalesTotal());
        mgtBulletinBoardVo.setUnUseOrderTotal(mgtBulletinBoardVoOrder.getUnUseOrderTotal());
        mgtBulletinBoardVo.setActivityOrderTotal(mgtBulletinBoardVoOrder.getActivityOrderTotal());