Commit 8cf5b8f7 authored by Junling Bu's avatar Junling Bu
Browse files

fix[litemall-admin]: 修复商品页面和分类页面的关键字是keywords

parent acb456aa
...@@ -28,7 +28,7 @@ ...@@ -28,7 +28,7 @@
<span>{{ props.row.unit }}</span> <span>{{ props.row.unit }}</span>
</el-form-item> </el-form-item>
<el-form-item label="关键字"> <el-form-item label="关键字">
<span>{{ props.row.keyword }}</span> <span>{{ props.row.keywords }}</span>
</el-form-item> </el-form-item>
<el-form-item label="类目ID"> <el-form-item label="类目ID">
<span>{{ props.row.categoryId }}</span> <span>{{ props.row.categoryId }}</span>
......
...@@ -33,7 +33,7 @@ ...@@ -33,7 +33,7 @@
</template> </template>
</el-table-column> </el-table-column>
<el-table-column align="center" label="关键字" prop="keyword"> <el-table-column align="center" label="关键字" prop="keywords">
</el-table-column> </el-table-column>
<el-table-column align="center" min-width="100" label="简介" prop="desc"> <el-table-column align="center" min-width="100" label="简介" prop="desc">
...@@ -70,8 +70,8 @@ ...@@ -70,8 +70,8 @@
<el-form-item label="类目名称" prop="name"> <el-form-item label="类目名称" prop="name">
<el-input v-model="dataForm.name"></el-input> <el-input v-model="dataForm.name"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="关键字" prop="keyword"> <el-form-item label="关键字" prop="keywords">
<el-input v-model="dataForm.keyword"></el-input> <el-input v-model="dataForm.keywords"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="级别" prop="level"> <el-form-item label="级别" prop="level">
<el-select v-model="dataForm.level" @change="onLevelChange"> <el-select v-model="dataForm.level" @change="onLevelChange">
...@@ -171,7 +171,7 @@ export default { ...@@ -171,7 +171,7 @@ export default {
dataForm: { dataForm: {
id: undefined, id: undefined,
name: '', name: '',
keyword: '', keywords: '',
level: 'L2', level: 'L2',
pid: undefined, pid: undefined,
desc: '', desc: '',
...@@ -228,7 +228,7 @@ export default { ...@@ -228,7 +228,7 @@ export default {
this.dataForm = { this.dataForm = {
id: undefined, id: undefined,
name: '', name: '',
keyword: '', keywords: '',
level: 'L2', level: 'L2',
pid: undefined, pid: undefined,
desc: '', desc: '',
...@@ -320,7 +320,7 @@ export default { ...@@ -320,7 +320,7 @@ export default {
this.downloadLoading = true this.downloadLoading = true
import('@/vendor/Export2Excel').then(excel => { import('@/vendor/Export2Excel').then(excel => {
const tHeader = ['类目ID', '名称', '关键字', '级别', '父类目ID', '类目图标', '类目图片', '简介'] 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, '商品类目信息') excel.export_json_to_excel2(tHeader, this.list, filterVal, '商品类目信息')
this.downloadLoading = false this.downloadLoading = false
}) })
......
...@@ -48,7 +48,7 @@ ...@@ -48,7 +48,7 @@
import { listRegion } from '@/api/region' import { listRegion } from '@/api/region'
export default { export default {
name: 'Keyword', name: 'Region',
data() { data() {
return { return {
list: undefined, list: undefined,
......
...@@ -87,7 +87,7 @@ public class LitemallGoodsService { ...@@ -87,7 +87,7 @@ public class LitemallGoodsService {
} }
public List<LitemallGoods> querySelective(Integer catId, Integer brandId, String keyword, Boolean isHot, Boolean isNew, Integer offset, Integer limit, String sort, String order) { public List<LitemallGoods> querySelective(Integer catId, Integer brandId, String keywords, Boolean isHot, Boolean isNew, Integer offset, Integer limit, String sort, String order) {
LitemallGoodsExample example = new LitemallGoodsExample(); LitemallGoodsExample example = new LitemallGoodsExample();
LitemallGoodsExample.Criteria criteria1 = example.or(); LitemallGoodsExample.Criteria criteria1 = example.or();
LitemallGoodsExample.Criteria criteria2 = example.or(); LitemallGoodsExample.Criteria criteria2 = example.or();
...@@ -108,9 +108,9 @@ public class LitemallGoodsService { ...@@ -108,9 +108,9 @@ public class LitemallGoodsService {
criteria1.andIsHotEqualTo(isHot); criteria1.andIsHotEqualTo(isHot);
criteria2.andIsHotEqualTo(isHot); criteria2.andIsHotEqualTo(isHot);
} }
if (!StringUtils.isEmpty(keyword)) { if (!StringUtils.isEmpty(keywords)) {
criteria1.andKeywordsLike("%" + keyword + "%"); criteria1.andKeywordsLike("%" + keywords + "%");
criteria2.andNameLike("%" + keyword + "%"); criteria2.andNameLike("%" + keywords + "%");
} }
criteria1.andDeletedEqualTo(false); criteria1.andDeletedEqualTo(false);
criteria2.andDeletedEqualTo(false); criteria2.andDeletedEqualTo(false);
...@@ -126,7 +126,7 @@ public class LitemallGoodsService { ...@@ -126,7 +126,7 @@ public class LitemallGoodsService {
return goodsMapper.selectByExampleSelective(example, columns); 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 example = new LitemallGoodsExample();
LitemallGoodsExample.Criteria criteria1 = example.or(); LitemallGoodsExample.Criteria criteria1 = example.or();
LitemallGoodsExample.Criteria criteria2 = example.or(); LitemallGoodsExample.Criteria criteria2 = example.or();
...@@ -147,9 +147,9 @@ public class LitemallGoodsService { ...@@ -147,9 +147,9 @@ public class LitemallGoodsService {
criteria1.andIsHotEqualTo(isHot); criteria1.andIsHotEqualTo(isHot);
criteria2.andIsHotEqualTo(isHot); criteria2.andIsHotEqualTo(isHot);
} }
if (!StringUtils.isEmpty(keyword)) { if (!StringUtils.isEmpty(keywords)) {
criteria1.andKeywordsLike("%" + keyword + "%"); criteria1.andKeywordsLike("%" + keywords + "%");
criteria2.andNameLike("%" + keyword + "%"); criteria2.andNameLike("%" + keywords + "%");
} }
return (int) goodsMapper.countByExample(example); return (int) goodsMapper.countByExample(example);
...@@ -240,7 +240,7 @@ public class LitemallGoodsService { ...@@ -240,7 +240,7 @@ public class LitemallGoodsService {
return (int) goodsMapper.countByExample(example); return (int) goodsMapper.countByExample(example);
} }
public List<Integer> getCatIds(Integer brandId, String keyword, Boolean isHot, Boolean isNew) { public List<Integer> getCatIds(Integer brandId, String keywords, Boolean isHot, Boolean isNew) {
LitemallGoodsExample example = new LitemallGoodsExample(); LitemallGoodsExample example = new LitemallGoodsExample();
LitemallGoodsExample.Criteria criteria1 = example.or(); LitemallGoodsExample.Criteria criteria1 = example.or();
LitemallGoodsExample.Criteria criteria2 = example.or(); LitemallGoodsExample.Criteria criteria2 = example.or();
...@@ -260,9 +260,9 @@ public class LitemallGoodsService { ...@@ -260,9 +260,9 @@ public class LitemallGoodsService {
criteria1.andIsHotEqualTo(isHot); criteria1.andIsHotEqualTo(isHot);
criteria2.andIsHotEqualTo(isHot); criteria2.andIsHotEqualTo(isHot);
} }
if (!StringUtils.isEmpty(keyword)) { if (!StringUtils.isEmpty(keywords)) {
criteria1.andKeywordsLike("%" + keyword + "%"); criteria1.andKeywordsLike("%" + keywords + "%");
criteria2.andNameLike("%" + keyword + "%"); criteria2.andNameLike("%" + keywords + "%");
} }
List<LitemallGoods> goodsList = goodsMapper.selectByExampleSelective(example, Column.categoryId); List<LitemallGoods> goodsList = goodsMapper.selectByExampleSelective(example, Column.categoryId);
......
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