Преглед на файлове

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

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>