Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ISSUE-3451] pgsql "like" syntax bug fixed. #3506

Merged
merged 1 commit into from
Jan 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -150,10 +150,10 @@
and t.execution_mode = #{app.executionMode}
</if>
<if test="app.jobName != null and app.jobName != ''">
and t.job_name like concat('%', CAST(#{app.jobName} AS CHAR), '%')
and t.job_name like concat('%', '${app.jobName}', '%')
</if>
<if test="app.projectName != null and app.projectName != ''">
and p.name like concat('%', CAST(#{app.projectName} AS CHAR), '%')
and p.name like concat('%', '${app.projectName}', '%')
</if>
<if test="app.appId != null and app.appId != ''">
and t.app_id = #{app.appId}
Expand All @@ -172,7 +172,7 @@
</foreach>
</if>
<if test="app.tags != null and app.tags != ''">
and t.tags like concat('%', CAST(#{app.tags} AS CHAR), '%')
and t.tags like concat('%', '${app.tags}', '%')
</if>
</where>
</select>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@
<where>
t.team_id = #{project.teamId}
<if test="project.name != null and project.name != ''">
and t.name like concat('%', CAST(#{project.name} AS CHAR), '%')
and t.name like concat('%', '${project.name}', '%')
</if>
<if test="project.buildState != null">
and t.build_state = #{project.buildState}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,10 @@
on v.creator_id = u.user_id
and v.team_id = ${resource.teamId}
<if test="resource.resourceName != null and resource.resourceName != ''">
and v.resourceName like concat('%', CAST(#{resource.resourceName} AS CHAR), '%')
and v.resourceName like concat('%', '${resource.resourceName}', '%')
</if>
<if test="resource.description != null and resource.description != ''">
and v.description like concat('%', CAST(#{resource.description} AS CHAR), '%')
and v.description like concat('%', '${resource.description}', '%')
</if>
</select>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,10 @@
on v.creator_id = u.user_id
and v.team_id = ${variable.teamId}
<if test="variable.description != null and variable.description != ''">
and v.description like concat('%', CAST(#{variable.description} AS CHAR), '%')
and v.description like concat('%', '${variable.description}', '%')
</if>
<if test="variable.variableCode != null and variable.variableCode != ''">
and v.variable_code like concat('%', CAST(#{variable.variableCode} AS CHAR), '%')
and v.variable_code like concat('%', '${variable.variableCode}', '%')
</if>
</select>

Expand All @@ -61,7 +61,7 @@
<where>
team_id = #{teamId}
<if test="keyword != null and keyword != ''">
and variable_code like concat('%', CAST(#{keyword} AS CHAR), '%') or description like concat('%', CAST(#{keyword} AS CHAR), '%')
and variable_code like concat('%', '${keyword}', '%') or description like concat('%', '${keyword}', '%')
</if>
</where>
</select>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
team_id = #{yarnQueue.teamId}
</if>
<if test="yarnQueue.queueLabel != null and yarnQueue.queueLabel != ''">
and queue_label like concat('%', CAST(#{yarnQueue.queueLabel} AS CHAR), '%')
and queue_label like concat('%', '${yarnQueue.queueLabel}', '%')
</if>
<if test="yarnQueue.createTimeFrom != null and yarnQueue.createTimeFrom !=''">
and create_time &gt; #{yarnQueue.createTimeFrom}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
<where>
tur.team_id = ${member.teamId}
<if test="member.userName != null and member.userName != ''">
and u.username like concat('%', CAST(#{member.userName} AS CHAR), '%')
and u.username like concat('%', '${member.userName}', '%')
</if>
<if test="member.roleName != null and member.roleName != ''">
and r.role_name = ${member.roleName}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
select * from t_role
<where>
<if test="role.roleName != null and role.roleName != ''">
and role_name like concat('%', CAST(#{role.roleName} AS CHAR), '%')
and role_name like concat('%', '${role.roleName}', '%')
</if>
<if test="role.createTimeFrom != null and role.createTimeFrom !=''">
and create_time &gt; #{role.createTimeFrom}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
select * from t_team
<where>
<if test="team.teamName != null and team.teamName != ''">
and team_name like concat('%', CAST(#{team.teamName} AS CHAR), '%')
and team_name like concat('%', '${team.teamName}', '%')
</if>
<if test="team.createTimeFrom != null and team.createTimeFrom !=''">
and create_time &gt; #{team.createTimeFrom}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
select * from t_user
<where>
<if test="user.username != null and user.username != ''">
and username like concat('%', CAST(#{user.username} AS CHAR), '%')
and username like concat('%', '${user.username}', '%')
</if>
<if test="user.createTimeFrom != null and user.createTimeFrom !=''">
and create_time &gt; #{user.createTimeFrom}
Expand Down
Loading