This commit is contained in:
Looly
2019-11-22 07:29:07 +08:00
parent edb8b1ff8c
commit c4740a2c6b
4 changed files with 28 additions and 22 deletions

View File

@@ -111,10 +111,10 @@ public class SqlUtil {
StringBuilder likeValue = StrUtil.builder(withLikeKeyword ? "LIKE " : "");
switch (likeType) {
case StartWith:
likeValue.append('%').append(value);
likeValue.append(value).append('%');
break;
case EndWith:
likeValue.append(value).append('%');
likeValue.append('%').append(value);
break;
case Contains:
likeValue.append('%').append(value).append('%');