Commit 09221552 authored by Junling Bu's avatar Junling Bu
Browse files

fix[litemall-wx-api]:查询关键字匹配需要手动添加%

parent 4d33e973
...@@ -69,15 +69,15 @@ public class LitemallGoodsService { ...@@ -69,15 +69,15 @@ public class LitemallGoodsService {
} }
if(isNew != null){ if(isNew != null){
criteria.andIsNewEqualTo(isNew==1); criteria.andIsNewEqualTo(isNew.intValue() == 1);
} }
if(isHot != null){ if(isHot != null){
criteria.andIsHotEqualTo(isHot == 1); criteria.andIsHotEqualTo(isHot.intValue() == 1);
} }
if(keyword != null){ if(keyword != null){
criteria.andKeywordsLike(keyword); criteria.andKeywordsLike("%" + keyword + "%");
} }
if(sort != null){ if(sort != null){
...@@ -104,15 +104,15 @@ public class LitemallGoodsService { ...@@ -104,15 +104,15 @@ public class LitemallGoodsService {
} }
if(isNew != null){ if(isNew != null){
criteria.andIsNewEqualTo(isNew==1); criteria.andIsNewEqualTo(isNew.intValue() == 1);
} }
if(isHot != null){ if(isHot != null){
criteria.andIsHotEqualTo(isHot == 1); criteria.andIsHotEqualTo(isHot.intValue() == 1);
} }
if(keyword != null){ if(keyword != null){
criteria.andKeywordsLike(keyword); criteria.andKeywordsLike("%" + keyword + "%");
} }
return (int)goodsMapper.countByExample(example); return (int)goodsMapper.countByExample(example);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment