Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
jinli gu
Litemall
Commits
09221552
Commit
09221552
authored
Apr 01, 2018
by
Junling Bu
Browse files
fix[litemall-wx-api]:查询关键字匹配需要手动添加%
parent
4d33e973
Changes
1
Hide whitespace changes
Inline
Side-by-side
litemall-db/src/main/java/org/linlinjava/litemall/db/service/LitemallGoodsService.java
View file @
09221552
...
...
@@ -69,15 +69,15 @@ public class LitemallGoodsService {
}
if
(
isNew
!=
null
){
criteria
.
andIsNewEqualTo
(
isNew
==
1
);
criteria
.
andIsNewEqualTo
(
isNew
.
intValue
()
==
1
);
}
if
(
isHot
!=
null
){
criteria
.
andIsHotEqualTo
(
isHot
==
1
);
criteria
.
andIsHotEqualTo
(
isHot
.
intValue
()
==
1
);
}
if
(
keyword
!=
null
){
criteria
.
andKeywordsLike
(
keyword
);
criteria
.
andKeywordsLike
(
"%"
+
keyword
+
"%"
);
}
if
(
sort
!=
null
){
...
...
@@ -104,15 +104,15 @@ public class LitemallGoodsService {
}
if
(
isNew
!=
null
){
criteria
.
andIsNewEqualTo
(
isNew
==
1
);
criteria
.
andIsNewEqualTo
(
isNew
.
intValue
()
==
1
);
}
if
(
isHot
!=
null
){
criteria
.
andIsHotEqualTo
(
isHot
==
1
);
criteria
.
andIsHotEqualTo
(
isHot
.
intValue
()
==
1
);
}
if
(
keyword
!=
null
){
criteria
.
andKeywordsLike
(
keyword
);
criteria
.
andKeywordsLike
(
"%"
+
keyword
+
"%"
);
}
return
(
int
)
goodsMapper
.
countByExample
(
example
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment