运维工具-openId条件模糊查询

This commit is contained in:
曹磊 2026-02-06 13:31:39 +08:00
parent 4586edc305
commit 7e5051b0b8
1 changed files with 4 additions and 4 deletions

View File

@ -23,7 +23,7 @@
AND a.tel LIKE concat('%',#{params.tel},'%') AND a.tel LIKE concat('%',#{params.tel},'%')
</if> </if>
<if test="params.openId != null and params.openId != ''"> <if test="params.openId != null and params.openId != ''">
AND a.open_id = #{params.openId} AND a.open_id LIKE concat('%',#{params.openId},'%')
</if> </if>
</where> </where>
union union
@ -47,7 +47,7 @@
AND a.tel LIKE concat('%',#{params.tel},'%') AND a.tel LIKE concat('%',#{params.tel},'%')
</if> </if>
<if test="params.openId != null and params.openId != ''"> <if test="params.openId != null and params.openId != ''">
AND a.open_id = #{params.openId} AND a.open_id LIKE concat('%',#{params.openId},'%')
</if> </if>
</where> </where>
union union
@ -71,7 +71,7 @@
AND a.tel LIKE concat('%',#{params.tel},'%') AND a.tel LIKE concat('%',#{params.tel},'%')
</if> </if>
<if test="params.openId != null and params.openId != ''"> <if test="params.openId != null and params.openId != ''">
AND a.open_id = #{params.openId} AND a.open_id LIKE concat('%',#{params.openId},'%')
</if> </if>
</where> </where>
union union
@ -96,7 +96,7 @@
AND a.tel LIKE concat('%',#{params.tel},'%') AND a.tel LIKE concat('%',#{params.tel},'%')
</if> </if>
<if test="params.openId != null and params.openId != ''"> <if test="params.openId != null and params.openId != ''">
AND a.open_id = #{params.openId} AND a.open_id LIKE concat('%',#{params.openId},'%')
</if> </if>
</where> </where>
order by id desc order by id desc