package com.microservices.dms.resourceLibrary.mapper;

import java.util.Date;
import java.util.List;
import java.util.Map;

import com.microservices.common.datasource.annotation.Slave;
import com.microservices.dms.achievementLibrary.domain.ExpertTotallVo;
import com.microservices.dms.achievementLibrary.domain.KeyValueVo;
import com.microservices.dms.achievementLibrary.domain.MemoTotalVo;
import com.microservices.dms.behaviorImage.domain.AchievementBehaviorSumVo;
import com.microservices.dms.resourceLibrary.domain.ExpertResourceLibrary;
import com.microservices.dms.resourceLibrary.domain.vo.ExpertAttachmentVo;
import com.microservices.dms.resourceLibrary.domain.vo.KeyValVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

/**
 * 专家资源库Mapper接口
 * 
 * @author microservices
 * @date 2025-04-11
 */
@Mapper
@Slave
public interface ExpertResourceLibraryMapper 
{
    /**
     * 查询专家资源库
     * 
     * @param id 专家资源库主键
     * @return 专家资源库
     */
    public ExpertResourceLibrary selectExpertResourceLibraryById(Long id);

    /**
     * 查询专家资源库列表
     * 
     * @param expertResourceLibrary 专家资源库
     * @return 专家资源库集合
     */
    public List<ExpertResourceLibrary> selectExpertResourceLibraryList(ExpertResourceLibrary expertResourceLibrary);

    /**
     * 新增专家资源库
     * 
     * @param expertResourceLibrary 专家资源库
     * @return 结果
     */
    public int insertExpertResourceLibrary(ExpertResourceLibrary expertResourceLibrary);

    /**
     * 修改专家资源库
     * 
     * @param expertResourceLibrary 专家资源库
     * @return 结果
     */
    public int updateExpertResourceLibrary(ExpertResourceLibrary expertResourceLibrary);

    /**
     * 删除专家资源库
     * 
     * @param id 专家资源库主键
     * @return 结果
     */
    public int deleteExpertResourceLibraryById(Long id);

    /**
     * 批量删除专家资源库
     * 
     * @param ids 需要删除的数据主键集合
     * @return 结果
     */
    public int deleteExpertResourceLibraryByIds(Long[] ids);

    List<ExpertResourceLibrary> selectExpertResourceLibraryList2(ExpertResourceLibrary expertResourceLibrary);

    Long auditExpertCount();

    Long competitionAuditCount();

    Long taskAuditCount();

    Long expertResourceCount();

    Long auditTaskAuditExpertCount();

    Long auditCompetitionAuditExpertCount();


    List<KeyValueVo> getTitleRankStatistic();

    List<KeyValueVo> getExpertTypeStatistic();

    List<KeyValueVo> getHighestDegreeStatistic();

    List<KeyValueVo> getWorkplaceTypeStatistic();

    KeyValueVo getAuthenticationStatistic();

    Long getExpertTotal();

    List<KeyValueVo> getExpertTotalByYear();

    List<KeyValueVo> getReviewAreasStatistic();

    List<ExpertTotallVo> getExpertAduit();

    AchievementBehaviorSumVo getActDataStatisticById(@Param("id") Long id);

    AchievementBehaviorSumVo getWatchFavoriteStatusById(@Param("id") Long id, @Param("userId")Long userId);

    List<KeyValueVo> getMemoAduit();

    List<KeyValueVo> getIsOriginalStatistic();

    List<KeyValueVo> getMemoTotalByYear();

    List<KeyValueVo> getForumSectionStatistic();

    List<KeyValueVo> getAddMemoStatistic();

    List<MemoTotalVo> getTop5Memos();

    List<KeyValVo<String, Long>> get7DayPaise(@Param("s") Date s, @Param("e") Date e);

    ExpertAttachmentVo getExpertInfoById(@Param("expertId") Long expertId);

    Map<String, Object> getAttachmentInfo(@Param("id") Long id);
}
