修复sql模糊查询中含有特殊符号时查询不准备的BUG

This commit is contained in:
648540858
2024-11-14 14:08:05 +08:00
parent 86879aa58d
commit 6e8a3f6adf
13 changed files with 51 additions and 11 deletions

View File

@@ -41,7 +41,7 @@ public interface CloudRecordServiceMapper {
"select * " +
" from wvp_cloud_record " +
" where 0 = 0" +
" <if test='query != null'> AND (app LIKE concat('%',#{query},'%') OR stream LIKE concat('%',#{query},'%') )</if> " +
" <if test='query != null'> AND (app LIKE concat('%',#{query},'%') escape '/' OR stream LIKE concat('%',#{query},'%') escape '/' )</if> " +
" <if test= 'app != null '> and app=#{app}</if>" +
" <if test= 'stream != null '> and stream=#{stream}</if>" +
" <if test= 'startTimeStamp != null '> and end_time &gt;= #{startTimeStamp}</if>" +