This is an automated email from the ASF dual-hosted git repository.

dockerzhang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/inlong.git


The following commit(s) were added to refs/heads/master by this push:
     new 6f261ceda [INLONG-6720][Manager] Implement 
InlongClusterEntityMapper.selectByClusterTag (#6721)
6f261ceda is described below

commit 6f261ceda886d4d686a901bc8647239e4e94534e
Author: fuweng11 <[email protected]>
AuthorDate: Fri Dec 2 23:28:43 2022 +0800

    [INLONG-6720][Manager] Implement 
InlongClusterEntityMapper.selectByClusterTag (#6721)
---
 .../inlong/manager/dao/mapper/InlongClusterEntityMapper.java |  2 +-
 .../src/main/resources/mappers/InlongClusterEntityMapper.xml | 12 ++++++++++++
 2 files changed, 13 insertions(+), 1 deletion(-)

diff --git 
a/inlong-manager/manager-dao/src/main/java/org/apache/inlong/manager/dao/mapper/InlongClusterEntityMapper.java
 
b/inlong-manager/manager-dao/src/main/java/org/apache/inlong/manager/dao/mapper/InlongClusterEntityMapper.java
index 1f993527e..d8229fc28 100644
--- 
a/inlong-manager/manager-dao/src/main/java/org/apache/inlong/manager/dao/mapper/InlongClusterEntityMapper.java
+++ 
b/inlong-manager/manager-dao/src/main/java/org/apache/inlong/manager/dao/mapper/InlongClusterEntityMapper.java
@@ -55,7 +55,7 @@ public interface InlongClusterEntityMapper {
     @Options(resultSetType = ResultSetType.FORWARD_ONLY, fetchSize = 
Integer.MIN_VALUE)
     Cursor<SortSourceClusterInfo> selectAllClusters();
 
-    List<InlongClusterEntity> selectByClusterTag(String clusterTag);
+    List<InlongClusterEntity> selectByClusterTag(@Param("clusterTag") String 
clusterTag);
 
     int updateById(InlongClusterEntity record);
 
diff --git 
a/inlong-manager/manager-dao/src/main/resources/mappers/InlongClusterEntityMapper.xml
 
b/inlong-manager/manager-dao/src/main/resources/mappers/InlongClusterEntityMapper.xml
index 931ca5f83..69be71a65 100644
--- 
a/inlong-manager/manager-dao/src/main/resources/mappers/InlongClusterEntityMapper.xml
+++ 
b/inlong-manager/manager-dao/src/main/resources/mappers/InlongClusterEntityMapper.xml
@@ -164,6 +164,18 @@
         </where>
         order by modify_time desc
     </select>
+    <select id="selectByClusterTag" 
resultType="org.apache.inlong.manager.dao.entity.InlongClusterEntity">
+        select
+        <include refid="Base_Column_List"/>
+        from inlong_cluster
+        <where>
+            is_deleted = 0
+            <if test="clusterTag != null and clusterTag != ''">
+                and find_in_set(#{clusterTag, jdbcType=VARCHAR}, cluster_tags)
+            </if>
+        </where>
+        order by modify_time desc
+    </select>
     <select id="selectAllClusters" 
resultType="org.apache.inlong.manager.pojo.sort.standalone.SortSourceClusterInfo"
 >
         select name,
                type,

Reply via email to