package com.sooka.system.service.impl;

import com.sooka.common.annotation.DataScope;
import com.sooka.system.domain.SysDept;
import com.sooka.system.mapper.SysIndexMapper;
import com.sooka.system.service.ISysIndexService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

/**
 * 【系统首页】Service业务层处理
 *
 * @author wangzhe
 * @date 2023-06-27
 */
@Service
public class SysIndexServiceImpl implements ISysIndexService
{

    @Resource
    private SysIndexMapper sysIndexMapper;

    /**
     * 查询接口数量
     */
    @Override
    public Integer getInterfaceCountAll(){
        return sysIndexMapper.getInterfaceCountAll();
    }
    /**
     * 查询接口故障
     */
    @Override
    public Integer getInterfaceCountError(){
        return sysIndexMapper.getInterfaceCountError();
    }

    /**
     * 接口调用频次
     */
    @Override
    public Long callFrequency(){
        return sysIndexMapper.callFrequency();
    }
    /**
     * 接口归集频次
     */
    @Override
    public Long pushFrequency(){
        return sysIndexMapper.pushFrequency();
    }
    /**
     * 接口共享频次
     */
    @Override
    public Long pullFrequency(){
        return sysIndexMapper.pullFrequency();
    }

    /**
     * 查询接入部门
     */
    @Override
    @DataScope(deptAlias = "d")
    public Integer joinUpDepts(SysDept sysDept){
        return sysIndexMapper.joinUpDepts(sysDept);
    }
}
