package jnpf.dmsMapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper; import jnpf.dmsEntity.permission.entity.DmsDocumentEntity; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Select; import java.util.List; import java.util.UUID; @Mapper public interface DmsDocumentMapper extends BaseMapper { @Select("SELECT id, tenant_id, folder_id, document_no, name, document_type, responsible_dept_id, " + "created_by, created_at " + "FROM public.dms_documents WHERE tenant_id = #{tenantId} AND id = #{id}") DmsDocumentEntity selectByTenantAndId(@Param("tenantId") String tenantId, @Param("id") UUID id); @Select("SELECT id, tenant_id, folder_id, document_no, name, document_type, responsible_dept_id, " + "created_by, created_at FROM public.dms_documents " + "WHERE tenant_id = #{tenantId} AND id = #{id} FOR UPDATE") DmsDocumentEntity selectByTenantAndIdForUpdate(@Param("tenantId") String tenantId, @Param("id") UUID id); @Select({""}) List selectByTenantAndIds(@Param("tenantId") String tenantId, @Param("ids") List ids); }