12345678910111213141516171819202122232425262728293031 |
- package com.gis.mapper;
- import com.gis.domain.po.FileEntity;
- import org.apache.ibatis.annotations.Mapper;
- import org.apache.ibatis.annotations.Select;
- import org.apache.ibatis.annotations.Update;
- import org.springframework.stereotype.Component;
- import java.util.List;
- @Component
- @Mapper
- public interface FileMapper extends IBaseMapper<FileEntity, Long> {
- @Update("update tb_file set is_index = 1 , update_time = NOW() where is_delete = 0 and id = #{fileId} ")
- void indexEnabled(Long fileId);
- @Update("update tb_file set is_index = 0 , update_time = NOW() where is_delete = 0 and is_index = 1 and module = #{module} and module_id = #{moduleId}")
- void indexDisable(Long moduleId, String module);
- @Update("update tb_file set module_id = #{moduleId} , update_time = NOW() where is_delete = 0 and module = #{module} and id in ( ${fileIds} )")
- void addModuleIdToFile(String fileIds, Long moduleId, String module);
- @Select("select * from tb_file where is_delete = 0 and is_index = 1 and module = #{module} and module_id = #{moduleId} limit 1")
- List<FileEntity> findIndexByModule(Long moduleId, String module);
- @Select("select * from tb_file where is_delete = 0 and module = #{module} and module_id = #{moduleId} ")
- List<FileEntity> findByModuleId(Long moduleId, String module);
- }
|