package com.mcwl.communityCenter.mapper;

import com.baomidou.mybatisplus.annotation.InterceptorIgnore;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.mcwl.communityCenter.domain.CommunityFile;
import com.mcwl.communityCenter.domain.CommunityFileLog;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface CommunityFileLogMapper extends BaseMapper<CommunityFileLog> {

    @InterceptorIgnore(tenantLine = "true")
    List<String> getUserAvatarList(@Param("tenantId")
                                   Long tenantId,
                                   @Param("communityId")
                                   Long communityId,
                                   @Param("communityFileId")
                                   Long communityFileId);

    @InterceptorIgnore(tenantLine = "true")
    Integer getDownloadCount(@Param("tenantId") Long tenantId,
                             @Param("communityId") Long communityId,
                             @Param("communityFileId") Long communityFileId);

    @InterceptorIgnore(tenantLine = "true")
    void saveCommunityFileLog(@Param("communityFileLog") CommunityFileLog communityFileLog);
}
