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 { @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 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); }