puzhibing
2024-01-24 8da101629c47cec91d68f785b0f5e829d4a9bab1
ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/config/CustomConfigServiceImpl.java
@@ -5,9 +5,11 @@
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.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 +24,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 +73,12 @@
    @Resource
    private RedisService redisService;
    @Autowired
    private ISysUserService sysUserService;
    /**
     * @param key
@@ -663,25 +673,26 @@
     */
    @Override
    public MgtBulletinBoardVo getBulletinBoard(){
        List<Long> userIds = sysUserService.getScopeOfAuthorityUserId();
        // 创建 MgtBulletinBoardVo 对象
        MgtBulletinBoardVo mgtBulletinBoardVo = new MgtBulletinBoardVo();
        // 获取会员信息
        MgtBulletinBoardVo mgtBulletinBoardVoMember = remoteMemberService.boardMemberTotal().getData();
        MgtBulletinBoardVo mgtBulletinBoardVoMember = remoteMemberService.boardMemberTotal(userIds).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(userIds).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(userIds).getData();
        mgtBulletinBoardVo.setSalesTotal(mgtBulletinBoardVoOrder.getSalesTotal());
        mgtBulletinBoardVo.setUnUseOrderTotal(mgtBulletinBoardVoOrder.getUnUseOrderTotal());
        mgtBulletinBoardVo.setActivityOrderTotal(mgtBulletinBoardVoOrder.getActivityOrderTotal());