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

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

parent acb456aa
......@@ -28,7 +28,7 @@
<span>{{ props.row.unit }}</span>
</el-form-item>
<el-form-item label="关键字">
<span>{{ props.row.keyword }}</span>
<span>{{ props.row.keywords }}</span>
</el-form-item>
<el-form-item label="类目ID">
<span>{{ props.row.categoryId }}</span>
......
......@@ -33,7 +33,7 @@
</template>
</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 align="center" min-width="100" label="简介" prop="desc">
......@@ -70,8 +70,8 @@
<el-form-item label="类目名称" prop="name">
<el-input v-model="dataForm.name"></el-input>
</el-form-item>
<el-form-item label="关键字" prop="keyword">
<el-input v-model="dataForm.keyword"></el-input>
<el-form-item label="关键字" prop="keywords">
<el-input v-model="dataForm.keywords"></el-input>
</el-form-item>
<el-form-item label="级别" prop="level">
<el-select v-model="dataForm.level" @change="onLevelChange">
......@@ -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
})
......
......@@ -48,7 +48,7 @@
import { listRegion } from '@/api/region'
export default {
name: 'Keyword',
name: 'Region',
data() {
return {
list: undefined,
......
......@@ -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.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<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.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<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