package com.microservices.dms.behaviorImage.mapper;

import com.microservices.common.datasource.annotation.Slave;
import com.microservices.dms.achievementLibrary.domain.KeyValueVo;
import com.microservices.dms.behaviorImage.domain.AchievementBehaviorSumVo;
import com.microservices.dms.behaviorImage.domain.ActivityUserLibrary;
import com.microservices.dms.behaviorImage.domain.BehaviorImageWeight;
import com.microservices.dms.behaviorImage.domain.UserTypeTotalVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
@Slave
public interface BehaviorImageMapper {
    AchievementBehaviorSumVo getBehaviorSumListByType();

    List<KeyValueVo> getWeightListByType(@Param("achievementsImage") String achievementsImage);

    Long getFavoriteSumByAchievementId(@Param("id") Long id,@Param("achievementsImage") String achievementsImage);

    Long getSearchSumByAchievementId(@Param("id") Long id,@Param("achievementsImage") String achievementsImage);

    Long getWatchSumByAchievementId(@Param("id") Long id,@Param("achievementsImage") String achievementsImage);

    Long getFileDownloadSumByAchievementId(@Param("id") Long id,@Param("achievementsImage") String achievementsImage);

    Long getClickSumByAchievementId(@Param("id") Long id, @Param("achievementsImage") String achievementsImage);

    /**
     * 查询画像行为权重
     *
     * @param id 画像行为权重主键
     * @return 画像行为权重
     */
    public BehaviorImageWeight selectBehaviorImageWeightById(Long id);

    /**
     * 查询画像行为权重列表
     *
     * @param behaviorImageWeight 画像行为权重
     * @return 画像行为权重集合
     */
    public List<BehaviorImageWeight> selectBehaviorImageWeightList(BehaviorImageWeight behaviorImageWeight);

    /**
     * 新增画像行为权重
     *
     * @param behaviorImageWeight 画像行为权重
     * @return 结果
     */
    public int insertBehaviorImageWeight(BehaviorImageWeight behaviorImageWeight);

    /**
     * 修改画像行为权重
     *
     * @param behaviorImageWeight 画像行为权重
     * @return 结果
     */
    public int updateBehaviorImageWeight(BehaviorImageWeight behaviorImageWeight);

    /**
     * 删除画像行为权重
     *
     * @param id 画像行为权重主键
     * @return 结果
     */
    public int deleteBehaviorImageWeightById(Long id);

    /**
     * 批量删除画像行为权重
     *
     * @param ids 需要删除的数据主键集合
     * @return 结果
     */
    public int deleteBehaviorImageWeightByIds(Long[] ids);

    List<KeyValueVo> getUserProjecttatistic(@Param("userId")Long userId);

    List<KeyValueVo> getUserTaskStatistic(@Param("userId")Long userId);

    List<ActivityUserLibrary> selectActivityUserLibraryList(ActivityUserLibrary activityUserLibrary);

    Long getrelatedProjectCount(@Param("userId")Long userId);

    Long getrelatedTaskCount(@Param("userId")Long userId);

    List<KeyValueVo> getUserCompStatistic(@Param("userId")Long userId);

    Long getrelatedCompetitionCount(@Param("userId")Long userId);

    List<KeyValueVo> getUserMemoStatistic(@Param("userId")Long userId);

    Long getrelatedMemoCount(@Param("userId")Long userId);

    List<KeyValueVo> getUserExperttatistic(@Param("userId")Long userId);

    List<UserTypeTotalVo> getUserTypeStatistic(@Param("userId")Long userId);

    List<KeyValueVo> getActivityStatistic();

    List<ActivityUserLibrary> selectActivityUserLibraryListAll(ActivityUserLibrary activityUserLibrary);

    UserTypeTotalVo getUserBehaviorSum(@Param("userId")Long userId);
}
