linhw 2024-05-22 18:22:21 +08:00
parent 2a7bd832b9
commit 2ad7ca1078
1 changed files with 5 additions and 1 deletions

View File

@ -64,7 +64,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
left join app_town t on t.id = a.town_id
<where>
<if test="userId != null "> and a.user_id = #{userId}</if>
<if test="username != null "> and u.username like concat('%',#{username},'%')</if>
<if test="username != null "> and
(u.username like concat('%',#{username},'%')
or a.content like concat('%',#{username},'%')
)
</if>
<if test="content != null and content != ''"> and a.content like concat('%',#{content},'%')</if>
<if test="videoUrl != null and videoUrl != ''"> and a.video_url = #{videoUrl}</if>
<if test="topicId != null "> and a.topic_id like concat('%',#{topicId},'%')</if>