Explorar o código

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

rengb %!s(int64=5) %!d(string=hai) anos
pai
achega
e1d675bc85

+ 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>