From 8cf5b8f7244bdecdf01829b2a1b0bcffd712a41b Mon Sep 17 00:00:00 2001 From: Junling Bu Date: Sun, 19 Aug 2018 21:57:33 +0800 Subject: [PATCH] =?UTF-8?q?fix[litemall-admin]:=20=E4=BF=AE=E5=A4=8D?= =?UTF-8?q?=E5=95=86=E5=93=81=E9=A1=B5=E9=9D=A2=E5=92=8C=E5=88=86=E7=B1=BB?= =?UTF-8?q?=E9=A1=B5=E9=9D=A2=E7=9A=84=E5=85=B3=E9=94=AE=E5=AD=97=E6=98=AF?= =?UTF-8?q?keywords?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- litemall-admin/src/views/goods/list.vue | 2 +- litemall-admin/src/views/mall/category.vue | 12 +++++----- litemall-admin/src/views/mall/region.vue | 2 +- .../db/service/LitemallGoodsService.java | 24 +++++++++---------- 4 files changed, 20 insertions(+), 20 deletions(-) diff --git a/litemall-admin/src/views/goods/list.vue b/litemall-admin/src/views/goods/list.vue index db751cbe..022051d3 100644 --- a/litemall-admin/src/views/goods/list.vue +++ b/litemall-admin/src/views/goods/list.vue @@ -28,7 +28,7 @@ {{ props.row.unit }} - {{ props.row.keyword }} + {{ props.row.keywords }} {{ props.row.categoryId }} diff --git a/litemall-admin/src/views/mall/category.vue b/litemall-admin/src/views/mall/category.vue index 2f806dde..003592a0 100644 --- a/litemall-admin/src/views/mall/category.vue +++ b/litemall-admin/src/views/mall/category.vue @@ -33,7 +33,7 @@ - + @@ -70,8 +70,8 @@ - - + + @@ -171,7 +171,7 @@ export default { dataForm: { id: undefined, name: '', - keyword: '', + keywords: '', level: 'L2', pid: undefined, desc: '', @@ -228,7 +228,7 @@ export default { this.dataForm = { id: undefined, name: '', - keyword: '', + keywords: '', level: 'L2', pid: undefined, desc: '', @@ -320,7 +320,7 @@ export default { this.downloadLoading = true import('@/vendor/Export2Excel').then(excel => { const tHeader = ['类目ID', '名称', '关键字', '级别', '父类目ID', '类目图标', '类目图片', '简介'] - const filterVal = ['id', 'name', 'keyword', 'level', 'pid', 'iconUrl', 'picUrl', 'desc'] + const filterVal = ['id', 'name', 'keywords', 'level', 'pid', 'iconUrl', 'picUrl', 'desc'] excel.export_json_to_excel2(tHeader, this.list, filterVal, '商品类目信息') this.downloadLoading = false }) diff --git a/litemall-admin/src/views/mall/region.vue b/litemall-admin/src/views/mall/region.vue index 0cda44b8..2bc87ab3 100644 --- a/litemall-admin/src/views/mall/region.vue +++ b/litemall-admin/src/views/mall/region.vue @@ -48,7 +48,7 @@ import { listRegion } from '@/api/region' export default { - name: 'Keyword', + name: 'Region', data() { return { list: undefined, diff --git a/litemall-db/src/main/java/org/linlinjava/litemall/db/service/LitemallGoodsService.java b/litemall-db/src/main/java/org/linlinjava/litemall/db/service/LitemallGoodsService.java index e54aca6c..1899cff3 100644 --- a/litemall-db/src/main/java/org/linlinjava/litemall/db/service/LitemallGoodsService.java +++ b/litemall-db/src/main/java/org/linlinjava/litemall/db/service/LitemallGoodsService.java @@ -87,7 +87,7 @@ public class LitemallGoodsService { } - public List querySelective(Integer catId, Integer brandId, String keyword, Boolean isHot, Boolean isNew, Integer offset, Integer limit, String sort, String order) { + public List querySelective(Integer catId, Integer brandId, String keywords, Boolean isHot, Boolean isNew, Integer offset, Integer limit, String sort, String order) { LitemallGoodsExample example = new LitemallGoodsExample(); LitemallGoodsExample.Criteria criteria1 = example.or(); LitemallGoodsExample.Criteria criteria2 = example.or(); @@ -108,9 +108,9 @@ public class LitemallGoodsService { criteria1.andIsHotEqualTo(isHot); criteria2.andIsHotEqualTo(isHot); } - if (!StringUtils.isEmpty(keyword)) { - criteria1.andKeywordsLike("%" + keyword + "%"); - criteria2.andNameLike("%" + keyword + "%"); + if (!StringUtils.isEmpty(keywords)) { + criteria1.andKeywordsLike("%" + keywords + "%"); + criteria2.andNameLike("%" + keywords + "%"); } criteria1.andDeletedEqualTo(false); criteria2.andDeletedEqualTo(false); @@ -126,7 +126,7 @@ public class LitemallGoodsService { return goodsMapper.selectByExampleSelective(example, columns); } - public int countSelective(Integer catId, Integer brandId, String keyword, Boolean isHot, Boolean isNew, Integer offset, Integer limit, String sort, String order) { + public int countSelective(Integer catId, Integer brandId, String keywords, Boolean isHot, Boolean isNew, Integer offset, Integer limit, String sort, String order) { LitemallGoodsExample example = new LitemallGoodsExample(); LitemallGoodsExample.Criteria criteria1 = example.or(); LitemallGoodsExample.Criteria criteria2 = example.or(); @@ -147,9 +147,9 @@ public class LitemallGoodsService { criteria1.andIsHotEqualTo(isHot); criteria2.andIsHotEqualTo(isHot); } - if (!StringUtils.isEmpty(keyword)) { - criteria1.andKeywordsLike("%" + keyword + "%"); - criteria2.andNameLike("%" + keyword + "%"); + if (!StringUtils.isEmpty(keywords)) { + criteria1.andKeywordsLike("%" + keywords + "%"); + criteria2.andNameLike("%" + keywords + "%"); } return (int) goodsMapper.countByExample(example); @@ -240,7 +240,7 @@ public class LitemallGoodsService { return (int) goodsMapper.countByExample(example); } - public List getCatIds(Integer brandId, String keyword, Boolean isHot, Boolean isNew) { + public List getCatIds(Integer brandId, String keywords, Boolean isHot, Boolean isNew) { LitemallGoodsExample example = new LitemallGoodsExample(); LitemallGoodsExample.Criteria criteria1 = example.or(); LitemallGoodsExample.Criteria criteria2 = example.or(); @@ -260,9 +260,9 @@ public class LitemallGoodsService { criteria1.andIsHotEqualTo(isHot); criteria2.andIsHotEqualTo(isHot); } - if (!StringUtils.isEmpty(keyword)) { - criteria1.andKeywordsLike("%" + keyword + "%"); - criteria2.andNameLike("%" + keyword + "%"); + if (!StringUtils.isEmpty(keywords)) { + criteria1.andKeywordsLike("%" + keywords + "%"); + criteria2.andNameLike("%" + keywords + "%"); } List goodsList = goodsMapper.selectByExampleSelective(example, Column.categoryId);