package cn.yinlihupo.mapper; import cn.yinlihupo.domain.entity.FileAttachment; import com.baomidou.mybatisplus.core.mapper.BaseMapper; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; import java.util.List; import java.util.Map; /** * 文件附件Mapper接口 */ @Mapper public interface FileAttachmentMapper extends BaseMapper { /** * 查询某业务实体的附件列表(含上传者信息) */ List> selectAttachmentsByRelated(@Param("relatedType") String relatedType, @Param("relatedId") Long relatedId); /** * 分页查询项目下所有附件(支持文件类型筛选) */ List> selectAttachmentsByProject(@Param("projectId") Long projectId, @Param("fileType") String fileType); /** * 统计用户上传文件数量和总大小 */ List> selectUploaderStats(@Param("projectId") Long projectId); }