This is an automated email from the ASF dual-hosted git repository.
benjobs pushed a commit to branch dev-2.1.2
in repository https://gitbox.apache.org/repos/asf/incubator-streampark.git
The following commit(s) were added to refs/heads/dev-2.1.2 by this push:
new 5d381d8a3 [Improve] sync code from dev (#3375)
5d381d8a3 is described below
commit 5d381d8a357cb439022dec10f570f54aca2b208d
Author: VampireAchao <[email protected]>
AuthorDate: Sun Dec 3 10:48:07 2023 +0800
[Improve] sync code from dev (#3375)
* [Improve] fix myBatis query for like using concat function
---
.../src/main/resources/mapper/core/ApplicationMapper.xml | 6 +++---
.../src/main/resources/mapper/core/ProjectMapper.xml | 2 +-
.../src/main/resources/mapper/core/VariableMapper.xml | 6 +++---
.../src/main/resources/mapper/core/YarnQueueMapper.xml | 2 +-
.../src/main/resources/mapper/system/MemberMapper.xml | 6 +++---
.../src/main/resources/mapper/system/RoleMapper.xml | 2 +-
.../src/main/resources/mapper/system/TeamMapper.xml | 2 +-
.../src/main/resources/mapper/system/UserMapper.xml | 2 +-
8 files changed, 14 insertions(+), 14 deletions(-)
diff --git
a/streampark-console/streampark-console-service/src/main/resources/mapper/core/ApplicationMapper.xml
b/streampark-console/streampark-console-service/src/main/resources/mapper/core/ApplicationMapper.xml
index 9096158b5..950f62aff 100644
---
a/streampark-console/streampark-console-service/src/main/resources/mapper/core/ApplicationMapper.xml
+++
b/streampark-console/streampark-console-service/src/main/resources/mapper/core/ApplicationMapper.xml
@@ -161,10 +161,10 @@
and t.execution_mode = #{application.executionMode}
</if>
<if test="application.jobName != null and application.jobName !=
''">
- and t.job_name like '%${application.jobName}%'
+ and t.job_name like concat('%',#{application.jobName},'%')
</if>
<if test="application.projectName != null and
application.projectName != ''">
- and p.name like '%${application.projectName}%'
+ and p.name like concat('%',#{application.projectName},'%')
</if>
<if test="application.appId != null and application.appId != ''">
and t.app_id = #{application.appId}
@@ -183,7 +183,7 @@
</foreach>
</if>
<if test="application.tags != null and application.tags != ''">
- and t.tags like '%${application.tags}%'
+ and t.tags like concat('%',#{application.tags},'%')
</if>
</where>
</select>
diff --git
a/streampark-console/streampark-console-service/src/main/resources/mapper/core/ProjectMapper.xml
b/streampark-console/streampark-console-service/src/main/resources/mapper/core/ProjectMapper.xml
index 93f6bfe3f..e8a472956 100644
---
a/streampark-console/streampark-console-service/src/main/resources/mapper/core/ProjectMapper.xml
+++
b/streampark-console/streampark-console-service/src/main/resources/mapper/core/ProjectMapper.xml
@@ -73,7 +73,7 @@
<where>
t.team_id = #{project.teamId}
<if test="project.name != null and project.name != ''">
- and t.name like '%${project.name}%'
+ and t.name like concat('%',#{project.name},'%')
</if>
<if test="project.buildState != null">
and t.build_state = #{project.buildState}
diff --git
a/streampark-console/streampark-console-service/src/main/resources/mapper/core/VariableMapper.xml
b/streampark-console/streampark-console-service/src/main/resources/mapper/core/VariableMapper.xml
index 80b986876..fca40a20e 100644
---
a/streampark-console/streampark-console-service/src/main/resources/mapper/core/VariableMapper.xml
+++
b/streampark-console/streampark-console-service/src/main/resources/mapper/core/VariableMapper.xml
@@ -36,12 +36,12 @@
from t_variable v
inner join t_user u
on v.creator_id = u.user_id
- and v.team_id = ${variable.teamId}
+ and v.team_id = #{variable.teamId}
<if test="variable.description != null and variable.description != ''">
- and v.description like '%${variable.description}%'
+ and v.description like concat('%',#{variable.description},'%')
</if>
<if test="variable.variableCode != null and variable.variableCode !=
''">
- and v.variable_code like '%${variable.variableCode}%'
+ and v.variable_code like concat('%',#{variable.variableCode},'%')
</if>
</select>
diff --git
a/streampark-console/streampark-console-service/src/main/resources/mapper/core/YarnQueueMapper.xml
b/streampark-console/streampark-console-service/src/main/resources/mapper/core/YarnQueueMapper.xml
index 95e793751..f700f9a0c 100644
---
a/streampark-console/streampark-console-service/src/main/resources/mapper/core/YarnQueueMapper.xml
+++
b/streampark-console/streampark-console-service/src/main/resources/mapper/core/YarnQueueMapper.xml
@@ -33,7 +33,7 @@
team_id = #{yarnQueue.teamId}
</if>
<if test="yarnQueue.queueLabel != null and yarnQueue.queueLabel !=
''">
- and queue_label like '%${yarnQueue.queueLabel}%'
+ and queue_label like concat('%',#{yarnQueue.queueLabel},'%')
</if>
<if test="yarnQueue.createTimeFrom != null and
yarnQueue.createTimeFrom !=''">
and create_time > #{yarnQueue.createTimeFrom}
diff --git
a/streampark-console/streampark-console-service/src/main/resources/mapper/system/MemberMapper.xml
b/streampark-console/streampark-console-service/src/main/resources/mapper/system/MemberMapper.xml
index 83d678812..7e962456b 100644
---
a/streampark-console/streampark-console-service/src/main/resources/mapper/system/MemberMapper.xml
+++
b/streampark-console/streampark-console-service/src/main/resources/mapper/system/MemberMapper.xml
@@ -49,12 +49,12 @@
join t_role r
on r.role_id = tur.role_id
<where>
- tur.team_id = ${member.teamId}
+ tur.team_id = #{member.teamId}
<if test="member.userName != null and member.userName != ''">
- and u.username like '%${member.userName}%'
+ and u.username like concat('%',#{member.userName},'%')
</if>
<if test="member.roleName != null and member.roleName != ''">
- and r.role_name = '${member.roleName}'
+ and r.role_name = #{member.roleName}
</if>
<if test="member.createTimeFrom != null and member.createTimeFrom
!=''">
and tur.create_time > #{member.createTimeFrom}
diff --git
a/streampark-console/streampark-console-service/src/main/resources/mapper/system/RoleMapper.xml
b/streampark-console/streampark-console-service/src/main/resources/mapper/system/RoleMapper.xml
index e49a07bdf..ad4800dfb 100644
---
a/streampark-console/streampark-console-service/src/main/resources/mapper/system/RoleMapper.xml
+++
b/streampark-console/streampark-console-service/src/main/resources/mapper/system/RoleMapper.xml
@@ -29,7 +29,7 @@
select * from t_role
<where>
<if test="role.roleName != null and role.roleName != ''">
- and role_name like '%${role.roleName}%'
+ and role_name like concat('%',#{role.roleName},'%')
</if>
<if test="role.createTimeFrom != null and role.createTimeFrom
!=''">
and create_time > #{role.createTimeFrom}
diff --git
a/streampark-console/streampark-console-service/src/main/resources/mapper/system/TeamMapper.xml
b/streampark-console/streampark-console-service/src/main/resources/mapper/system/TeamMapper.xml
index a366a9d3e..59a6a9e18 100644
---
a/streampark-console/streampark-console-service/src/main/resources/mapper/system/TeamMapper.xml
+++
b/streampark-console/streampark-console-service/src/main/resources/mapper/system/TeamMapper.xml
@@ -29,7 +29,7 @@
select * from t_team
<where>
<if test="team.teamName != null and team.teamName != ''">
- and team_name like '%${team.teamName}%'
+ and team_name like concat('%',#{team.teamName},'%')
</if>
<if test="team.createTimeFrom != null and team.createTimeFrom
!=''">
and create_time > #{team.createTimeFrom}
diff --git
a/streampark-console/streampark-console-service/src/main/resources/mapper/system/UserMapper.xml
b/streampark-console/streampark-console-service/src/main/resources/mapper/system/UserMapper.xml
index aeec2eb4f..33ea34216 100644
---
a/streampark-console/streampark-console-service/src/main/resources/mapper/system/UserMapper.xml
+++
b/streampark-console/streampark-console-service/src/main/resources/mapper/system/UserMapper.xml
@@ -38,7 +38,7 @@
select * from t_user
<where>
<if test="user.username != null and user.username != ''">
- and username like '%${user.username}%'
+ and username like concat('%',#{user.username},'%')
</if>
<if test="user.createTimeFrom != null and user.createTimeFrom
!=''">
and create_time > #{user.createTimeFrom}