From 987e38327f849e1b13d8541246dde08d877db0e8 Mon Sep 17 00:00:00 2001
From: 陈昶聿 <chychen@nbjetron.com>
Date: 星期三, 07 一月 2026 14:10:43 +0800
Subject: [PATCH] 【市一】调整mapper获取ordid

---
 ruoyi-common/src/main/java/com/ruoyi/common/annotation/AutoInit.java |   39 +++++++++++++++++++++++++++++++++++++++
 1 files changed, 39 insertions(+), 0 deletions(-)

diff --git a/ruoyi-common/src/main/java/com/ruoyi/common/annotation/AutoInit.java b/ruoyi-common/src/main/java/com/ruoyi/common/annotation/AutoInit.java
new file mode 100644
index 0000000..449d430
--- /dev/null
+++ b/ruoyi-common/src/main/java/com/ruoyi/common/annotation/AutoInit.java
@@ -0,0 +1,39 @@
+package com.ruoyi.common.annotation;
+
+import java.lang.annotation.*;
+
+/**
+ * 鑷畾涔夋敞瑙� - 鑷姩濉厖orgid
+ *
+ * 浣跨敤鍦烘櫙锛�
+ * 鍦–ontroller鐨勫鍒犳敼鏌ユ柟娉曚笂娣诲姞姝ゆ敞瑙o紝浼氳嚜鍔ㄤ负鏂规硶鍙傛暟瀵硅薄濉厖褰撳墠鐧诲綍鐢ㄦ埛鐨刼rgid
+ *
+ * 绀轰緥锛�
+ * @AutoInit
+ * @PostMapping
+ * public AjaxResult add(@RequestBody YourEntity entity) {
+ *     // entity鐨刼rgid瀛楁浼氳鑷姩濉厖
+ *     return toAjax(yourService.insert(entity));
+ * }
+ *
+ * @author smartor
+ */
+@Target({ElementType.METHOD})
+@Retention(RetentionPolicy.RUNTIME)
+@Documented
+public @interface AutoInit {
+
+    /**
+     * 鏄惁瑕嗙洊宸叉湁鐨刼rgid鍊�
+     * 榛樿false锛氬鏋滃弬鏁板璞$殑orgid宸叉湁鍊硷紝鍒欎笉瑕嗙洊
+     * true锛氬己鍒惰鐩栦负褰撳墠鐢ㄦ埛鐨刼rgid
+     */
+    boolean override() default false;
+
+    /**
+     * 鎸囧畾瑕佸~鍏卭rgid鐨勫弬鏁板悕绉�
+     * 榛樿涓虹┖锛岃〃绀鸿嚜鍔ㄦ煡鎵惧苟濉厖鎵�鏈夊寘鍚玱rgid瀛楁鐨勫弬鏁�
+     * 濡傛灉鎸囧畾浜嗗弬鏁板悕锛屽垯鍙~鍏呮寚瀹氱殑鍙傛暟瀵硅薄
+     */
+    String[] paramNames() default {};
+}
\ No newline at end of file

--
Gitblit v1.9.3