Skip to content

Commit d20aa14

Browse files
committed
fix(search):修复搜索功能中的SQL语法错误
- 移除了多余的where关键字避免SQL语法错误,<where>动态条件标签中不需要手动添加where关键字 Signed-off-by: LiggMax <wenzhouli06@gmail.com>
1 parent e447f50 commit d20aa14

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

common/src/main/resources/mapper/SearchMapper.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
left join product_detail pd on p.id = pd.product_id
1717
<where>
1818
<if test="keyword != null and keyword != ''">
19-
where p.title like concat('%', #{keyword}, '%')
19+
p.title like concat('%', #{keyword}, '%')
2020
or pd.description like concat('%', #{keyword}, '%')
2121
</if>
2222
</where>

0 commit comments

Comments
 (0)