From 34981c30a78e8bbd7791131059a9210f9928b62c Mon Sep 17 00:00:00 2001
From: 刘光辉 <347230014@qq.com>
Date: 星期四, 17 九月 2026 09:24:09 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master' into master

---
 jnpf-dms/jnpf-dms-biz/src/main/java/jnpf/dmsMapper/DmsDocumentMapper.java |   33 +++++++++++++++++++++++++++++++++
 1 files changed, 33 insertions(+), 0 deletions(-)

diff --git a/jnpf-dms/jnpf-dms-biz/src/main/java/jnpf/dmsMapper/DmsDocumentMapper.java b/jnpf-dms/jnpf-dms-biz/src/main/java/jnpf/dmsMapper/DmsDocumentMapper.java
new file mode 100644
index 0000000..fa1ec01
--- /dev/null
+++ b/jnpf-dms/jnpf-dms-biz/src/main/java/jnpf/dmsMapper/DmsDocumentMapper.java
@@ -0,0 +1,33 @@
+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<DmsDocumentEntity> {
+    @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({"<script>",
+            "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 IN",
+            "<foreach collection='ids' item='id' open='(' separator=',' close=')'>#{id}</foreach>",
+            "</script>"})
+    List<DmsDocumentEntity> selectByTenantAndIds(@Param("tenantId") String tenantId,
+                                                  @Param("ids") List<UUID> ids);
+}

--
Gitblit v1.8.0