浏览代码

关系维护列表搜索条件去空格、去大小写。

rengb 5 年之前
父节点
当前提交
e1d675bc85
共有 1 个文件被更改,包括 3 次插入3 次删除
  1. 3 3
      knowledgeman-service/src/main/resources/mapper/RelationMapper.xml

+ 3 - 3
knowledgeman-service/src/main/resources/mapper/RelationMapper.xml

@@ -44,10 +44,10 @@
 			and relationId=#{relationId}
 		</if>
 		<if test="startName!=null and startName!=''">
-			and startName like concat('%',#{startName},'%')
+			and UPPER(startName) like concat('%',UPPER(TRIM(#{startName})),'%')
 		</if>
 		<if test="endName!=null and endName!=''">
-			and endName like concat('%',#{endName},'%')
+			and UPPER(endName) like concat('%',UPPER(TRIM(#{endName})),'%')
 		</if>
 		ORDER BY isDeleted asc, operTime desc
     </select>
@@ -245,7 +245,7 @@
 		GROUP BY t2.id) tab
 		where 1=1
 		<if test="name!=null and name!=''">
-			and libName like concat('%',#{name},'%')
+			and UPPER(libName) like concat('%',UPPER(TRIM(#{name})),'%')
 		</if>
 		ORDER BY isDeleted ASC,operTime DESC
 	</select>