123456789101112131415161718192021222324252627282930313233 |
- package com.gis.mapper;
- import com.gis.domain.po.FileEntity;
- import org.apache.ibatis.annotations.*;
- import org.springframework.stereotype.Component;
- import java.util.List;
- @Component
- @Mapper
- public interface FileMapper extends IBaseMapper<FileEntity, Long> {
- @Update(value = "update tb_file set fk_id = #{fkId}, type = #{type} where id = #{id} ")
- void setFkIdByIds(String id, Long fkId, String type);
- @Select(value = "select * from tb_file where rec_status = 'A' AND fk_id = #{fkId}")
- List<FileEntity> findByFkId(String fkId);
- @Delete(value = "DELETE FROM tb_file WHERE fk_id = #{fkId}")
- void deleteByFkId(String fkId);
- @Update(value = "update tb_file set cover = 0 where type = #{modelType} ")
- void setCoverDefault(String modelType);
- @Update(value = "update tb_file set cover = 1 where id = #{id}")
- void setCover(Long id);
- @Update(value = "update tb_file set cover = 0 where type = #{modelType} and fk_id = #{fkId} ")
- void setCoverByFkId(Long fkId, String modelType);
- }
|