This is an automated email from the ASF dual-hosted git repository.
liuhongyu pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/shenyu.git
The following commit(s) were added to refs/heads/master by this push:
new 3c36999db1 [type:improve] add pluginRelId field for query (#5814)
3c36999db1 is described below
commit 3c36999db1bd07febed0cda2787d6c2de0730974
Author: VampireAchao <[email protected]>
AuthorDate: Wed Nov 27 08:45:43 2024 +0800
[type:improve] add pluginRelId field for query (#5814)
Co-authored-by: aias00 <[email protected]>
---
.../shenyu/admin/model/vo/NamespacePluginVO.java | 23 ++++++++++++++++++++++
.../mappers/namespace-plugin-rel-sqlmap.xml | 5 +++--
2 files changed, 26 insertions(+), 2 deletions(-)
diff --git
a/shenyu-admin/src/main/java/org/apache/shenyu/admin/model/vo/NamespacePluginVO.java
b/shenyu-admin/src/main/java/org/apache/shenyu/admin/model/vo/NamespacePluginVO.java
index 240ab00ea9..f312f5bc76 100644
---
a/shenyu-admin/src/main/java/org/apache/shenyu/admin/model/vo/NamespacePluginVO.java
+++
b/shenyu-admin/src/main/java/org/apache/shenyu/admin/model/vo/NamespacePluginVO.java
@@ -40,6 +40,11 @@ public class NamespacePluginVO extends PluginVO implements
Serializable {
*/
private String namespaceId;
+ /**
+ * namespace id.
+ */
+ private String pluginRelId;
+
/**
* plugin jar byte.
*/
@@ -112,6 +117,24 @@ public class NamespacePluginVO extends PluginVO implements
Serializable {
this.pluginId = pluginId;
}
+ /**
+ * Gets the plugin rel id.
+ *
+ * @return the plugin rel id
+ */
+ public String getPluginRelId() {
+ return pluginRelId;
+ }
+
+ /**
+ * set pluginRelId.
+ *
+ * @param pluginRelId pluginRelId
+ */
+ public void setPluginRelId(final String pluginRelId) {
+ this.pluginRelId = pluginRelId;
+ }
+
/**
* Gets the value of file.
*
diff --git
a/shenyu-admin/src/main/resources/mappers/namespace-plugin-rel-sqlmap.xml
b/shenyu-admin/src/main/resources/mappers/namespace-plugin-rel-sqlmap.xml
index 6970e65898..364fea73db 100644
--- a/shenyu-admin/src/main/resources/mappers/namespace-plugin-rel-sqlmap.xml
+++ b/shenyu-admin/src/main/resources/mappers/namespace-plugin-rel-sqlmap.xml
@@ -70,12 +70,13 @@
#{namespacePluginRelDO.dateUpdated, jdbcType=TIMESTAMP})
</foreach>
</insert>
-
+
<select id="selectByQuery"
parameterType="org.apache.shenyu.admin.model.query.NamespacePluginQuery"
resultType="org.apache.shenyu.admin.model.vo.NamespacePluginVO">
SELECT
npr.namespace_id AS namespaceId,
npr.plugin_id AS id,
+ npr.id AS pluginRelId,
npr.config AS config,
npr.sort AS sort,
npr.enabled AS enabled,
@@ -352,7 +353,7 @@
#{id, jdbcType=VARCHAR}
</foreach>
</update>
-
+
<update id="updateEnableByNamespaceIdAndPluginIdList">
UPDATE namespace_plugin_rel
SET enabled = #{enabled, jdbcType=TINYINT}