会员管理 固定等级

This commit is contained in:
cun-nan 2023-10-25 18:20:42 +08:00
parent fe075eeb54
commit 76d4ace2eb
27 changed files with 1166 additions and 335 deletions

View File

@ -28,19 +28,27 @@ export function list(data) {
}
// 根据id查询一级分类
export function selectParentById(query) {
export function selectParentById(id) {
return request({
url: '/business/cvsGoods',
url: '/business/cvsGoods/'+id,
method: 'get',
params: query
})
}
// 修改会员
export function updateCevGood(data) {
return request({
url: '/business/cvsGoods',
method: 'put',
data: data
})
}
// 根据id查询一级分类
export function deleteBYId(id) {
return request({
url: '/business/cvsGoods/detele/'+id,
url: '/business/cvsGoods/'+id,
method: 'delete',
})
}

View File

@ -1,346 +1,497 @@
<template>
<div>
<el-card style="margin-top: 20px;">
<!-- 查询类别 -->
<el-form :inline="true" :model="goodsQueryForm">
<el-form-item label="分类名称" prop="categoryName">
<el-input v-model="goodsQueryForm.categoryName" placeholder="请输入分类名称" clearable @keyup.enter.native="onQuery"></el-input>
</el-form-item>
<el-form-item label="状态">
<el-select v-model="goodsQueryForm.status" placeholder="请选择商品状态" clearable >
<el-option
v-for="dict in dict.type.zhzt"
:key="dict.value"
:label="dict.label"
:value="dict.value"/>
</el-select>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" @click="onQuery">搜索</el-button>
<el-button @click="resetForm" icon="el-icon-refresh" >重置</el-button>
</el-form-item>
</el-form>
</el-card>
<div class="app-container">
<el-card style="margin-top: 20px;">
<!-- 查询类别 -->
<el-form :inline="true" :model="queryParams">
<el-form-item label="分类名称" prop="categoryName">
<el-input v-model="queryParams.categoryName" placeholder="请输入分类名称" clearable @keyup.enter.native="handleQuery"></el-input>
</el-form-item>
<el-form-item label="状态">
<el-select v-model="queryParams.status" placeholder="请选择商品状态" clearable >
<el-option
v-for="dict in dict.type.zhzt"
:key="dict.value"
:label="dict.label"
:value="dict.value"/>
</el-select>
</el-form-item>
<!-- <el-form-item>-->
<!-- <el-button type="primary" icon="el-icon-search" @click="onQuery">搜索</el-button>-->
<!-- <el-button @click="resetForm" icon="el-icon-refresh" >重置</el-button>-->
<!-- </el-form-item>-->
<el-form-item>
<el-button type="primary" icon="el-icon-search" @click="handleQuery">搜索</el-button>
</el-form-item>
</el-form>
</el-card>
<el-card style="margin-top: 15px;">
<div class="tTop">分类列表
<el-button type="primary" @click="insertGoods" >添加分类</el-button>
</div>
<!-- default-expand-all二级菜单默认展开 -->
<!-- 分类列表 -->
<el-table
:data="tableData"
style="width: 100%;margin-bottom: 20px;"
row-key="id"
border
:tree-props="{children: 'children', hasChildren: 'hasChildren'}">
<!-- <el-table-column
prop="id"
label="序号"
width="180">
</el-table-column> -->
<el-table-column prop="categoryName" label="分类名称" width="180" />
<el-table-column prop="sorted" label="排序"/>
<el-table-column prop="status" label="状态" width="180">
<template slot-scope="scope">
<dict-tag :options="dict.type.zhzt" :value="scope.row.status"/>
</template>
</el-table-column>
<el-table-column prop="createTime" label="创建时间" width="180" />
<el-table-column prop="createBy" label="创建人" width="180" />
<el-table-column label="操作" width="180">
<template slot-scope="scope">
<el-button type="primary" @click="editeCategory(scope.row)" size="mini">编辑</el-button>
<el-button type="danger" @click="delCategory(scope.row.id)" size="mini">删除</el-button>
</template>
</el-table-column>
</el-table>
<el-card style="margin-top: 15px;">
<el-button
type="primary"
icon="el-icon-plus"
@click="handleAdd"
v-hasPermi="['member:add']"
>添加分类</el-button>
<!-- <div class="tTop">分类列表-->
<!-- <el-button type="primary" @click="insertGoods" >添加分类</el-button>-->
<!-- </div>-->
<!-- default-expand-all二级菜单默认展开 -->
<!-- 分类列表 -->
<el-table ref="tables" v-loading="loading" :data="list" row-key="id"
:tree-props="{children: 'children', hasChildren: 'hasChildren'}"
@selection-change="handleSelectionChange" :default-sort="defaultSort"
@sort-change="handleSortChange">
<el-table-column label="ID" prop="id" align="center" width="60"/>
<el-table-column label="分类名称" align="center" prop="categoryName"/>
<el-table-column label="商品编号" align="center" prop="code"/>
<el-table-column label="排序" align="center" prop="sorted" />
<el-table-column label="状态" align="center" prop="status">
<template slot-scope="scope">
<dict-tag :options="dict.type.zhzt" :value="scope.row.status"/>
</template>
</el-table-column>
<el-table-column label="创建时间" align="center" prop="createTime">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.createTime) }}</span>
</template>
</el-table-column>
<el-table-column label="创建人" align="center" prop="createBy">
<template slot-scope="scope">
<span>{{ getName(scope.row.createBy) }}</span>
</template>
</el-table-column>
<el-table-column label="操作" align="center" width="120" fixed='right'>
<template slot-scope="scope">
<el-button
size="mini"
type="text"
icon="el-icon-edit"
v-hasPermi="['member:add']"
@click="handleUpdate(scope.row)"
>修改</el-button>
<el-button
size="mini"
type="text"
icon="el-icon-delete"
v-hasPermi="['member:add']"
@click="handleDelete(scope.row)"
>删除</el-button>
</template>
</el-table-column>
</el-table>
<!-- 添加类别对话框 -->
<el-dialog title="添加分类" :visible.sync="dialogFormVisible" width="500px">
<el-form :model="form" :inline="true" :rules="rules" ref="form" >
<el-form-item label="上级分类" >
<el-select v-model="form.pid" placeholder="请选择上级分类">
<el-option
v-for="item in goodsOptions"
:label="item.categoryName"
:value="item.id">
</el-option>
</el-select>
</el-form-item>
<el-form-item label="分类名称" prop="categoryName" style="margin-left: -8px;">
<el-input v-model="form.categoryName" style="width: 300px;"></el-input>
</el-form-item>
<el-form-item label="排序规则">
<el-input-number v-model="form.sorted" @change="handleChange" :min="0" :max="10" style="width: 300px;"></el-input-number>
</el-form-item>
<el-form-item >
<el-radio-group v-model="form.status">
<el-radio v-for="dict in dict.type.zhzt" :label="dict.value">{{ dict.label }}</el-radio>
</el-radio-group>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button @click="cancelSubmit"> </el-button>
<el-button type="primary" @click="dooSubmit"> </el-button>
</div>
</el-dialog>
<pagination
v-show="total>0"
:total="total"
:page.sync="queryParams.page"
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
<!-- 修改类别对话框 -->
<el-dialog title="修改分类" :visible.sync="editDialogFormVisible" width="500px">
<el-form :model="editForm" :inline="true" :rules="rules" ref="editForm" >
<el-form-item label="上级分类" v-if="isShow">
<el-select v-model="editForm.pid" placeholder="请选择上级分类">
<el-option
v-for="item in goodsOptions"
:label="item.categoryName"
:value="item.id">
</el-option>
</el-select>
</el-form-item>
<el-form-item label="分类名称" prop="categoryName" style="margin-left: -8px;">
<el-input v-model="editForm.categoryName" style="width: 300px;"></el-input>
</el-form-item>
<el-form-item label="排序规则">
<el-input-number v-model="editForm.sorted" @change="handleChange" :min="0" :max="10" style="width: 300px;"></el-input-number>
</el-form-item>
<el-form-item >
<el-radio-group v-model="editForm.status">
<el-radio v-for="dict in dict.type.zhzt" :label="dict.value">{{ dict.label }}</el-radio>
</el-radio-group>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button @click="cancelEdite"> </el-button>
<el-button type="primary" @click="saveEdite"> </el-button>
</div>
</el-dialog>
<!-- <el-table-->
<!-- :data="list"-->
<!-- style="width: 100%;margin-bottom: 20px;"-->
<!-- row-key="id"-->
<!-- :tree-props="{children: 'children', hasChildren: 'hasChildren'}">-->
<!-- &lt;!&ndash; <el-table-column-->
<!-- prop="id"-->
<!-- label="序号"-->
<!-- width="180">-->
<!-- </el-table-column> &ndash;&gt;-->
<!-- <el-table-column label="ID" prop="id" align="center" width="60"/>-->
<!-- <el-table-column prop="categoryName" align="center" label="分类名称" width="180" />-->
<!-- <el-table-column prop="sorted" align="center" label="排序"/>-->
<!-- <el-table-column prop="status" align="center" label="状态" width="180">-->
<!-- <template slot-scope="scope">-->
<!-- <dict-tag :options="dict.type.zhzt" :value="scope.row.status"/>-->
<!-- </template>-->
<!-- </el-table-column>-->
<!-- <el-table-column prop="createTime" align="center" label="创建时间" width="180" />-->
<!-- <el-table-column prop="createBy" align="center" label="创建人" width="180" />-->
<!-- <el-table-column label="操作" align="center" width="180">-->
<!-- <template slot-scope="scope">-->
<!-- <el-button type="primary" @click="editeCategory(scope.row)" size="mini">编辑</el-button>-->
<!-- <el-button type="danger" @click="delCategory(scope.row.id)" size="mini">删除</el-button>-->
<!-- </template>-->
<!-- </el-table-column>-->
<!-- </el-table>-->
<div class="pageSty">
<pagination
v-show="total>0"
:total="total"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@pagination="getList"/>
</div>
</el-card>
<!-- 添加类别对话框 -->
<el-dialog :title="title" :visible.sync="open" class="roll-dialog"
:close-on-click-modal="false" append-to-body width="500px">
<el-form :model="form" :inline="true" :rules="rules" ref="form" >
<el-form-item label="上级分类" >
<el-select v-model="form.pid" placeholder="请选择上级分类">
<el-option
v-for="item in goodsOptions"
:label="item.categoryName"
:value="item.id">
</el-option>
</el-select>
</el-form-item>
<el-form-item label="分类名称" prop="categoryName" style="margin-left: -8px;">
<el-input v-model="form.categoryName" style="width: 300px;"></el-input>
</el-form-item>
<el-form-item label="排序规则">
<el-input-number v-model="form.sorted" @change="handleChange" :min="0" :max="10" style="width: 300px;"></el-input-number>
</el-form-item>
<el-form-item >
<el-radio-group v-model="form.status">
<el-radio v-for="dict in dict.type.zhzt" :label="dict.value">{{ dict.label }}</el-radio>
</el-radio-group>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitForm"> </el-button>
<el-button @click="cancel"> </el-button>
</div>
</el-dialog>
</el-card>
</div>
<!-- 修改类别对话框 -->
<!-- <el-dialog title="修改分类" :visible.sync="editDialogFormVisible" width="500px">-->
<!-- <el-form :model="editForm" :inline="true" :rules="rules" ref="editForm" >-->
<!-- <el-form-item label="上级分类" v-if="isShow">-->
<!-- <el-select v-model="editForm.pid" placeholder="请选择上级分类">-->
<!-- <el-option-->
<!-- v-for="item in goodsOptions"-->
<!-- :label="item.categoryName"-->
<!-- :value="item.id">-->
<!-- </el-option>-->
<!-- </el-select>-->
<!-- </el-form-item>-->
<!-- <el-form-item label="分类名称" prop="categoryName" style="margin-left: -8px;">-->
<!-- <el-input v-model="editForm.categoryName" style="width: 300px;"></el-input>-->
<!-- </el-form-item>-->
<!-- <el-form-item label="排序规则">-->
<!-- <el-input-number v-model="editForm.sorted" @change="handleChange" :min="0" :max="10" style="width: 300px;"></el-input-number>-->
<!-- </el-form-item>-->
<!-- <el-form-item >-->
<!-- <el-radio-group v-model="editForm.status">-->
<!-- <el-radio v-for="dict in dict.type.zhzt" :label="dict.value">{{ dict.label }}</el-radio>-->
<!-- </el-radio-group>-->
<!-- </el-form-item>-->
<!-- </el-form>-->
<!-- <div slot="footer" class="dialog-footer">-->
<!-- <el-button @click="cancelEdite"> </el-button>-->
<!-- <el-button type="primary" @click="saveEdite"> </el-button>-->
<!-- </div>-->
<!-- </el-dialog>-->
</div>
</template>
<script>
import { selectTree, list,insertCvsGoods,deleteBYId} from "@/api/convenienceStore/goods.js";
import { runInThisContext } from "vm";
import {
selectTree,
list,
insertCvsGoods,
deleteBYId,
selectParentById,
updateCevGood
} from "@/api/convenienceStore/goods.js";
import {delUser, getUser} from "@/api/staff/user/user";
import {getAccount, getAccountList} from "@/api/system/account";
import {addFixingLevel, updateFixingLevel} from "@/api/staff/user/fixinglevel";
export default {
dicts:['zhzt'],
data() {
return {
//
isShow:false,
//
editForm:{
pid:'',
categoryName:'',
status:'qy',
sorted:0,
},
//
goodsOptions:[],
//
goodsQueryForm: {
categoryName: '',
status: '',
pid:"",
pageNum:'1',
pageSize:'5'
},
//
dialogFormVisible:false,
//
editDialogFormVisible:false,
//
form:{
pid:'',
categoryName:'',
status:'qy',
sorted:0,
},
tableData: [{
id: '',
pid:'',
categoryName: '',
sorted: '',
status:'',
createdTime:'',
children: []
}],
//
total: 0,
//
queryParams: {
pageNum: 1,
pageSize: 5,
categoryName:'',
status: undefined,
},
aa:[],
//
rules: {
categoryName: [
{ required: true, message: '请输入分类名称', trigger: 'blur' },
],
},
dicts:['zhzt'],
data() {
return {
creatName:'',
//
title: "",
//
open: false,
//
loading: true,
//
total: 0,
//
list: [],
//
isShow:false,
//
defaultSort: {prop: 'updateTime', order: 'descending'},
//
editForm:{
pid:'',
categoryName:'',
status:'qy',
sorted:0,
},
//
goodsOptions:[],
//
goodsQueryForm: {
categoryName: '',
status: '',
pid:"",
pageNum:'1',
pageSize:'5'
},
//
dialogFormVisible:false,
//
editDialogFormVisible:false,
//
form:{
pid:'',
categoryName:'',
status:'qy',
sorted:0,
},
tableData: [{
id: '',
pid:'',
categoryName: '',
sorted: '',
status:'',
createdTime:'',
children: []
}],
//
queryParams: {
pageNum: 1,
pageSize: 5,
categoryName:'',
status: '',
},
aa:[],
//
rules: {
categoryName: [
{ required: true, message: '请输入分类名称', trigger: 'blur' },
],
},
};
};
},
created(){
this.getList();
this.getFirstMenu();
},
methods: {
//
reset() {
this.form = {
pid:'',
categoryName:'',
status:'qy',
sorted:0,
}
},
created(){
//
getName(id){
getAccount(id).then(response=>{
this.creatName = response.data.account.realName
})
return this.creatName;
},
//
handleAdd() {
this.open = true;
this.title = "新增分类";
},
//
editeCategory(val){
// this.editForm .categoryName = ''
// this.editForm.pid = ''
// this.editForm.status = 'qy'
// this.editForm.sorted = 0
if(val.pid !== 0){
this.isShow = true
}
this.editDialogFormVisible = true
// selectParentById(val).then(response=>{
// this.editForm.categoryName = response.data
// })
},
//
cancelEdite(){
this.editDialogFormVisible = false
},
//
saveEdite(){
this.editDialogFormVisible = false
},
//
delCategory(id){
deleteBYId(id).then(res=>{
// console.log(res)
})
},
//
insertGoods(){
this.resetForm('form')
this.form.categoryName = ''
this.form.pid = ''
this.form.status = 'qy'
this.form.sorted = 0
this.dialogFormVisible = true
this.getFirstMenu();
},
//
getFirstMenu(){
list(this.form).then(response=>{
this.goodsOptions = response.data
})
},
//
onQuery(){
selectTree(this.goodsQueryForm).then(response=>{
if (response.code === 200) {
if(response.data == null){
this.tableData = []
this.total = 0;
this.$message('查询成功');
}else{
this.tableData = response.data.records
this.total = response.data.total;
this.$message('查询成功');
}
} else {
this.$message('查询失败,请联系管理员');
}
})
},
//
handleQuery() {
this.queryParams.page = 1;
this.getList();
},
handleChange(){
},
//
dooSubmit(){
this.$refs['form'].validate(valid => {
if (valid) {
//
if(this.form.pid == '' || this.form.pid == undefined ){
this.form.pid = 0
}
//
insertCvsGoods(this.form).then(response=>{
if (response.code === 200) {
this.rest()
this.$message('新增成功');
}else{
this.$message('新增失败 请联系管理员');
}
})
}
})
},
rest(){
this.dialogFormVisible = false
this.resetForm();
this.goodsOptions = []
},
//
cancelSubmit(){
this.$refs.form.resetFields();//
this.form.categoryName = ''
this.form.pid = ''
this.form.status = ''
this.form.sorted = 0
this.dialogFormVisible = false
},
//
getList(){
this.loading = true;
selectTree(this.queryParams).then(response => {
this.list = response.data.records;
this.total = response.data.total;
this.loading = false;
});
},
//
resetForm(){
this.goodsQueryForm.categoryName = ''
this.goodsQueryForm.status = ''
this.getList()
},
methods: {
//
editeCategory(val){
// this.editForm .categoryName = ''
// this.editForm.pid = ''
// this.editForm.status = 'qy'
// this.editForm.sorted = 0
if(val.pid !== 0){
this.isShow = true
}
this.editDialogFormVisible = true
// selectParentById(val).then(response=>{
// this.editForm.categoryName = response.data
// })
},
//
cancelEdite(){
this.editDialogFormVisible = false
},
//
saveEdite(){
this.editDialogFormVisible = false
},
//
delCategory(id){
deleteBYId(id).then(res=>{
console.log(res)
})
},
//
insertGoods(){
this.resetForm('form')
this.form.categoryName = ''
this.form.pid = ''
this.form.status = 'qy'
this.form.sorted = 0
this.dialogFormVisible = true
this.getFirstMenu();
},
//
getFirstMenu(){
list(this.form).then(response=>{
this.goodsOptions = response.data
})
},
//
onQuery(){
selectTree(this.goodsQueryForm).then(response=>{
if (response.code === 200) {
if(response.data == null){
this.tableData = []
console.log(response.data);
this.total = 0;
this.$message('查询成功');
}else{
this.tableData = response.data.records
this.total = response.data.total;
this.$message('查询成功');
}
} else {
this.$message('查询失败,请联系管理员');
}
})
},
handleChange(){
},
//
dooSubmit(){
this.$refs['form'].validate(valid => {
if (valid) {
//
if(this.form.pid == '' || this.form.pid == undefined ){
this.form.pid = 0
}
//
insertCvsGoods(this.form).then(response=>{
if (response.code === 200) {
this.rest()
this.$message('新增成功');
}else{
this.$message('新增失败 请联系管理员');
}
})
}
})
},
rest(){
this.dialogFormVisible = false
this.resetForm();
this.goodsOptions = []
},
//
cancelSubmit(){
this.$refs.form.resetFields();//
this.form.categoryName = ''
this.form.pid = ''
this.form.status = ''
this.form.sorted = 0
this.dialogFormVisible = false
},
//
getList(){
selectTree(this.queryParams).then(response => {
if(response.code == 200){
if(response.data == null){
this.tableData = [];
this.total = 0;
}else{
this.tableData = response.data.records;
this.total = response.data.total;
}
}else{
this.$message('查询失败 请联系管理员')
}
//
submitForm: function() {
this.$refs["form"].validate(valid => {
if (valid) {
if (this.form.id) {
updateCevGood(this.form).then(response => {
this.$modal.msgSuccess("分类更新成功");
this.open = false;
this.getList();
});
},
//
resetForm(){
this.goodsQueryForm.categoryName = ''
this.goodsQueryForm.status = ''
this.getList()
},
} else {
insertCvsGoods(this.form).then(response => {
this.$modal.msgSuccess("分类添加成功");
this.open = false;
this.getList();
});
}
}
});
},
//
cancel() {
this.open = false;
this.reset();
},
//
handleUpdate(row) {
this.reset();
const id = row.id || this.ids;
selectParentById(id).then(response => {
console.log(response)
this.form = response.data;
this.open = true;
this.title = "编辑分类";
});
},
//
handleDelete(row) {
const name = row.categoryName
this.$modal.confirm('确定删除"' + name + '"的分类信息?').then(function() {
// return deleteMember(row.id);
return deleteBYId(row.id);
}).then(() => {
this.getList();
this.$modal.msgSuccess("删除成功");
}).catch(() => {});
},
//
handleSelectionChange(selection) {
this.ids = selection.map(item => item.id)
this.multiple = !selection.length
},
//
handleSortChange(column, prop, order) {
this.queryParams.orderByColumn = column.prop;
this.queryParams.isAsc = column.order;
this.getList();
},
},
};
</script>
<style lang="scss" scoped>
.tTop{
.tTop{
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 10px;
}
.pageSty{
}
.pageSty{
display: flex;
justify-content: center;
margin-left: 250px;
}
}
.app-container{
width: 100%;
height: 100%;
background: #f6f8f9;
}
</style>

View File

@ -109,7 +109,7 @@
icon="el-icon-document-copy"
@click="handleAddMembers"
v-hasPermi="['member:add']"
>新增用户认证</el-button>
>批量用户认证</el-button>
<el-table ref="tables" v-loading="loading" :data="listMember"
@selection-change="handleSelectionChange" :default-sort="defaultSort"
@sort-change="handleSortChange">
@ -183,7 +183,11 @@
@selection-change="handleSelectionChange"
:default-sort="defaultSort"
@sort-change="handleSortChange">
<el-table-column label="认证类型名称" prop="name" align="center"/>
<el-table-column label="认证类型名称" align="center" prop="name">
<template slot-scope="scope">
{{ scope.row.name }}
</template>
</el-table-column>
<el-table-column label="优惠类型" align="center" prop="discountType">
<template slot-scope="scope">
<dict-tag :options="dict.type.yhlx" :value="scope.row.discountType"/>
@ -1222,6 +1226,7 @@ export default {
this.$modal.msgSuccess("用户认证信息更新成功");
this.openMember = false;
this.isEdit = false;
this.reset1();
this.getListMember();
});
} else {
@ -1238,6 +1243,7 @@ export default {
addCertifiedMember(this.form1).then(response => {
this.$modal.msgSuccess("新增用户认证信息成功");
this.openMember = false;
this.reset1();
this.getListMember();
});
}

View File

@ -150,7 +150,7 @@
</el-card>
<!-- 添加或修改对话框 -->
<el-dialog :title="title" :visible.sync="open" width="60%" append-to-body>
<el-dialog :title="title" :close-on-click-modal="false" :visible.sync="open" width="60%" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="120px">
<!-- <el-row>-->
<!-- <el-col :span="24">-->
@ -216,7 +216,7 @@
</el-col>
</el-row>
<el-row>
<el-col :span="9" style="display: flex;margin-bottom: 20px">
<el-col :span="8" style="display: flex;margin-bottom: 20px">
<template>
<span style="margin-right: 10px">核销权限</span>
<el-checkbox-group v-model="writeOff" ref="" @change="getCheckbox">
@ -229,8 +229,8 @@
</el-checkbox-group>
</template>
</el-col>
<el-col :span="15" style="display: flex">
<span style="margin-right: 10px">审核权限</span>
<el-col :span="16" style="display: flex">
<span style="margin-right: 10px;width: 70px">审核权限</span>
<el-checkbox-group v-model="auditPrem" @change="getCheckbox">
<el-checkbox
v-for="dict in dict.type.shqx"

View File

@ -8,6 +8,7 @@ import com.fuint.business.convenienceSore.vo.CvsGoodsVo;
import com.fuint.framework.web.BaseController;
import com.fuint.framework.web.ResponseObject;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
import java.util.List;
@ -58,7 +59,7 @@ public class CvsGoodsController extends BaseController {
return getSuccessResult(cvsGoods);
}
//删除
@DeleteMapping("detele/{id}")
@DeleteMapping("/{id}")
public ResponseObject selectDeleteId(@PathVariable Integer id)
{
@ -68,4 +69,9 @@ public class CvsGoodsController extends BaseController {
}
@PutMapping
public ResponseObject edit(@Validated @RequestBody CvsGoods goods){
int row = cvsGoodsService.updateCvsGood(goods);
return getSuccessResult(row);
}
}

View File

@ -0,0 +1,75 @@
package com.fuint.business.convenienceSore.controller;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.fuint.business.convenienceSore.entity.Supplier;
import com.fuint.business.convenienceSore.service.SupplierService;
import com.fuint.framework.web.BaseController;
import com.fuint.framework.web.ResponseObject;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
@RestController
@RequestMapping("/business/convenience/supplier")
public class SupplierController extends BaseController {
@Autowired
private SupplierService supplierService;
/**
* 根据条件查询供应商信息
* @param supplier
* @param pageNo
* @param pageSize
* @return
*/
@GetMapping("/list")
public ResponseObject list(Supplier supplier,
@RequestParam(value = "pageNo",defaultValue = "1") Integer pageNo,
@RequestParam(value = "pageSize",defaultValue = "10") Integer pageSize){
Page page =new Page(pageNo,pageSize);
IPage<Supplier> list = supplierService.selectSupplierList(page,supplier);
return getSuccessResult(list);
}
/**
* 根据id查询会员等级信息
* @param id
* @return
*/
@GetMapping("/{id}")
public ResponseObject staffInfo(@PathVariable Integer id){
Supplier supplier = supplierService.selectSupplierById(id);
return getSuccessResult(supplier);
}
/**
* 删除会员等级信息
* @return
*/
@DeleteMapping("/{id}")
public ResponseObject remove(@PathVariable Integer id){
supplierService.deleteSupplierById(id);
return getSuccessResult("操作成功");
}
/**
* 添加会员等级信息
* @param supplier
* @return
*/
@PostMapping
public ResponseObject add(@Validated @RequestBody Supplier supplier){
return getSuccessResult(supplierService.insertSupplier(supplier));
}
/**
* 修改会员等级信息
* @param supplier
* @return
*/
@PutMapping
public ResponseObject edit(@Validated @RequestBody Supplier supplier){
return getSuccessResult(supplierService.updateSupplier(supplier));
}
}

View File

@ -9,6 +9,8 @@ import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.io.Serializable;
/**
* @author :admin
* @date : 2023/10/16
@ -17,7 +19,8 @@ import lombok.Data;
@Data
@TableName("cvs_goods")
@ApiModel(value = "CvsGoods对象", description = "便利店表")
public class CvsGoods extends BaseEntity {
public class CvsGoods extends BaseEntity implements Serializable {
private static final long serialVersionUID = 1L;
//主键
@ApiModelProperty("自增ID")

View File

@ -0,0 +1,110 @@
package com.fuint.business.convenienceSore.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fuint.framework.entity.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.util.Date;
import java.io.Serializable;
/**
* 商品表(Goods)实体类
*/
@Data
@TableName("mt_goods")
@ApiModel(value = "LJGoods对象", description = "商品表")
public class LJGoods extends BaseEntity implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 自增ID
*/
@ApiModelProperty("自增ID")
@TableId(value = "ID", type = IdType.AUTO)
private Integer id;
/**
* 所属店铺ID
*/
@ApiModelProperty("所属店铺ID")
private Integer storeId;
/**
* 商品名称
*/
@ApiModelProperty("商品名称")
private String name;
/**
* 商品分类ID
*/
@ApiModelProperty("商品分类ID")
private Integer cvsGoodId;
/**
* 商品编码条码
*/
@ApiModelProperty("商品编码(条码)")
private String goodsNo;
/**
* 商品拼音码
*/
@ApiModelProperty("商品拼音码")
private String pinyinCode;
/**
* 货架号
*/
@ApiModelProperty("货架号")
private Integer shelfNumber;
/**
* 进货价
*/
@ApiModelProperty("进货价")
private Double buyingPrice;
/**
* 零售价
*/
@ApiModelProperty("零售价")
private Double retailPrice;
/**
* 会员价
*/
@ApiModelProperty("会员价")
private Double memberPrice;
/**
* 库存
*/
@ApiModelProperty("库存")
private Integer stock;
/**
* 单位
*/
@ApiModelProperty("单位")
private String unit;
/**
* 供应商
*/
@ApiModelProperty("供应商id")
private Integer supplierId;
/**
* 可否使用积分抵扣
*/
@ApiModelProperty("可否使用积分抵扣")
private String canUsePoint;
/**
* 排序
*/
@ApiModelProperty("排序")
private Integer sort;
/**
* 商品描述
*/
@ApiModelProperty("商品描述")
private String description;
/**
* 状态启用禁用
*/
@ApiModelProperty("状态:启用、禁用")
private String status;
}

View File

@ -0,0 +1,59 @@
package com.fuint.business.convenienceSore.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fuint.framework.entity.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.util.Date;
import java.io.Serializable;
/**
* 供应商表(Supplier)实体类
*/
@Data
@TableName("supplier")
@ApiModel(value = "Supplier对象", description = "供应商表")
public class Supplier extends BaseEntity implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 主键
*/
@ApiModelProperty("自增ID")
@TableId(value = "ID", type = IdType.AUTO)
private Integer id;
/**
* 供应商名称
*/
@ApiModelProperty("供应商名称")
private String name;
/**
* 联系人
*/
@ApiModelProperty("联系人")
private String contacts;
/**
* 联系电话
*/
@ApiModelProperty("联系电话")
private String mobile;
/**
* 联系地址
*/
@ApiModelProperty("联系地址")
private String address;
/**
* 备注信息
*/
@ApiModelProperty("备注信息")
private String remark;
/**
* 商铺id
*/
@ApiModelProperty("商铺id")
private Integer storeId;
}

View File

@ -19,6 +19,9 @@ public interface CvsGoodsMapper extends BaseMapper<CvsGoods> {
//查找一级菜单
IPage<CvsGoodsVo> selectCvsGoodsList(Page page , @Param("goods") CvsGoods goods);
//查找一级菜单
IPage<CvsGoods> queryCvsGoodsList(Page page , @Param("goods") CvsGoods goods);
//查找二级菜单
List<CvsGoodsVo> selectCvsGoodsTreeList(CvsGoods goods);

View File

@ -0,0 +1,18 @@
package com.fuint.business.convenienceSore.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.fuint.business.convenienceSore.entity.LJGoods;
import com.fuint.business.userManager.entity.LJUser;
import org.apache.ibatis.annotations.Param;
public interface LJGoodsMapper extends BaseMapper<LJGoods> {
/**
* 根据条件分页查询会员信息
* @param page
* @param goods
* @return
*/
public IPage<LJGoods> selectLJGoodsList(Page page, @Param("goods") LJGoods goods);
}

View File

@ -0,0 +1,18 @@
package com.fuint.business.convenienceSore.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.fuint.business.convenienceSore.entity.LJGoods;
import com.fuint.business.convenienceSore.entity.Supplier;
import org.apache.ibatis.annotations.Param;
public interface SupplierMapper extends BaseMapper<Supplier> {
/**
* 根据条件分页查询会员信息
* @param page
* @param supplier
* @return
*/
public IPage<Supplier> selectSupplierList(Page page, @Param("supplier") Supplier supplier);
}

View File

@ -6,6 +6,10 @@
select id,pid,category_name,code,sorted, status, create_time, create_by, update_time, update_by from cvs_goods
</sql>
<sql id="selectCvsGood">
select * from cvs_goods
</sql>
<!--判断新增是否重复 -->
<select id="selectGoodsList" parameterType="com.fuint.business.convenienceSore.entity.CvsGoods" resultType="com.fuint.business.convenienceSore.entity.CvsGoods" >
<include refid="selectCvsGoods"></include>
@ -30,7 +34,7 @@
pTable.id,
pTable.pid,
pTable.category_name,
pTable.`CODE`,
pTable.`code`,
pTable.sorted,
pTable.`STATUS`,
pTable.create_time,
@ -42,6 +46,7 @@
left join
(SELECT * from cvs_goods WHERE pid != 0) cTable on pTable.id = cTable.pid
<where>
pTable.store_id = #{goods.storeId}
<if test="goods.status != null and goods.status != ''">
and pTable.status = #{goods.status}
</if>
@ -52,6 +57,18 @@
</where>
group by pTable.id
order by sorted
<!-- <include refid="selectCvsGood"></include>-->
<!-- <where>-->
<!-- store_id = #{goods.storeId}-->
<!-- <if test="goods.categoryName != null and goods.categoryName != ''">-->
<!-- and category_name like concat('%', #{goods.categoryName}, '%')-->
<!-- </if>-->
<!-- <if test="goods.status != null and goods.status != ''">-->
<!-- and status = #{goods.status}-->
<!-- </if>-->
<!-- </where>-->
<!-- order by sorted-->
</select>
<!--查找二级分类-->
@ -82,6 +99,22 @@
</where>
order by sorted
</select>
<select id="queryCvsGoodsList" resultType="com.fuint.business.convenienceSore.entity.CvsGoods">
<include refid="selectCvsGood"></include>
<where>
store_id = #{goods.storeId} and pid = 0
<if test="goods.categoryName != null and goods.categoryName != ''">
and category_name like concat('%', #{goods.categoryName}, '%')
</if>
<if test="goods.status != null and goods.status != ''">
and status = #{goods.status}
</if>
</where>
order by sorted
</select>
<!-- 根据id删除分类信息-->
<delete id="deleteByIdVo">
DELETE FROM cvs_goods WHERE id=#{id}
</delete>

View File

@ -0,0 +1,23 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.fuint.business.convenienceSore.mapper.LJGoodsMapper">
<sql id="selectLJGoods">
select * from mt_goods
</sql>
<select id="selectLJGoodsList" resultType="com.fuint.business.convenienceSore.entity.LJGoods">
<include refid="selectLJGoods"></include>
<where>
store_id = #{goods.storeId}
<!-- <if test="pid != null">-->
<!-- and pid = #{pid}-->
<!-- </if>-->
<!-- <if test="categoryName != null and categoryName != ''">-->
<!-- and category_name = #{categoryName}-->
<!-- </if>-->
<!-- <if test="sorted != null and sorted != ''">-->
<!-- and sorted = #{sorted}-->
<!-- </if>-->
</where>
</select>
</mapper>

View File

@ -0,0 +1,23 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.fuint.business.convenienceSore.mapper.SupplierMapper">
<sql id="selectSupplier">
select * from supplier
</sql>
<select id="selectSupplierList" resultType="com.fuint.business.convenienceSore.entity.Supplier">
<include refid="selectSupplier"></include>
<where>
store_id = #{goods.storeId}
<!-- <if test="pid != null">-->
<!-- and pid = #{pid}-->
<!-- </if>-->
<!-- <if test="categoryName != null and categoryName != ''">-->
<!-- and category_name = #{categoryName}-->
<!-- </if>-->
<!-- <if test="sorted != null and sorted != ''">-->
<!-- and sorted = #{sorted}-->
<!-- </if>-->
</where>
</select>
</mapper>

View File

@ -46,4 +46,10 @@ public interface CvsGoodsService {
* @param id
*/
void deleteByIdVo(Integer id);
/**
* 修改商品信息
* @param goods
*/
int updateCvsGood(CvsGoods goods);
}

View File

@ -0,0 +1,41 @@
package com.fuint.business.convenienceSore.service;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.fuint.business.convenienceSore.entity.LJGoods;
public interface LJGoodsService {
/**
* 根据条件分页查询固定等级信息
* @param page
* @return
*/
public IPage<LJGoods> selectLJGoodsList(Page page, LJGoods goods);
/**
* 根据id查询固定等级信息
* @param id
* @return
*/
public LJGoods selectLJGoodsById(int id);
/**
* 根据id删除固定等级信息
* @param id
*/
public void deleteLJGoodsById(Integer id);
/**
* 增加固定等级信息
* @param goods
* @return
*/
public int insertLJGoods(LJGoods goods);
/**
* 修改固定等级信息
* @param goods
* @return
*/
public int updateLJGoods(LJGoods goods);
}

View File

@ -0,0 +1,44 @@
package com.fuint.business.convenienceSore.service;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.fuint.business.convenienceSore.entity.Supplier;
/**
* 供应商信息 业务层
*/
public interface SupplierService {
/**
* 根据条件分页查询供应商信息
* @param page
* @return
*/
public IPage<Supplier> selectSupplierList(Page page, Supplier supplier);
/**
* 根据id查询供应商信息
* @param id
* @return
*/
public Supplier selectSupplierById(int id);
/**
* 根据id删除供应商信息
* @param id
*/
public void deleteSupplierById(Integer id);
/**
* 增加供应商信息
* @param supplier
* @return
*/
public int insertSupplier(Supplier supplier);
/**
* 修改供应商信息
* @param supplier
* @return
*/
public int updateSupplier(Supplier supplier);
}

View File

@ -25,7 +25,9 @@ import java.util.stream.Collectors;
@Service
public class CvsGoodsServiceImpl extends ServiceImpl<CvsGoodsMapper,CvsGoods> implements CvsGoodsService {
/**添加商品信息*/
/**
* 添加商品信息
*/
@Transactional
public int insertCvsGoods( CvsGoods cvsGoods){
//查找分类名称是否存在
@ -40,8 +42,16 @@ public class CvsGoodsServiceImpl extends ServiceImpl<CvsGoodsMapper,CvsGoods> im
}
}
/**
* 根据条件分页查询商品信息
* @param page
* @param g
* @return
*/
public IPage<CvsGoodsVo> selectTree(Page page, CvsGoods g){
AccountInfo nowAccountInfo1 = TokenUtil.getNowAccountInfo();
Integer storeId = nowAccountInfo1.getStoreId();
g.setStoreId(storeId);
// 查询全部数据
IPage<CvsGoodsVo> cvsGoodsPage= baseMapper.selectCvsGoodsList(page,g);//一节点
List<CvsGoodsVo> cvsGoodsList = cvsGoodsPage.getRecords();
@ -60,6 +70,7 @@ public class CvsGoodsServiceImpl extends ServiceImpl<CvsGoodsMapper,CvsGoods> im
cvsGoodsVo.setCategoryName(goods.getCategoryName());
cvsGoodsVo.setPid(goods.getPid());
cvsGoodsVo.setStatus(goods.getStatus());
cvsGoodsVo.setCode(goods.getCode());
cvsGoodsVo.setCreateTime(new Date());
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
cvsGoodsVo.setCreateBy(nowAccountInfo.getId().toString());
@ -109,9 +120,23 @@ public class CvsGoodsServiceImpl extends ServiceImpl<CvsGoodsMapper,CvsGoods> im
public CvsGoods selectParentById(Integer id){
return baseMapper.selectById(id);
}
// 删除
/**
* 根据id删除商品信息
* @param id
*/
@Override
public void deleteByIdVo(Integer id){
baseMapper.deleteByIdVo(id);
}
/**
* 修改商品信息
* @param goods
*/
@Override
public int updateCvsGood(CvsGoods goods) {
int row = baseMapper.updateById(goods);
return row;
}
}

View File

@ -0,0 +1,75 @@
package com.fuint.business.convenienceSore.service.impl;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.fuint.business.convenienceSore.entity.LJGoods;
import com.fuint.business.convenienceSore.mapper.LJGoodsMapper;
import com.fuint.business.convenienceSore.service.LJGoodsService;
import com.fuint.common.dto.AccountInfo;
import com.fuint.common.util.TokenUtil;
import org.springframework.stereotype.Service;
/**
* 固定等级信息 业务层
*/
@Service
public class LJGoodsServiceImpl extends ServiceImpl<LJGoodsMapper, LJGoods> implements LJGoodsService {
/**
* 根据条件分页查询固定等级信息
* @param page
* @return
*/
@Override
public IPage<LJGoods> selectLJGoodsList(Page page, LJGoods goods) {
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
Integer storeId = nowAccountInfo.getStoreId();
goods.setStoreId(storeId);
IPage<LJGoods> goodsIPage = baseMapper.selectLJGoodsList(page, goods);
return goodsIPage;
}
/**
* 根据id查询固定等级信息
* @param id
* @return
*/
@Override
public LJGoods selectLJGoodsById(int id) {
return baseMapper.selectById(id);
}
/**
* 根据id删除固定等级信息
* @param id
*/
@Override
public void deleteLJGoodsById(Integer id) {
baseMapper.deleteById(id);
}
/**
* 增加固定等级信息
* @param goods
* @return
*/
@Override
public int insertLJGoods(LJGoods goods) {
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
Integer storeId = nowAccountInfo.getStoreId();
goods.setStoreId(storeId);
int row = baseMapper.insert(goods);
return row;
}
/**
* 修改固定等级信息
* @param goods
* @return
*/
@Override
public int updateLJGoods(LJGoods goods) {
int row = baseMapper.updateById(goods);
return row;
}
}

View File

@ -0,0 +1,75 @@
package com.fuint.business.convenienceSore.service.impl;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.fuint.business.convenienceSore.entity.Supplier;
import com.fuint.business.convenienceSore.mapper.SupplierMapper;
import com.fuint.business.convenienceSore.service.SupplierService;
import com.fuint.common.dto.AccountInfo;
import com.fuint.common.util.TokenUtil;
import org.springframework.stereotype.Service;
/**
* 供应商 业务层
*/
@Service
public class SupplierServiceImpl extends ServiceImpl<SupplierMapper, Supplier> implements SupplierService {
/**
* 根据条件分页查询供应商信息
* @param page
* @return
*/
@Override
public IPage<Supplier> selectSupplierList(Page page, Supplier supplier) {
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
Integer storeId = nowAccountInfo.getStoreId();
supplier.setStoreId(storeId);
IPage<Supplier> supplierIPage = baseMapper.selectSupplierList(page, supplier);
return supplierIPage;
}
/**
* 根据id查询供应商信息
* @param id
* @return
*/
@Override
public Supplier selectSupplierById(int id) {
return baseMapper.selectById(id);
}
/**
* 根据id删除供应商信息
* @param id
*/
@Override
public void deleteSupplierById(Integer id) {
baseMapper.deleteById(id);
}
/**
* 增加供应商信息
* @param supplier
* @return
*/
@Override
public int insertSupplier(Supplier supplier) {
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
Integer storeId = nowAccountInfo.getStoreId();
supplier.setStoreId(storeId);
int row = baseMapper.insert(supplier);
return row;
}
/**
* 修改供应商信息
* @param supplier
* @return
*/
@Override
public int updateSupplier(Supplier supplier) {
int row = baseMapper.updateById(supplier);
return row;
}
}

View File

@ -71,6 +71,11 @@ public class CertifiedMember extends BaseEntity implements Serializable {
*/
@ApiModelProperty("认证状态")
private String status;
/**
* 商户id
*/
@ApiModelProperty("商户id")
private Integer storeId;
/**
* 图片URL
*/

View File

@ -8,6 +8,7 @@ import com.baomidou.mybatisplus.annotation.TableName;
import com.fuint.framework.entity.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import io.swagger.models.auth.In;
import lombok.Getter;
import lombok.Setter;
@ -22,7 +23,7 @@ import java.util.List;
@Getter
@Setter
@TableName("fixing_level")
@ApiModel(value = "FixingLevel对象", description = "")
@ApiModel(value = "FixingLevel对象", description = "固定等级表")
public class FixingLevel extends BaseEntity implements Serializable {
private static final long serialVersionUID = 1L;
@ -117,6 +118,11 @@ public class FixingLevel extends BaseEntity implements Serializable {
*/
@ApiModelProperty("二维码")
private String qrCode;
/**
* 商户id
*/
@ApiModelProperty("商户id")
private Integer storeId;
@TableField(exist = false)
private List<JSONObject> gasolineRuleList;

View File

@ -8,6 +8,7 @@
<select id="selectCertifiedMemberList" resultType="com.fuint.business.userManager.entity.CertifiedMember">
<include refid="selectCertifiedMember"></include>
<where>
store_id = #{certifiedMember.storeId}
<if test="certifiedMember.mobile != null and certifiedMember.mobile != ''">
and mobile like concat('%', #{certifiedMember.mobile}, '%')
</if>

View File

@ -8,6 +8,7 @@
<select id="selectFixingLevelList" resultType="com.fuint.business.userManager.entity.FixingLevel">
<include refid="selectFixingLevel"></include>
<where>
store_id = #{fixingLevel.storeId}
<if test="fixingLevel.status != null and fixingLevel.status != ''">
and status = #{fixingLevel.status}
</if>

View File

@ -14,7 +14,9 @@ import com.fuint.business.userManager.mapper.FixingLevelMapper;
import com.fuint.business.userManager.service.CertifiedMemberService;
import com.fuint.business.userManager.service.FixingLevelService;
import com.fuint.business.userManager.service.LJUserService;
import com.fuint.common.dto.AccountInfo;
import com.fuint.common.util.StringUtils;
import com.fuint.common.util.TokenUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
@ -35,6 +37,9 @@ public class CertifiedMemberServiceImpl extends ServiceImpl<CertifiedMemberMappe
*/
@Override
public IPage<CertifiedMember> selectCertifiedMemberList(Page page, CertifiedMember certifiedMember) {
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
Integer storeId = nowAccountInfo.getStoreId();
certifiedMember.setStoreId(storeId);
IPage<CertifiedMember> fixingLevelIPage = baseMapper.selectCertifiedMemberList(page, certifiedMember);
for (CertifiedMember record : fixingLevelIPage.getRecords()) {
if (StringUtils.isNotEmpty(record.getAttestationData())){
@ -115,6 +120,9 @@ public class CertifiedMemberServiceImpl extends ServiceImpl<CertifiedMemberMappe
certifiedMember.setName(ljUser.getName());
certifiedMember.setUserId(ljUser.getId());
}
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
Integer storeId = nowAccountInfo.getStoreId();
certifiedMember.setStoreId(storeId);
int row = baseMapper.insert(certifiedMember);
return row;
}

View File

@ -9,7 +9,9 @@ import com.fuint.business.userManager.entity.FixingLevel;
import com.fuint.business.userManager.entity.LJUserGrade;
import com.fuint.business.userManager.mapper.FixingLevelMapper;
import com.fuint.business.userManager.service.FixingLevelService;
import com.fuint.common.dto.AccountInfo;
import com.fuint.common.util.StringUtils;
import com.fuint.common.util.TokenUtil;
import org.springframework.stereotype.Service;
/**
@ -24,6 +26,9 @@ public class FixingLevelServiceImpl extends ServiceImpl<FixingLevelMapper, Fixin
*/
@Override
public IPage<FixingLevel> selectFixingLevelList(Page page, FixingLevel fixingLevel) {
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
Integer storeId = nowAccountInfo.getStoreId();
fixingLevel.setStoreId(storeId);
IPage<FixingLevel> fixingLevelIPage = baseMapper.selectFixingLevelList(page, fixingLevel);
for (FixingLevel record : fixingLevelIPage.getRecords()) {
if (StringUtils.isNotEmpty(record.getGasolineRule())){
@ -65,6 +70,9 @@ public class FixingLevelServiceImpl extends ServiceImpl<FixingLevelMapper, Fixin
*/
@Override
public int insertFixingLevel(FixingLevel fixingLevel) {
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
Integer storeId = nowAccountInfo.getStoreId();
fixingLevel.setStoreId(storeId);
int row = baseMapper.insert(fixingLevel);
return row;
}