积分订单
This commit is contained in:
parent
630f95dfb0
commit
96497a7be9
@ -26,3 +26,13 @@ export function getGiftApi(data) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// 修改库存
|
||||||
|
export function updateGiftInventoryApi(data) {
|
||||||
|
return request({
|
||||||
|
url: 'business/integral/integralGift/updateInventory',
|
||||||
|
method: 'get',
|
||||||
|
params: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
|
37
fuintAdmin/src/api/integral/order.js
Normal file
37
fuintAdmin/src/api/integral/order.js
Normal file
@ -0,0 +1,37 @@
|
|||||||
|
import request from "@/utils/request";
|
||||||
|
|
||||||
|
// 查询列表
|
||||||
|
export function getOrderApi(data) {
|
||||||
|
return request({
|
||||||
|
url: 'business/integral/integralOrders/queryByPage',
|
||||||
|
method: 'get',
|
||||||
|
params: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 新增有关信息
|
||||||
|
export function insertOrderApi(data) {
|
||||||
|
return request({
|
||||||
|
url: 'business/integral/integralOrders',
|
||||||
|
method: 'post',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
// 修改有关信息
|
||||||
|
export function updateOrderApi(data) {
|
||||||
|
return request({
|
||||||
|
url: 'business/integral/integralOrders',
|
||||||
|
method: 'put',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function getStatisticsApi(data) {
|
||||||
|
return request({
|
||||||
|
url: 'business/integral/integralOrders/statistics',
|
||||||
|
method: 'get',
|
||||||
|
params: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
|
@ -44,7 +44,11 @@
|
|||||||
v-loading="loading"
|
v-loading="loading"
|
||||||
:data="dataList"
|
:data="dataList"
|
||||||
:default-sort="defaultSort">
|
:default-sort="defaultSort">
|
||||||
<el-table-column label="分类" align="center" prop="categoryName" width="50px"/>
|
<el-table-column label="分类" align="center" prop="categoryName" width="50px">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
{{ scope.row.categoryName==null? '不分类': scope.row.categoryName}}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
<el-table-column label="礼品信息" align="center">
|
<el-table-column label="礼品信息" align="center">
|
||||||
<el-table-column label="名称" align="center" prop="giftName"/>
|
<el-table-column label="名称" align="center" prop="giftName"/>
|
||||||
<el-table-column label="封面图" align="center" prop="coverImage">
|
<el-table-column label="封面图" align="center" prop="coverImage">
|
||||||
@ -80,7 +84,13 @@
|
|||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="配送类型" align="center">
|
<el-table-column label="配送类型" align="center">
|
||||||
<el-table-column label="配送方式" align="center" prop="deliveryMethod"/>
|
<el-table-column label="配送方式" align="center" prop="deliveryMethod">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<span v-for="(row, index) in JSON.parse(scope.row.deliveryMethod)" :key="index">
|
||||||
|
{{row}}<br>
|
||||||
|
</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
<el-table-column label="快递费用" align="center" prop="shippingFeeAmount">
|
<el-table-column label="快递费用" align="center" prop="shippingFeeAmount">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<span v-if ="scope.row.exchangeMethod!= null && !scope.row.exchangeMethod.includes('物流配送')">--</span>
|
<span v-if ="scope.row.exchangeMethod!= null && !scope.row.exchangeMethod.includes('物流配送')">--</span>
|
||||||
@ -92,15 +102,17 @@
|
|||||||
<el-table-column label="礼品库存信息" align="center">
|
<el-table-column label="礼品库存信息" align="center">
|
||||||
<el-table-column label="总库存" align="center" prop="totalInventory" >
|
<el-table-column label="总库存" align="center" prop="totalInventory" >
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-button type="text" @click="clickInventory(scope.row)">{{ scope.row.totalInventory }}</el-button>
|
<el-button type="text" @click="clickInventory(scope.row)">{{ scope.row.totalInventory===-1?'无限制': scope.row.totalInventory}}</el-button>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="已用" align="center" prop="">
|
<el-table-column label="已用" align="center" prop="usedInventory">
|
||||||
|
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="可用" align="center" prop="remainingInventory">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<span>{{ scope.row.totalInventory-scope.row.remainingInventory }}</span>
|
<span>{{ scope.row.totalInventory===-1?scope.row.totalInventory-scope.row.usedInventory+1: scope.row.totalInventory-scope.row.usedInventory}}</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="可用" align="center" prop="remainingInventory"/>
|
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="排序" align="center" prop="sort" />
|
<el-table-column label="排序" align="center" prop="sort" />
|
||||||
<el-table-column label="状态" align="center" prop="status">
|
<el-table-column label="状态" align="center" prop="status">
|
||||||
@ -144,10 +156,12 @@
|
|||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="9">
|
<el-col :span="9">
|
||||||
<el-form-item label="分类" prop="categoryId">
|
<el-form-item label="分类" prop="categoryId">
|
||||||
<el-select v-model="dataForm.categoryId" placeholder="请选择礼品分类" style="width:100%">
|
<el-select clearable v-model="dataForm.categoryId" placeholder="请选择礼品分类" style="width:100%">
|
||||||
|
<el-option label="-不分类-" value=""></el-option>
|
||||||
<el-option
|
<el-option
|
||||||
v-for="option in giftCategoryList"
|
v-for="option in giftCategoryList"
|
||||||
:key="option.id"
|
:key="option.id"
|
||||||
|
|
||||||
:label="option.categoryName"
|
:label="option.categoryName"
|
||||||
:value="option.id"
|
:value="option.id"
|
||||||
></el-option>
|
></el-option>
|
||||||
@ -257,7 +271,7 @@
|
|||||||
|
|
||||||
<el-form-item v-if="showList.goods" label="关联商品" prop="goodsId">
|
<el-form-item v-if="showList.goods" label="关联商品" prop="goodsId">
|
||||||
<el-input v-model="dataForm.goodsName" placeholder="" maxlength="30" style="width: 202px;" @focus="getCommodity"/>
|
<el-input v-model="dataForm.goodsName" placeholder="" maxlength="30" style="width: 202px;" @focus="getCommodity"/>
|
||||||
</el-select>
|
<!-- </el-select> -->
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="7">
|
<el-col :span="7">
|
||||||
@ -275,7 +289,7 @@
|
|||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="7">
|
<el-col :span="7">
|
||||||
<el-form-item label="礼品库存" prop="totalInventory">
|
<el-form-item label="礼品库存" prop="totalInventory">
|
||||||
<el-input v-model="dataForm.totalInventory" placeholder="礼品库存" maxlength="30" style="width: 202px;"/>
|
<el-input v-model.number="dataForm.totalInventory" placeholder="礼品库存" maxlength="30" style="width: 202px;"/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
@ -363,7 +377,7 @@
|
|||||||
<el-row :gutter="24">
|
<el-row :gutter="24">
|
||||||
<el-col :span="8">
|
<el-col :span="8">
|
||||||
<el-form-item label="兑换次数" prop="exchangeTimes">
|
<el-form-item label="兑换次数" prop="exchangeTimes">
|
||||||
<el-input v-model="dataForm.exchangeTimes" placeholder="" maxlength="30" style="width: 202px;">
|
<el-input v-model.number="dataForm.exchangeTimes" placeholder="" maxlength="30" style="width: 202px;">
|
||||||
<template slot="append">个</template>
|
<template slot="append">个</template>
|
||||||
</el-input>
|
</el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
@ -489,13 +503,49 @@
|
|||||||
</el-dialog>
|
</el-dialog>
|
||||||
|
|
||||||
|
|
||||||
<el-dialog title="库存变更" :visible.sync="openInventory" width="1000px" append-to-body :close-on-click-modal="false">
|
<el-dialog title="库存变更" :visible.sync="openInventory" width="500px" append-to-body :close-on-click-modal="false">
|
||||||
|
<el-form ref="form" :model="inventoryForm" :rules="rulesInventory" label-width="100px">
|
||||||
|
<el-form-item label="当前总库存" prop="totalInventory" >
|
||||||
|
<el-input disabled v-model="inventoryForm.totalInventory" placeholder="" maxlength="30" style="width: 270px;">
|
||||||
|
</el-input>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="已用库存" prop="usedInventory" >
|
||||||
|
<el-input disabled v-model="inventoryForm.usedInventory" placeholder="" maxlength="30" style="width: 270px;">
|
||||||
|
</el-input>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="可用库存" prop="remainingInventory" >
|
||||||
|
<el-input disabled v-model="inventoryForm.remainingInventory" placeholder="" maxlength="30" style="width: 270px;">
|
||||||
|
</el-input>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="变更类型" prop="moneyRatio" >
|
||||||
|
<el-radio-group :disabled="inventoryForm.flag" v-model="inventoryForm.inventoryFlag">
|
||||||
|
<el-radio :label="0">增加库存</el-radio>
|
||||||
|
<el-radio :label="1">减少库存</el-radio>
|
||||||
|
<el-radio :label="2">不限库存</el-radio>
|
||||||
|
</el-radio-group>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="库存数量" prop="editInventory" >
|
||||||
|
<el-input v-if="inventoryForm.inventoryFlag == 0" v-model.number="inventoryForm.editInventory" placeholder="" maxlength="30" style="width: 270px;">
|
||||||
|
<template slot="prepend">+</template>
|
||||||
|
</el-input>
|
||||||
|
<el-input v-else-if="inventoryForm.inventoryFlag == 1" v-model.number="inventoryForm.editInventory" placeholder="" maxlength="30" style="width: 270px;">
|
||||||
|
<template slot="prepend">-</template>
|
||||||
|
</el-input>
|
||||||
|
<el-input v-else="" disabled placeholder="变更为不限制库存" maxlength="30" style="width: 270px;"/>
|
||||||
|
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
<div slot="footer" class="dialog-footer">
|
||||||
|
<el-button type="primary" @click="submitInventory">确 定</el-button>
|
||||||
|
<el-button @click="cancelInventory">取 消</el-button>
|
||||||
|
</div>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import {getGiftCategoryApi} from "@/api/integral/category";
|
import {getGiftCategoryApi} from "@/api/integral/category";
|
||||||
import {getGiftApi,insertGiftApi,updateGiftApi } from "@/api/integral/gift";
|
import {getGiftApi,insertGiftApi,updateGiftApi ,updateGiftInventoryApi} from "@/api/integral/gift";
|
||||||
import { editor } from '@/components/Editor/index'
|
import { editor } from '@/components/Editor/index'
|
||||||
import { getToken } from '@/utils/auth'
|
import { getToken } from '@/utils/auth'
|
||||||
import {listLJGoods} from "@/api/convenienceStore/ljgoods";
|
import {listLJGoods} from "@/api/convenienceStore/ljgoods";
|
||||||
@ -506,6 +556,16 @@ export default {
|
|||||||
dicts: ['zhzt','lplx','redemptionMethod','expressShippingCosts','shippingMethod'],
|
dicts: ['zhzt','lplx','redemptionMethod','expressShippingCosts','shippingMethod'],
|
||||||
|
|
||||||
data() {
|
data() {
|
||||||
|
var valiNumberPass = (rule, value, callback) => {//包含小数的数字
|
||||||
|
let reg = /^[+-]?(0|([1-9]\d*))(\.\d+)?$/g;
|
||||||
|
if (value === '') {
|
||||||
|
callback(new Error('请输入内容'));
|
||||||
|
} else if (!reg.test(value)) {
|
||||||
|
callback(new Error('请输入数字'));
|
||||||
|
} else {
|
||||||
|
callback();
|
||||||
|
}
|
||||||
|
};
|
||||||
return {
|
return {
|
||||||
dataList: [],
|
dataList: [],
|
||||||
|
|
||||||
@ -537,6 +597,18 @@ export default {
|
|||||||
market:null
|
market:null
|
||||||
},
|
},
|
||||||
|
|
||||||
|
inventoryForm: {
|
||||||
|
inventoryFlag: 0,
|
||||||
|
remainingInventory: null, // 剩余库存
|
||||||
|
totalInventory: null, //总库存
|
||||||
|
usedInventory: null, // 已用库存
|
||||||
|
editInventory: null,
|
||||||
|
flag: false,
|
||||||
|
id:''
|
||||||
|
},
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
showList: {
|
showList: {
|
||||||
// 优惠类型展示
|
// 优惠类型展示
|
||||||
coupon: true,
|
coupon: true,
|
||||||
@ -563,6 +635,7 @@ export default {
|
|||||||
// 总条数
|
// 总条数
|
||||||
open: false,
|
open: false,
|
||||||
openCommodity: false,
|
openCommodity: false,
|
||||||
|
openInventory: false,
|
||||||
total: 0,
|
total: 0,
|
||||||
// 查询参数
|
// 查询参数
|
||||||
queryParams: {
|
queryParams: {
|
||||||
@ -598,7 +671,7 @@ export default {
|
|||||||
|
|
||||||
dialogImageUrl: "",
|
dialogImageUrl: "",
|
||||||
dialogVisible: false,
|
dialogVisible: false,
|
||||||
|
rulesInventory: {},
|
||||||
rules: {
|
rules: {
|
||||||
giftName: [
|
giftName: [
|
||||||
{ required: true, message: "礼品名称不能为空", trigger: "blur" },
|
{ required: true, message: "礼品名称不能为空", trigger: "blur" },
|
||||||
@ -628,19 +701,22 @@ export default {
|
|||||||
{ required: true, message: "兑换方式不能为空", trigger: "blur" },
|
{ required: true, message: "兑换方式不能为空", trigger: "blur" },
|
||||||
],
|
],
|
||||||
exchangePoints: [
|
exchangePoints: [
|
||||||
{ required: true, message: "兑换积分不能为空", trigger: "blur" },
|
{ required: true, validator:valiNumberPass, trigger: "blur" },
|
||||||
],
|
],
|
||||||
exchangeAmount: [
|
exchangeAmount: [
|
||||||
{ required: true, message: "兑换金额不能为空", trigger: "blur" },
|
{ required: true, validator:valiNumberPass, trigger: "blur" },
|
||||||
],
|
],
|
||||||
moneyRatio: [
|
moneyRatio: [
|
||||||
{ required: true, message: "加钱比例不能为空", trigger: "blur" },
|
{ required: true, validator:valiNumberPass, trigger: "blur" },
|
||||||
],
|
],
|
||||||
expressShippingFee: [
|
expressShippingFee: [
|
||||||
{ required: true, message: "快递运费不能为空", trigger: "change" },
|
{ required: true, message: "快递运费不能为空", trigger: "change" },
|
||||||
],
|
],
|
||||||
shippingFeeAmount: [
|
shippingFeeAmount: [
|
||||||
{ required: true, message: "运费金额不能为空", trigger: "blur" },
|
{ required: true, validator:valiNumberPass, trigger: "blur" },
|
||||||
|
],
|
||||||
|
market: [
|
||||||
|
{ required: true, validator:valiNumberPass, trigger: "blur" },
|
||||||
],
|
],
|
||||||
exchangeTimes: [
|
exchangeTimes: [
|
||||||
{ required: true, message: "兑换次数不能为空", trigger: "change" },
|
{ required: true, message: "兑换次数不能为空", trigger: "change" },
|
||||||
@ -698,7 +774,7 @@ export default {
|
|||||||
this_.dataForm.giftImages = JSON.stringify(this_.giftImages);
|
this_.dataForm.giftImages = JSON.stringify(this_.giftImages);
|
||||||
}
|
}
|
||||||
if (this_.dataForm.deliveryMethod != null && Array.isArray(this_.dataForm.deliveryMethod)) {
|
if (this_.dataForm.deliveryMethod != null && Array.isArray(this_.dataForm.deliveryMethod)) {
|
||||||
this_.dataForm.deliveryMethod = JSON.stringify(thithis_s.dataForm.deliveryMethod);
|
this_.dataForm.deliveryMethod = JSON.stringify(this.dataForm.deliveryMethod);
|
||||||
}
|
}
|
||||||
this_.dataForm.remainingInventory = this_.dataForm.totalInventory
|
this_.dataForm.remainingInventory = this_.dataForm.totalInventory
|
||||||
|
|
||||||
@ -720,6 +796,38 @@ export default {
|
|||||||
}})
|
}})
|
||||||
},
|
},
|
||||||
|
|
||||||
|
submitInventory: function(){
|
||||||
|
if (this.inventoryForm.inventoryFlag === 1) {
|
||||||
|
this.inventoryForm.editInventory = - this.inventoryForm.editInventory
|
||||||
|
} else if(this.inventoryForm.inventoryFlag === 2) {
|
||||||
|
this.inventoryForm.editInventory = -this.inventoryForm.totalInventory - 1
|
||||||
|
}
|
||||||
|
if (this.inventoryForm.totalInventory == '无限制') {
|
||||||
|
this.inventoryForm.editInventory = this.inventoryForm.editInventory+1
|
||||||
|
}
|
||||||
|
updateGiftInventoryApi(this.inventoryForm).then(res=>{
|
||||||
|
|
||||||
|
this.getList();
|
||||||
|
})
|
||||||
|
|
||||||
|
this.openInventory = false
|
||||||
|
|
||||||
|
this.resInventoryForm()
|
||||||
|
|
||||||
|
},
|
||||||
|
|
||||||
|
resInventoryForm() {
|
||||||
|
this.inventoryForm = {
|
||||||
|
inventoryFlag: 0,
|
||||||
|
remainingInventory: null, // 剩余库存
|
||||||
|
totalInventory: null, //总库存
|
||||||
|
usedInventory: null, // 已用库存
|
||||||
|
editInventory: null,
|
||||||
|
flag: false,
|
||||||
|
id:''
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
|
||||||
// 新增
|
// 新增
|
||||||
giftAdd() {
|
giftAdd() {
|
||||||
@ -734,6 +842,14 @@ export default {
|
|||||||
cancel() {
|
cancel() {
|
||||||
this.open = false;
|
this.open = false;
|
||||||
this.reset();
|
this.reset();
|
||||||
|
},
|
||||||
|
|
||||||
|
// 取消按钮
|
||||||
|
cancelInventory() {
|
||||||
|
this.openInventory = false;
|
||||||
|
this.resInventoryForm()
|
||||||
|
|
||||||
|
|
||||||
},
|
},
|
||||||
// 搜索按钮操作
|
// 搜索按钮操作
|
||||||
handleQuery() {
|
handleQuery() {
|
||||||
@ -742,12 +858,10 @@ export default {
|
|||||||
},
|
},
|
||||||
// 修改按钮
|
// 修改按钮
|
||||||
handleUpdate(data) {
|
handleUpdate(data) {
|
||||||
console.log("1111111111111")
|
|
||||||
let fileList = JSON.parse(data.giftImages);
|
let fileList = JSON.parse(data.giftImages);
|
||||||
this.giftImages = [],
|
this.giftImages = [],
|
||||||
|
|
||||||
this.giftImages = fileList;
|
this.giftImages = fileList;
|
||||||
console.log("22222222222222")
|
|
||||||
|
|
||||||
console.log( this.giftImages);
|
console.log( this.giftImages);
|
||||||
|
|
||||||
@ -800,11 +914,47 @@ export default {
|
|||||||
status: '启用',
|
status: '启用',
|
||||||
market:null
|
market:null
|
||||||
}
|
}
|
||||||
|
this.giftImages=[]
|
||||||
|
|
||||||
},
|
},
|
||||||
|
|
||||||
clickInventory(data) {
|
clickInventory(data) {
|
||||||
alert("hello world")
|
this.resInventoryForm()
|
||||||
|
|
||||||
|
this.openInventory = true
|
||||||
|
this.inventoryForm.id = data.id
|
||||||
|
|
||||||
|
console.log("data.usedInventory",data.usedInventory)
|
||||||
|
if (data.usedInventory == null || data.usedInventory == undefined) {
|
||||||
|
this.inventoryForm.usedInventory = 0
|
||||||
|
}else {
|
||||||
|
this.inventoryForm.usedInventory = data.usedInventory
|
||||||
|
}
|
||||||
|
if (data.totalInventory == 0) {
|
||||||
|
this.inventoryForm.totalInventory = 0
|
||||||
|
this.inventoryForm.remainingInventory = 0
|
||||||
|
}else if (data.totalInventory === -1) {
|
||||||
|
this.inventoryForm.flag = true
|
||||||
|
this.inventoryForm.totalInventory = '无限制'
|
||||||
|
this.inventoryForm.remainingInventory = '无限制'
|
||||||
|
} else {
|
||||||
|
this.inventoryForm.totalInventory = data.totalInventory
|
||||||
|
this.inventoryForm.remainingInventory = data.totalInventory - data.usedInventory
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// inventoryForm: {
|
||||||
|
// inventoryFlag: 0,
|
||||||
|
// remainingInventory: null, // 剩余库存
|
||||||
|
// totalInventory: null, //总库存
|
||||||
|
// usedInventory: null, // 已用库存
|
||||||
|
// editInventory: null,
|
||||||
|
|
||||||
|
// id:''
|
||||||
|
// },
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
||||||
@ -923,12 +1073,13 @@ export default {
|
|||||||
},
|
},
|
||||||
// 上传详情图
|
// 上传详情图
|
||||||
handleUploadSuccessGift(file) {
|
handleUploadSuccessGift(file) {
|
||||||
|
console.log("aaa",file)
|
||||||
let newImage = {
|
let newImage = {
|
||||||
name: file.data.original,
|
name: file.data.original,
|
||||||
url: process.env.VUE_APP_SERVER_URL + file.data.fileName,
|
url: process.env.VUE_APP_SERVER_URL + file.data.fileName,
|
||||||
type: file.data.type
|
type: file.data.type,
|
||||||
};
|
fileName: file.data.fileName
|
||||||
|
}
|
||||||
console.log("giftImages",this.giftImages)
|
console.log("giftImages",this.giftImages)
|
||||||
if (this.giftImages == undefined) {
|
if (this.giftImages == undefined) {
|
||||||
this.giftImages = [];
|
this.giftImages = [];
|
||||||
@ -988,13 +1139,13 @@ export default {
|
|||||||
this.$refs.tables.toggleRowSelection(row); // 选中当前点击的行
|
this.$refs.tables.toggleRowSelection(row); // 选中当前点击的行
|
||||||
// 处理选中的行数据
|
// 处理选中的行数据
|
||||||
console.log("row",row)
|
console.log("row",row)
|
||||||
console.log()
|
|
||||||
this.dataForm.goodsName = row.name
|
this.dataForm.goodsName = row.name
|
||||||
this.dataForm.goodsId = row.id
|
this.dataForm.goodsId = row.id
|
||||||
|
|
||||||
},
|
},
|
||||||
getCommodity() {
|
getCommodity() {
|
||||||
this.openCommodity = true
|
this.openCommodity = true
|
||||||
|
|
||||||
},
|
},
|
||||||
// 查询搜索列表信息
|
// 查询搜索列表信息
|
||||||
getQueryList(){
|
getQueryList(){
|
||||||
|
58
fuintAdmin/src/views/integral/order/detail.vue
Normal file
58
fuintAdmin/src/views/integral/order/detail.vue
Normal file
@ -0,0 +1,58 @@
|
|||||||
|
<template>
|
||||||
|
<div class="">
|
||||||
|
<el-descriptions class="margin-top" title="带边框列表" :column="3" border>
|
||||||
|
<template slot="extra">
|
||||||
|
<el-button type="primary" size="small">操作</el-button>
|
||||||
|
</template>
|
||||||
|
<el-descriptions-item>
|
||||||
|
<template slot="label">
|
||||||
|
<i class="el-icon-user"></i>
|
||||||
|
用户名
|
||||||
|
</template>
|
||||||
|
kooriookami
|
||||||
|
</el-descriptions-item>
|
||||||
|
<el-descriptions-item>
|
||||||
|
<template slot="label">
|
||||||
|
<i class="el-icon-mobile-phone"></i>
|
||||||
|
手机号
|
||||||
|
</template>
|
||||||
|
18100000000
|
||||||
|
</el-descriptions-item>
|
||||||
|
<el-descriptions-item>
|
||||||
|
<template slot="label">
|
||||||
|
<i class="el-icon-location-outline"></i>
|
||||||
|
居住地
|
||||||
|
</template>
|
||||||
|
苏州市
|
||||||
|
</el-descriptions-item>
|
||||||
|
<el-descriptions-item>
|
||||||
|
<template slot="label">
|
||||||
|
<i class="el-icon-tickets"></i>
|
||||||
|
备注
|
||||||
|
</template>
|
||||||
|
<el-tag size="small">学校</el-tag>
|
||||||
|
</el-descriptions-item>
|
||||||
|
<el-descriptions-item>
|
||||||
|
<template slot="label">
|
||||||
|
<i class="el-icon-office-building"></i>
|
||||||
|
联系地址
|
||||||
|
</template>
|
||||||
|
江苏省苏州市吴中区吴中大道 1188 号
|
||||||
|
</el-descriptions-item>
|
||||||
|
</el-descriptions>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
name: "detail",
|
||||||
|
props: {
|
||||||
|
dataForm:{},
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
|
||||||
|
</style>
|
69
fuintAdmin/src/views/integral/order/index.vue
Normal file
69
fuintAdmin/src/views/integral/order/index.vue
Normal file
@ -0,0 +1,69 @@
|
|||||||
|
<template>
|
||||||
|
<div class="app-container">
|
||||||
|
|
||||||
|
<el-tabs class="st-tab" v-model="activeName" type="card" @tab-click="handleClick">
|
||||||
|
<el-tab-pane class="st-tab2" label="积分商城订单" name="first">
|
||||||
|
<el-alert
|
||||||
|
title="当前页面订单为油站小程序端用户在积分商城兑换的订单记录,如有付款金额,付款订单请在增值性订单列表中查看,类型为:积分商城"
|
||||||
|
:closable="false"
|
||||||
|
type="error">
|
||||||
|
</el-alert>
|
||||||
|
<points-mall></points-mall>
|
||||||
|
</el-tab-pane>
|
||||||
|
<el-tab-pane label="积分收银台订单" name="second">
|
||||||
|
<el-alert
|
||||||
|
title="PC积分收银台在线兑换订单记录,收银台订单无需确认操作,如有付款金额,付款订单请在增值性订单列表中查看,类型为:积分收银"
|
||||||
|
:closable="false"
|
||||||
|
type="error">
|
||||||
|
</el-alert>
|
||||||
|
<points-cashier></points-cashier>
|
||||||
|
</el-tab-pane>
|
||||||
|
</el-tabs>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
|
||||||
|
import PointsMall from '@/views/integral/order/pointsMall'
|
||||||
|
import PointsCashier from "@/views/integral/order/pointsCashier";
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: "index",
|
||||||
|
components: {PointsCashier, PointsMall},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
activeName:'first',
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
handleClick(tab, event) {
|
||||||
|
console.log(tab, event);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
.st-tab {
|
||||||
|
padding: 0px;
|
||||||
|
padding-bottom: 0px;
|
||||||
|
}
|
||||||
|
.st-tab2 {
|
||||||
|
/* background-color: #00aaff */
|
||||||
|
}
|
||||||
|
/deep/ .el-tabs__header {
|
||||||
|
padding: 0;
|
||||||
|
position: relative;
|
||||||
|
margin: 0 0 0px !important;
|
||||||
|
}
|
||||||
|
/deep/ .el-tabs--card>.el-tabs__header .el-tabs__nav {
|
||||||
|
background-color: #ffffff;
|
||||||
|
}
|
||||||
|
|
||||||
|
/deep/ .el-tabs--card>.el-tabs__header .el-tabs__item {
|
||||||
|
border-bottom-color: #E4E7ED;
|
||||||
|
}
|
||||||
|
/* .is-active */
|
||||||
|
</style>
|
||||||
|
|
184
fuintAdmin/src/views/integral/order/pointsCashier.vue
Normal file
184
fuintAdmin/src/views/integral/order/pointsCashier.vue
Normal file
@ -0,0 +1,184 @@
|
|||||||
|
<template>
|
||||||
|
<div class="app-container">
|
||||||
|
<el-card >
|
||||||
|
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" label-width="100px">
|
||||||
|
<el-form-item label="礼品名称" prop="giftName">
|
||||||
|
<el-input
|
||||||
|
v-model="queryParams.giftName"
|
||||||
|
placeholder="请输入供应商名称"
|
||||||
|
clearable
|
||||||
|
style="width: 240px;"
|
||||||
|
@keyup.enter.native="handleQuery"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item>
|
||||||
|
<el-select v-model="queryParams.status" style="width: 217px" placeholder="全部" clearable
|
||||||
|
>
|
||||||
|
<el-option
|
||||||
|
v-for="dict in dict.type.zhzt"
|
||||||
|
:key="dict.label"
|
||||||
|
:label="dict.label"
|
||||||
|
:value="dict.label"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item>
|
||||||
|
<el-button type="primary" icon="el-icon-search" @click="handleQuery">搜索</el-button>
|
||||||
|
<el-button icon="el-icon-refresh" @click="resetQuery">重置</el-button>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
</el-card>
|
||||||
|
|
||||||
|
|
||||||
|
<el-card style="margin-top: 20px;" >
|
||||||
|
<div style="margin-bottom : 10px">
|
||||||
|
<span class="font-number">统计</span>
|
||||||
|
</div>
|
||||||
|
<el-row :gutter="10" class="mb8" >
|
||||||
|
<el-col :span="2.5">
|
||||||
|
<div class="box">
|
||||||
|
<span class="font-chinese">笔数</span>
|
||||||
|
<span class="font-number">1234</span>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="2.5">
|
||||||
|
<div class="box">
|
||||||
|
<span class="font-chinese">商品数量</span>
|
||||||
|
<span class="font-number">12334</span>
|
||||||
|
</div>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="2.5">
|
||||||
|
<div class="box">
|
||||||
|
<span class="font-chinese">积分</span>
|
||||||
|
<span class="font-number">0</span>
|
||||||
|
</div>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="3">
|
||||||
|
<div class="box">
|
||||||
|
<span class="font-chinese">支付总额</span>
|
||||||
|
<span class="font-number">0</span>
|
||||||
|
</div>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
</el-card>
|
||||||
|
|
||||||
|
<el-card style="margin-top: 20px" >
|
||||||
|
<el-table ref="tables"
|
||||||
|
v-loading="loading"
|
||||||
|
:data="dataList"
|
||||||
|
:default-sort="defaultSort">
|
||||||
|
<el-table-column label="用户手机号" align="center" prop="mobile"/>
|
||||||
|
<el-table-column label="订单号" align="center" prop="orderNumber"/>
|
||||||
|
<el-table-column label="商品信息" align="center" prop="" >
|
||||||
|
<el-table-column label="简述" align="center" prop="categoryName" />
|
||||||
|
<el-table-column label="商品" align="center" prop="giftName" />
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="实付信息" align="center" >
|
||||||
|
<el-table-column label="积分" align="center" prop="integral" width=""/>
|
||||||
|
<el-table-column label="支付金额" align="center" prop="amount" width=""/>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="状态" align="center" prop="status" width=""/>
|
||||||
|
<el-table-column label="创建时间" align="center" prop="createTime" width=""/>
|
||||||
|
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-button
|
||||||
|
size="mini"
|
||||||
|
type="text"
|
||||||
|
@click="handleUpdate(scope.row)"
|
||||||
|
>订单详情</el-button>
|
||||||
|
<el-button
|
||||||
|
size="mini"
|
||||||
|
type="text"
|
||||||
|
@click="handleUpdate(scope.row)"
|
||||||
|
>处理订单</el-button>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
<pagination
|
||||||
|
v-show="total>0"
|
||||||
|
:total="total"
|
||||||
|
:page.sync="queryParams.page"
|
||||||
|
:limit.sync="queryParams.pageSize"
|
||||||
|
@pagination="getList"
|
||||||
|
/>
|
||||||
|
</el-card>
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import {getOrderApi} from "@/api/integral/order";
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: "pointsCashier",
|
||||||
|
dicts: ['zhzt','lplx','redemptionMethod','expressShippingCosts','shippingMethod'],
|
||||||
|
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
dataList:[],
|
||||||
|
queryParams: {
|
||||||
|
giftName: '',
|
||||||
|
status: '',
|
||||||
|
page:null,
|
||||||
|
pageSize:null
|
||||||
|
},
|
||||||
|
loading: false,
|
||||||
|
defaultSort: {prop: 'createTime', order: 'descending'},
|
||||||
|
|
||||||
|
total: 0,
|
||||||
|
}
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
this.getList();
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
getList(){
|
||||||
|
getOrderApi().then(res=>{
|
||||||
|
this.dataList = res.data.records
|
||||||
|
})
|
||||||
|
},
|
||||||
|
|
||||||
|
handleUpdate(){},
|
||||||
|
handleQuery(){},
|
||||||
|
resetQuery(){},
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
.app-container {
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
background: #f6f8f9;
|
||||||
|
padding-top: 0px;
|
||||||
|
padding: 0px
|
||||||
|
}
|
||||||
|
.box {
|
||||||
|
padding: 10px;
|
||||||
|
height: 80px;
|
||||||
|
width: 150px;
|
||||||
|
margin-right: 0px;
|
||||||
|
background-color: rgba(204, 204, 204, 0.3);
|
||||||
|
border-radius: 8px;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
justify-content: center;
|
||||||
|
align-items: left;
|
||||||
|
text-align: left;
|
||||||
|
}
|
||||||
|
|
||||||
|
.font-chinese {
|
||||||
|
font-size: 15px;
|
||||||
|
font-family:Microsoft YaHei;
|
||||||
|
font-weight: bold;
|
||||||
|
line-height:1.5
|
||||||
|
}
|
||||||
|
.font-number {
|
||||||
|
font-size: 20px;
|
||||||
|
font-family: PingFang SC,sans-serif;
|
||||||
|
font-weight: bold;
|
||||||
|
line-height:1.3
|
||||||
|
}
|
||||||
|
</style>
|
201
fuintAdmin/src/views/integral/order/pointsMall.vue
Normal file
201
fuintAdmin/src/views/integral/order/pointsMall.vue
Normal file
@ -0,0 +1,201 @@
|
|||||||
|
<template>
|
||||||
|
<div class="app-container">
|
||||||
|
<el-card >
|
||||||
|
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" label-width="100px">
|
||||||
|
<el-form-item label="礼品名称" prop="giftName">
|
||||||
|
<el-input
|
||||||
|
v-model="queryParams.giftName"
|
||||||
|
placeholder="请输入供应商名称"
|
||||||
|
clearable
|
||||||
|
style="width: 240px;"
|
||||||
|
@keyup.enter.native="handleQuery"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item>
|
||||||
|
<el-select v-model="queryParams.status" style="width: 217px" placeholder="全部" clearable
|
||||||
|
>
|
||||||
|
<el-option
|
||||||
|
v-for="dict in dict.type.zhzt"
|
||||||
|
:key="dict.label"
|
||||||
|
:label="dict.label"
|
||||||
|
:value="dict.label"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item>
|
||||||
|
<el-button type="primary" icon="el-icon-search" @click="handleQuery">搜索</el-button>
|
||||||
|
<el-button icon="el-icon-refresh" @click="resetQuery">重置</el-button>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
</el-card>
|
||||||
|
|
||||||
|
|
||||||
|
<el-card style="margin-top: 20px" >
|
||||||
|
|
||||||
|
|
||||||
|
<el-tabs v-model="activeName" @tab-click="handleClick">
|
||||||
|
|
||||||
|
|
||||||
|
<el-tab-pane label="全部订单" name="first">
|
||||||
|
</el-tab-pane>
|
||||||
|
<el-tab-pane label="待处理/待发货" name="second">
|
||||||
|
<span slot="label">待处理/待发货<el-badge class="mark" :value="12" /></span>
|
||||||
|
</el-tab-pane>
|
||||||
|
<el-tab-pane label="已完成/已发货" name="third">
|
||||||
|
<span slot="label">已完成/已发货<el-badge class="mark" :value="12" /></span>
|
||||||
|
</el-tab-pane>
|
||||||
|
<el-tab-pane label="已拒绝/已退款" name="fourth">
|
||||||
|
<span slot="label">已拒绝/已退款<el-badge class="mark" :value="12" /></span>
|
||||||
|
</el-tab-pane>
|
||||||
|
<el-tab-pane label="未付款订单" name="five">
|
||||||
|
</el-tab-pane>
|
||||||
|
</el-tabs>
|
||||||
|
|
||||||
|
|
||||||
|
<el-table ref="tables"
|
||||||
|
style="margin-top: 15px"
|
||||||
|
v-loading="loading"
|
||||||
|
:data="dataList"
|
||||||
|
:default-sort="defaultSort">
|
||||||
|
<el-table-column type="expand">
|
||||||
|
<template slot-scope="props">
|
||||||
|
<el-form style="margin-left : 20px" label-position="left" inline class="demo-table-expand">
|
||||||
|
<el-form-item label="订单号">
|
||||||
|
<span>{{ props.row.orderNumber }}</span>
|
||||||
|
</el-form-item>
|
||||||
|
<br>
|
||||||
|
<el-form-item label="用户编号">
|
||||||
|
<span>{{ props.row.userNo }}</span>
|
||||||
|
</el-form-item>
|
||||||
|
<br>
|
||||||
|
|
||||||
|
<el-form-item label="用户名称">
|
||||||
|
<span>{{ props.row.name }}</span>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="用户手机号" align="center" prop="mobile"/>
|
||||||
|
<el-table-column label="商品信息" align="center" prop="categoryName" >
|
||||||
|
<el-table-column label="名称" align="center" prop="giftName" />
|
||||||
|
<el-table-column label="图片" align="center" prop="coverImage">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-image
|
||||||
|
style="width: 50px; height: 50px"
|
||||||
|
:src="imagePath+scope.row.coverImage"
|
||||||
|
:preview-src-list="[imagePath + scope.row.coverImage]"
|
||||||
|
fit="cover">
|
||||||
|
</el-image>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="配送类型" align="center" prop="shippingType"/>
|
||||||
|
<el-table-column label="实付信息" align="center" prop="categoryName" >
|
||||||
|
<el-table-column label="积分" align="center" prop="integral" width=""/>
|
||||||
|
<el-table-column label="金额" align="center" prop="amount" width=""/>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="兑换数量" align="center" prop="exchangeQuantity" width=""/>
|
||||||
|
<el-table-column label="订单状态" align="center" prop="orderStatus" width=""/>
|
||||||
|
<el-table-column label="订单时间信息" align="center" prop="categoryName" width="">
|
||||||
|
<el-table-column label="创建时间" align="center" prop="createTime" width=""/>
|
||||||
|
<el-table-column label="更新时间" align="center" prop="updateTime" width=""/>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-button
|
||||||
|
size="mini"
|
||||||
|
type="text"
|
||||||
|
@click="handleDetail(scope.row)"
|
||||||
|
>订单详情</el-button>
|
||||||
|
<el-button
|
||||||
|
size="mini"
|
||||||
|
type="text"
|
||||||
|
@click="handleUpdate(scope.row)"
|
||||||
|
>处理订单</el-button>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
<pagination
|
||||||
|
v-show="total>0"
|
||||||
|
:total="total"
|
||||||
|
:page.sync="queryParams.page"
|
||||||
|
:limit.sync="queryParams.pageSize"
|
||||||
|
@pagination="getList"
|
||||||
|
/>
|
||||||
|
</el-card>
|
||||||
|
|
||||||
|
<el-dialog title="订单详情" :visible.sync="openDetail" width="500px" append-to-body :close-on-click-modal="false">
|
||||||
|
<detail></detail>
|
||||||
|
</el-dialog>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import {getOrderApi,getStatisticsApi} from "@/api/integral/order";
|
||||||
|
import Detail from '@/views/integral/order/detail'
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: "pointsMall",
|
||||||
|
components: {Detail},
|
||||||
|
dicts: ['zhzt','lplx','redemptionMethod','expressShippingCosts','shippingMethod'],
|
||||||
|
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
dataList:[],
|
||||||
|
dataFrom:{},
|
||||||
|
// 图片根目录
|
||||||
|
imagePath: process.env.VUE_APP_SERVER_URL,
|
||||||
|
queryParams: {
|
||||||
|
giftName: '',
|
||||||
|
status: '',
|
||||||
|
page:null,
|
||||||
|
pageSize:null
|
||||||
|
},
|
||||||
|
total: 0,
|
||||||
|
loading: false,
|
||||||
|
openDetail: false, // 订单详情
|
||||||
|
defaultSort: {prop: 'createTime', order: 'descending'},
|
||||||
|
|
||||||
|
activeName: 'first',
|
||||||
|
}
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
this.getList();
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
getList(){
|
||||||
|
getOrderApi().then(res=>{
|
||||||
|
this.dataList = res.data.records
|
||||||
|
})
|
||||||
|
|
||||||
|
getStatisticsApi().then(res=>{
|
||||||
|
|
||||||
|
})
|
||||||
|
},
|
||||||
|
handleUpdate(){},
|
||||||
|
handleDetail(data){
|
||||||
|
this.openDetail = true
|
||||||
|
},
|
||||||
|
handleQuery(){},
|
||||||
|
resetQuery(){},
|
||||||
|
|
||||||
|
handleClick(tab, event) {
|
||||||
|
console.log(tab, event);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
.app-container {
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
background: #f6f8f9;
|
||||||
|
padding-top: 0px;
|
||||||
|
padding: 0px
|
||||||
|
}
|
||||||
|
|
||||||
|
</style>
|
||||||
|
|
||||||
|
|
@ -38,7 +38,7 @@ images.root=C:/fuintV3.0.1/fuintBackend/fuint-application/target/classes
|
|||||||
images.path=/static/uploadImages/
|
images.path=/static/uploadImages/
|
||||||
|
|
||||||
# 上传图片服务器域名
|
# 上传图片服务器域名
|
||||||
images.upload.url=http://localhost:8080
|
images.upload.url=http://localhost:8008
|
||||||
|
|
||||||
# 上传图片允许的大小(单位:MB)
|
# 上传图片允许的大小(单位:MB)
|
||||||
images.upload.maxSize=5
|
images.upload.maxSize=5
|
||||||
|
@ -88,5 +88,17 @@ public class IntegralGiftController extends BaseController {
|
|||||||
return getSuccessResult(this.integralGiftService.deleteById(id));
|
return getSuccessResult(this.integralGiftService.deleteById(id));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 单独修改商品的库存
|
||||||
|
* @param id
|
||||||
|
* @param editInventory
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@GetMapping("updateInventory")
|
||||||
|
public ResponseObject updateInventory(@Param("id") Integer id,@Param("editInventory") Integer editInventory) {
|
||||||
|
return getSuccessResult(this.integralGiftService.updateInventory(id,editInventory));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -0,0 +1,99 @@
|
|||||||
|
package com.fuint.business.integral.controller;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
|
import com.fuint.business.integral.entity.IntegralOrders;
|
||||||
|
import com.fuint.business.integral.service.IntegralOrdersService;
|
||||||
|
import com.fuint.business.integral.vo.IntegralOrdersVO;
|
||||||
|
import com.fuint.framework.web.BaseController;
|
||||||
|
import com.fuint.framework.web.ResponseObject;
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
import org.springframework.data.domain.PageRequest;
|
||||||
|
import org.springframework.http.ResponseEntity;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
import javax.annotation.Resource;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 存储兑换订单信息(IntegralOrders)表控制层
|
||||||
|
*
|
||||||
|
* @author makejava
|
||||||
|
* @since 2023-11-07 13:59:23
|
||||||
|
*/
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("business/integral/integralOrders")
|
||||||
|
public class IntegralOrdersController extends BaseController {
|
||||||
|
/**
|
||||||
|
* 服务对象
|
||||||
|
*/
|
||||||
|
@Resource
|
||||||
|
private IntegralOrdersService integralOrdersService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分页查询
|
||||||
|
*
|
||||||
|
* @param integralOrders 筛选条件
|
||||||
|
* @param pageNo 分页对象
|
||||||
|
* @return 查询结果
|
||||||
|
*/
|
||||||
|
@GetMapping("queryByPage")
|
||||||
|
public ResponseObject queryByPage(@RequestParam(value = "pageNo",defaultValue = "1") Integer pageNo,
|
||||||
|
@RequestParam(value = "pageSize",defaultValue = "10") Integer pageSize,
|
||||||
|
@Param("integralOrders") IntegralOrders integralOrders) {
|
||||||
|
Page page = new Page(pageNo, pageSize);
|
||||||
|
IPage<IntegralOrdersVO> integralOrdersIPage = this.integralOrdersService.queryByPage(page, integralOrders);
|
||||||
|
return getSuccessResult(integralOrdersIPage);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通过主键查询单条数据
|
||||||
|
*
|
||||||
|
* @param id 主键
|
||||||
|
* @return 单条数据
|
||||||
|
*/
|
||||||
|
@GetMapping("{id}")
|
||||||
|
public ResponseObject queryById(@PathVariable("id") Integer id) {
|
||||||
|
return getSuccessResult(this.integralOrdersService.queryById(id));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增数据
|
||||||
|
*
|
||||||
|
* @param integralOrders 实体
|
||||||
|
* @return 新增结果
|
||||||
|
*/
|
||||||
|
@PostMapping
|
||||||
|
public ResponseObject add(IntegralOrders integralOrders) {
|
||||||
|
return getSuccessResult(this.integralOrdersService.insert(integralOrders));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 编辑数据
|
||||||
|
*
|
||||||
|
* @param integralOrders 实体
|
||||||
|
* @return 编辑结果
|
||||||
|
*/
|
||||||
|
@PutMapping
|
||||||
|
public ResponseObject edit(IntegralOrders integralOrders) {
|
||||||
|
return getSuccessResult(this.integralOrdersService.update(integralOrders));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除数据
|
||||||
|
*
|
||||||
|
* @param id 主键
|
||||||
|
* @return 删除是否成功
|
||||||
|
*/
|
||||||
|
@DeleteMapping
|
||||||
|
public ResponseObject deleteById(Integer id) {
|
||||||
|
return getSuccessResult(this.integralOrdersService.deleteById(id));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@GetMapping("/statistics")
|
||||||
|
public ResponseObject statistics() {
|
||||||
|
return getSuccessResult(this.integralOrdersService.statistics());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -63,6 +63,8 @@ public class IntegralGift extends BaseEntity {
|
|||||||
* 礼品剩余库存
|
* 礼品剩余库存
|
||||||
*/
|
*/
|
||||||
private Integer remainingInventory;
|
private Integer remainingInventory;
|
||||||
|
|
||||||
|
private Integer usedInventory;
|
||||||
/**
|
/**
|
||||||
* 商家卡券
|
* 商家卡券
|
||||||
*/
|
*/
|
||||||
@ -79,6 +81,10 @@ public class IntegralGift extends BaseEntity {
|
|||||||
* 加钱比例
|
* 加钱比例
|
||||||
*/
|
*/
|
||||||
private Double moneyRatio;
|
private Double moneyRatio;
|
||||||
|
/**
|
||||||
|
* 市场价格
|
||||||
|
*/
|
||||||
|
private Double market;
|
||||||
/**
|
/**
|
||||||
* 兑换金额
|
* 兑换金额
|
||||||
*/
|
*/
|
||||||
@ -94,7 +100,7 @@ public class IntegralGift extends BaseEntity {
|
|||||||
/**
|
/**
|
||||||
* 快递运费
|
* 快递运费
|
||||||
*/
|
*/
|
||||||
private Double expressShippingFee;
|
private String expressShippingFee;
|
||||||
/**
|
/**
|
||||||
* 运费金额
|
* 运费金额
|
||||||
*/
|
*/
|
||||||
|
@ -0,0 +1,84 @@
|
|||||||
|
package com.fuint.business.integral.entity;
|
||||||
|
|
||||||
|
import com.fuint.framework.entity.BaseEntity;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 存储兑换订单信息(IntegralOrders)实体类
|
||||||
|
*
|
||||||
|
* @author makejava
|
||||||
|
* @since 2023-11-07 13:59:23
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class IntegralOrders extends BaseEntity {
|
||||||
|
private static final long serialVersionUID = 181605029480746026L;
|
||||||
|
/**
|
||||||
|
* 兑换订单id(主键)
|
||||||
|
*/
|
||||||
|
private Integer id;
|
||||||
|
/**
|
||||||
|
* 关联用户id
|
||||||
|
*/
|
||||||
|
private Integer userId;
|
||||||
|
/**
|
||||||
|
* 订单号
|
||||||
|
*/
|
||||||
|
private String orderNumber;
|
||||||
|
/**
|
||||||
|
* 关联商品id
|
||||||
|
*/
|
||||||
|
private Integer giftId;
|
||||||
|
/**
|
||||||
|
* 配送类型
|
||||||
|
*/
|
||||||
|
private String shippingType;
|
||||||
|
/**
|
||||||
|
* 实付信息
|
||||||
|
*/
|
||||||
|
private Double paidInfo;
|
||||||
|
/**
|
||||||
|
* 金额
|
||||||
|
*/
|
||||||
|
private Double amount;
|
||||||
|
/**
|
||||||
|
* 积分
|
||||||
|
*/
|
||||||
|
private Double integral;
|
||||||
|
/**
|
||||||
|
* 加油金
|
||||||
|
*/
|
||||||
|
private Double comeOn;
|
||||||
|
/**
|
||||||
|
* 兑换数量
|
||||||
|
*/
|
||||||
|
private Integer exchangeQuantity;
|
||||||
|
/**
|
||||||
|
* 订单状态
|
||||||
|
*/
|
||||||
|
private String orderStatus;
|
||||||
|
/**
|
||||||
|
* 状态
|
||||||
|
*/
|
||||||
|
private String status;
|
||||||
|
/**
|
||||||
|
* 订单类型
|
||||||
|
*/
|
||||||
|
private String orderType;
|
||||||
|
/**
|
||||||
|
* 处理结果
|
||||||
|
*/
|
||||||
|
private String processingResult;
|
||||||
|
/**
|
||||||
|
* 备注
|
||||||
|
*/
|
||||||
|
private String notes;
|
||||||
|
/**
|
||||||
|
* 店铺ID
|
||||||
|
*/
|
||||||
|
private Integer storeId;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -83,5 +83,8 @@ public interface IntegralGiftMapper {
|
|||||||
*/
|
*/
|
||||||
int deleteById(Integer id);
|
int deleteById(Integer id);
|
||||||
|
|
||||||
|
|
||||||
|
int updateInventory(@Param("id") Integer id,@Param("editInventory") Integer editInventory,@Param("updateBy") Integer updateBy);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -0,0 +1,95 @@
|
|||||||
|
package com.fuint.business.integral.mapper;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
|
import com.fuint.business.integral.entity.IntegralGift;
|
||||||
|
import com.fuint.business.integral.entity.IntegralOrders;
|
||||||
|
import com.fuint.business.integral.vo.IntegralGiftVO;
|
||||||
|
import com.fuint.business.integral.vo.IntegralOrdersVO;
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
import org.springframework.data.domain.Pageable;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 存储兑换订单信息(IntegralOrders)表数据库访问层
|
||||||
|
*
|
||||||
|
* @author makejava
|
||||||
|
* @since 2023-11-07 13:59:23
|
||||||
|
*/
|
||||||
|
public interface IntegralOrdersMapper {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通过ID查询单条数据
|
||||||
|
*
|
||||||
|
* @param id 主键
|
||||||
|
* @return 实例对象
|
||||||
|
*/
|
||||||
|
IntegralOrders queryById(Integer id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询指定行数据
|
||||||
|
*
|
||||||
|
* @param integralOrders 查询条件
|
||||||
|
* @param page 分页对象
|
||||||
|
* @return 对象列表
|
||||||
|
*/
|
||||||
|
IPage<IntegralOrdersVO> queryAllByLimit(@Param("page") Page page, @Param("integralOrders") IntegralOrders integralOrders);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 统计总行数
|
||||||
|
*
|
||||||
|
* @param integralOrders 查询条件
|
||||||
|
* @return 总行数
|
||||||
|
*/
|
||||||
|
long count(IntegralOrders integralOrders);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增数据
|
||||||
|
*
|
||||||
|
* @param integralOrders 实例对象
|
||||||
|
* @return 影响行数
|
||||||
|
*/
|
||||||
|
int insert(IntegralOrders integralOrders);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量新增数据(MyBatis原生foreach方法)
|
||||||
|
*
|
||||||
|
* @param entities List<IntegralOrders> 实例对象列表
|
||||||
|
* @return 影响行数
|
||||||
|
*/
|
||||||
|
int insertBatch(@Param("entities") List<IntegralOrders> entities);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量新增或按主键更新数据(MyBatis原生foreach方法)
|
||||||
|
*
|
||||||
|
* @param entities List<IntegralOrders> 实例对象列表
|
||||||
|
* @return 影响行数
|
||||||
|
* @throws org.springframework.jdbc.BadSqlGrammarException 入参是空List的时候会抛SQL语句错误的异常,请自行校验入参
|
||||||
|
*/
|
||||||
|
int insertOrUpdateBatch(@Param("entities") List<IntegralOrders> entities);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改数据
|
||||||
|
*
|
||||||
|
* @param integralOrders 实例对象
|
||||||
|
* @return 影响行数
|
||||||
|
*/
|
||||||
|
int update(IntegralOrders integralOrders);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通过主键删除数据
|
||||||
|
*
|
||||||
|
* @param id 主键
|
||||||
|
* @return 影响行数
|
||||||
|
*/
|
||||||
|
int deleteById(Integer id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 统计数据
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
Map<String, String> statistics();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -33,6 +33,8 @@
|
|||||||
<result property="updateTime" column="update_time" jdbcType="TIMESTAMP"/>
|
<result property="updateTime" column="update_time" jdbcType="TIMESTAMP"/>
|
||||||
<result property="createBy" column="create_by" jdbcType="INTEGER"/>
|
<result property="createBy" column="create_by" jdbcType="INTEGER"/>
|
||||||
<result property="updateBy" column="update_by" jdbcType="INTEGER"/>
|
<result property="updateBy" column="update_by" jdbcType="INTEGER"/>
|
||||||
|
<result property="usedInventory" column="used_inventory" jdbcType="INTEGER"/>
|
||||||
|
<result property="market" column="market" jdbcType="NUMERIC"/>
|
||||||
|
|
||||||
<!-- outher-->
|
<!-- outher-->
|
||||||
<result property="categoryName" column="category_name" jdbcType="VARCHAR"/>
|
<result property="categoryName" column="category_name" jdbcType="VARCHAR"/>
|
||||||
@ -84,6 +86,7 @@
|
|||||||
ig.update_time,
|
ig.update_time,
|
||||||
ig.create_by,
|
ig.create_by,
|
||||||
ig.update_by,
|
ig.update_by,
|
||||||
|
ig.used_inventory,
|
||||||
igc.category_name
|
igc.category_name
|
||||||
from integral_gift ig
|
from integral_gift ig
|
||||||
left join integral_gift_category igc ON ig.category_id = igc.id
|
left join integral_gift_category igc ON ig.category_id = igc.id
|
||||||
@ -239,8 +242,8 @@
|
|||||||
|
|
||||||
<!--新增所有列-->
|
<!--新增所有列-->
|
||||||
<insert id="insert" keyProperty="id" useGeneratedKeys="true">
|
<insert id="insert" keyProperty="id" useGeneratedKeys="true">
|
||||||
insert into integral_gift(gift_name, category_id, cover_image, gift_images, gift_type, coupon_id, voucher_id, goods_id, gift_quantity, total_inventory, remaining_inventory, merchant_coupon_id, exchange_method, exchange_points, money_ratio, exchange_amount, exchange_fuel_amount, delivery_method, express_shipping_fee, shipping_fee_amount, exchange_times, sort, status, detailed_description, store_id, create_time, update_time, create_by, update_by)
|
insert into integral_gift(gift_name, category_id, cover_image, gift_images, gift_type, coupon_id, voucher_id, goods_id, gift_quantity, total_inventory, remaining_inventory, merchant_coupon_id, exchange_method, exchange_points, money_ratio, exchange_amount, exchange_fuel_amount, delivery_method, express_shipping_fee, shipping_fee_amount, exchange_times, sort, status, detailed_description, store_id, create_time, update_time, create_by, update_by,market)
|
||||||
values (#{giftName}, #{categoryId}, #{coverImage}, #{giftImages}, #{giftType}, #{couponId}, #{voucherId}, #{goodsId}, #{giftQuantity}, #{totalInventory}, #{remainingInventory}, #{merchantCouponId}, #{exchangeMethod}, #{exchangePoints}, #{moneyRatio}, #{exchangeAmount}, #{exchangeFuelAmount}, #{deliveryMethod}, #{expressShippingFee}, #{shippingFeeAmount}, #{exchangeTimes}, #{sort}, #{status}, #{detailedDescription}, #{storeId}, #{createTime}, #{createTime}, #{createBy}, #{updateBy})
|
values (#{giftName}, #{categoryId}, #{coverImage}, #{giftImages}, #{giftType}, #{couponId}, #{voucherId}, #{goodsId}, #{giftQuantity}, #{totalInventory}, #{remainingInventory}, #{merchantCouponId}, #{exchangeMethod}, #{exchangePoints}, #{moneyRatio}, #{exchangeAmount}, #{exchangeFuelAmount}, #{deliveryMethod}, #{expressShippingFee}, #{shippingFeeAmount}, #{exchangeTimes}, #{sort}, #{status}, #{detailedDescription}, #{storeId}, #{createTime}, #{createTime}, #{createBy}, #{updateBy},#{market})
|
||||||
</insert>
|
</insert>
|
||||||
|
|
||||||
<insert id="insertBatch" keyProperty="id" useGeneratedKeys="true">
|
<insert id="insertBatch" keyProperty="id" useGeneratedKeys="true">
|
||||||
@ -380,6 +383,9 @@
|
|||||||
<if test="updateBy != null">
|
<if test="updateBy != null">
|
||||||
update_by = #{updateBy},
|
update_by = #{updateBy},
|
||||||
</if>
|
</if>
|
||||||
|
<if test="market != null">
|
||||||
|
market = #{market},
|
||||||
|
</if>
|
||||||
</set>
|
</set>
|
||||||
where id = #{id}
|
where id = #{id}
|
||||||
</update>
|
</update>
|
||||||
@ -389,5 +395,14 @@
|
|||||||
delete from integral_gift where id = #{id}
|
delete from integral_gift where id = #{id}
|
||||||
</delete>
|
</delete>
|
||||||
|
|
||||||
|
<update id="updateInventory">
|
||||||
|
update integral_gift
|
||||||
|
set
|
||||||
|
total_inventory = total_inventory + #{editInventory},
|
||||||
|
update_by = #{updateBy},
|
||||||
|
update_time = NOW()
|
||||||
|
where id =#{id}
|
||||||
|
</update>
|
||||||
|
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|
||||||
|
@ -0,0 +1,301 @@
|
|||||||
|
<?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.integral.mapper.IntegralOrdersMapper">
|
||||||
|
|
||||||
|
<resultMap type="com.fuint.business.integral.vo.IntegralOrdersVO" id="IntegralOrdersMap">
|
||||||
|
<result property="id" column="id" jdbcType="INTEGER"/>
|
||||||
|
<result property="userId" column="user_id" jdbcType="INTEGER"/>
|
||||||
|
<result property="orderNumber" column="order_number" jdbcType="VARCHAR"/>
|
||||||
|
<result property="giftId" column="gift_id" jdbcType="INTEGER"/>
|
||||||
|
<result property="shippingType" column="shipping_type" jdbcType="VARCHAR"/>
|
||||||
|
<result property="paidInfo" column="paid_info" jdbcType="NUMERIC"/>
|
||||||
|
<result property="amount" column="amount" jdbcType="NUMERIC"/>
|
||||||
|
<result property="integral" column="integral" jdbcType="NUMERIC"/>
|
||||||
|
<result property="comeOn" column="come_on" jdbcType="NUMERIC"/>
|
||||||
|
<result property="exchangeQuantity" column="exchange_quantity" jdbcType="INTEGER"/>
|
||||||
|
<result property="orderStatus" column="order_status" jdbcType="VARCHAR"/>
|
||||||
|
<result property="status" column="status" jdbcType="VARCHAR"/>
|
||||||
|
<result property="orderType" column="order_type" jdbcType="VARCHAR"/>
|
||||||
|
<result property="processingResult" column="processing_result" jdbcType="VARCHAR"/>
|
||||||
|
<result property="notes" column="notes" jdbcType="VARCHAR"/>
|
||||||
|
<result property="storeId" column="store_id" jdbcType="INTEGER"/>
|
||||||
|
<result property="createTime" column="create_time" jdbcType="TIMESTAMP"/>
|
||||||
|
<result property="updateTime" column="update_time" jdbcType="TIMESTAMP"/>
|
||||||
|
<result property="createBy" column="create_by" jdbcType="INTEGER"/>
|
||||||
|
<result property="updateBy" column="update_by" jdbcType="INTEGER"/>
|
||||||
|
|
||||||
|
<!-- outher-->
|
||||||
|
<result property="mobile" column="mobile" jdbcType="VARCHAR"/>
|
||||||
|
<result property="userNo" column="user_no" jdbcType="VARCHAR"/>
|
||||||
|
<result property="name" column="name" jdbcType="VARCHAR"/>
|
||||||
|
<result property="giftName" column="gift_name" jdbcType="VARCHAR"/>
|
||||||
|
<result property="coverImage" column="cover_image" jdbcType="VARCHAR"/>
|
||||||
|
|
||||||
|
</resultMap>
|
||||||
|
|
||||||
|
<!--查询单个-->
|
||||||
|
<select id="queryById" resultMap="IntegralOrdersMap">
|
||||||
|
select
|
||||||
|
id, user_id, order_number, gift_id, shipping_type, paid_info, amount, integral, come_on, exchange_quantity, order_status, status, order_type, processing_result, notes, store_id, create_time, update_time, create_by, update_by
|
||||||
|
from integral_orders
|
||||||
|
where id = #{id}
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<!--查询指定行数据-->
|
||||||
|
<select id="queryAllByLimit" resultMap="IntegralOrdersMap">
|
||||||
|
select
|
||||||
|
io.id,
|
||||||
|
io.user_id,
|
||||||
|
io.order_number,
|
||||||
|
io.gift_id,
|
||||||
|
io.shipping_type,
|
||||||
|
io.amount,
|
||||||
|
io.integral,
|
||||||
|
io.come_on,
|
||||||
|
io.exchange_quantity,
|
||||||
|
io.order_status,
|
||||||
|
io.status,
|
||||||
|
io.order_type,
|
||||||
|
io.processing_result,
|
||||||
|
io.notes,
|
||||||
|
io.store_id,
|
||||||
|
io.create_time,
|
||||||
|
io.update_time,
|
||||||
|
mu.mobile,
|
||||||
|
mu.user_no,
|
||||||
|
mu.name,
|
||||||
|
ig.gift_name,
|
||||||
|
ig.cover_image
|
||||||
|
from integral_orders io
|
||||||
|
left join mt_user mu ON io.user_id = mu.id
|
||||||
|
left join integral_gift ig ON io.gift_id = ig.id
|
||||||
|
<where>
|
||||||
|
<if test="integralOrders.id != null">
|
||||||
|
and io.id = #{integralOrders.id}
|
||||||
|
</if>
|
||||||
|
<if test="integralOrders.userId != null">
|
||||||
|
and io.user_id = #{integralOrders.userId}
|
||||||
|
</if>
|
||||||
|
<if test="integralOrders.orderNumber != null and integralOrders.orderNumber != ''">
|
||||||
|
and io.order_number = #{integralOrders.orderNumber}
|
||||||
|
</if>
|
||||||
|
<if test="integralOrders.giftId != null">
|
||||||
|
and io.gift_id = #{integralOrders.giftId}
|
||||||
|
</if>
|
||||||
|
<if test="integralOrders.shippingType != null and integralOrders.shippingType != ''">
|
||||||
|
and io.shipping_type = #{integralOrders.shippingType}
|
||||||
|
</if>
|
||||||
|
<if test="integralOrders.exchangeQuantity != null">
|
||||||
|
and io.exchange_quantity = #{integralOrders.exchangeQuantity}
|
||||||
|
</if>
|
||||||
|
<if test="integralOrders.orderStatus != null and integralOrders.orderStatus != ''">
|
||||||
|
and io.order_status = #{integralOrders.orderStatus}
|
||||||
|
</if>
|
||||||
|
<if test="integralOrders.status != null and integralOrders.status != ''">
|
||||||
|
and io.status = #{integralOrders.status}
|
||||||
|
</if>
|
||||||
|
<if test="integralOrders.orderType != null and integralOrders.orderType != ''">
|
||||||
|
and io.order_type = #{integralOrders.orderType}
|
||||||
|
</if>
|
||||||
|
<if test="integralOrders.processingResult != null and integralOrders.processingResult != ''">
|
||||||
|
and io.processing_result = #{integralOrders.processingResult}
|
||||||
|
</if>
|
||||||
|
<if test="integralOrders.storeId != null">
|
||||||
|
and io.store_id = #{integralOrders.storeId}
|
||||||
|
</if>
|
||||||
|
<if test="integralOrders.createTime != null">
|
||||||
|
and io.create_time = #{integralOrders.createTime}
|
||||||
|
</if>
|
||||||
|
<if test="integralOrders.updateTime != null">
|
||||||
|
and io.update_time = #{integralOrders.updateTime}
|
||||||
|
</if>
|
||||||
|
</where>
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<!--统计总行数-->
|
||||||
|
<select id="count" resultType="java.lang.Long">
|
||||||
|
select count(1)
|
||||||
|
from integral_orders
|
||||||
|
<where>
|
||||||
|
<if test="id != null">
|
||||||
|
and id = #{id}
|
||||||
|
</if>
|
||||||
|
<if test="userId != null">
|
||||||
|
and user_id = #{userId}
|
||||||
|
</if>
|
||||||
|
<if test="orderNumber != null and orderNumber != ''">
|
||||||
|
and order_number = #{orderNumber}
|
||||||
|
</if>
|
||||||
|
<if test="giftId != null">
|
||||||
|
and gift_id = #{giftId}
|
||||||
|
</if>
|
||||||
|
<if test="shippingType != null and shippingType != ''">
|
||||||
|
and shipping_type = #{shippingType}
|
||||||
|
</if>
|
||||||
|
<if test="paidInfo != null">
|
||||||
|
and paid_info = #{paidInfo}
|
||||||
|
</if>
|
||||||
|
<if test="amount != null">
|
||||||
|
and amount = #{amount}
|
||||||
|
</if>
|
||||||
|
<if test="integral != null">
|
||||||
|
and integral = #{integral}
|
||||||
|
</if>
|
||||||
|
<if test="comeOn != null">
|
||||||
|
and come_on = #{comeOn}
|
||||||
|
</if>
|
||||||
|
<if test="exchangeQuantity != null">
|
||||||
|
and exchange_quantity = #{exchangeQuantity}
|
||||||
|
</if>
|
||||||
|
<if test="orderStatus != null and orderStatus != ''">
|
||||||
|
and order_status = #{orderStatus}
|
||||||
|
</if>
|
||||||
|
<if test="status != null and status != ''">
|
||||||
|
and status = #{status}
|
||||||
|
</if>
|
||||||
|
<if test="orderType != null and orderType != ''">
|
||||||
|
and order_type = #{orderType}
|
||||||
|
</if>
|
||||||
|
<if test="processingResult != null and processingResult != ''">
|
||||||
|
and processing_result = #{processingResult}
|
||||||
|
</if>
|
||||||
|
<if test="notes != null and notes != ''">
|
||||||
|
and notes = #{notes}
|
||||||
|
</if>
|
||||||
|
<if test="storeId != null">
|
||||||
|
and store_id = #{storeId}
|
||||||
|
</if>
|
||||||
|
<if test="createTime != null">
|
||||||
|
and create_time = #{createTime}
|
||||||
|
</if>
|
||||||
|
<if test="updateTime != null">
|
||||||
|
and update_time = #{updateTime}
|
||||||
|
</if>
|
||||||
|
<if test="createBy != null">
|
||||||
|
and create_by = #{createBy}
|
||||||
|
</if>
|
||||||
|
<if test="updateBy != null">
|
||||||
|
and update_by = #{updateBy}
|
||||||
|
</if>
|
||||||
|
</where>
|
||||||
|
</select>
|
||||||
|
<select id="statistics" resultType="java.util.Map">
|
||||||
|
select count(0) a,
|
||||||
|
count(*) b
|
||||||
|
from integral_orders
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<!--新增所有列-->
|
||||||
|
<insert id="insert" keyProperty="id" useGeneratedKeys="true">
|
||||||
|
insert into integral_orders(user_id, order_number, gift_id, shipping_type, paid_info, amount, integral, come_on, exchange_quantity, order_status, status, order_type, processing_result, notes, store_id, create_time, update_time, create_by, update_by)
|
||||||
|
values (#{userId}, #{orderNumber}, #{giftId}, #{shippingType}, #{paidInfo}, #{amount}, #{integral}, #{comeOn}, #{exchangeQuantity}, #{orderStatus}, #{status}, #{orderType}, #{processingResult}, #{notes}, #{storeId}, #{createTime}, #{updateTime}, #{createBy}, #{updateBy})
|
||||||
|
</insert>
|
||||||
|
|
||||||
|
<insert id="insertBatch" keyProperty="id" useGeneratedKeys="true">
|
||||||
|
insert into integral_orders(user_id, order_number, gift_id, shipping_type, paid_info, amount, integral, come_on, exchange_quantity, order_status, status, order_type, processing_result, notes, store_id, create_time, update_time, create_by, update_by)
|
||||||
|
values
|
||||||
|
<foreach collection="entities" item="entity" separator=",">
|
||||||
|
(#{entity.userId}, #{entity.orderNumber}, #{entity.giftId}, #{entity.shippingType}, #{entity.paidInfo}, #{entity.amount}, #{entity.integral}, #{entity.comeOn}, #{entity.exchangeQuantity}, #{entity.orderStatus}, #{entity.status}, #{entity.orderType}, #{entity.processingResult}, #{entity.notes}, #{entity.storeId}, #{entity.createTime}, #{entity.updateTime}, #{entity.createBy}, #{entity.updateBy})
|
||||||
|
</foreach>
|
||||||
|
</insert>
|
||||||
|
|
||||||
|
<insert id="insertOrUpdateBatch" keyProperty="id" useGeneratedKeys="true">
|
||||||
|
insert into integral_orders(user_id, order_number, gift_id, shipping_type, paid_info, amount, integral, come_on, exchange_quantity, order_status, status, order_type, processing_result, notes, store_id, create_time, update_time, create_by, update_by)
|
||||||
|
values
|
||||||
|
<foreach collection="entities" item="entity" separator=",">
|
||||||
|
(#{entity.userId}, #{entity.orderNumber}, #{entity.giftId}, #{entity.shippingType}, #{entity.paidInfo}, #{entity.amount}, #{entity.integral}, #{entity.comeOn}, #{entity.exchangeQuantity}, #{entity.orderStatus}, #{entity.status}, #{entity.orderType}, #{entity.processingResult}, #{entity.notes}, #{entity.storeId}, #{entity.createTime}, #{entity.updateTime}, #{entity.createBy}, #{entity.updateBy})
|
||||||
|
</foreach>
|
||||||
|
on duplicate key update
|
||||||
|
user_id = values(user_id),
|
||||||
|
order_number = values(order_number),
|
||||||
|
gift_id = values(gift_id),
|
||||||
|
shipping_type = values(shipping_type),
|
||||||
|
paid_info = values(paid_info),
|
||||||
|
amount = values(amount),
|
||||||
|
integral = values(integral),
|
||||||
|
come_on = values(come_on),
|
||||||
|
exchange_quantity = values(exchange_quantity),
|
||||||
|
order_status = values(order_status),
|
||||||
|
status = values(status),
|
||||||
|
order_type = values(order_type),
|
||||||
|
processing_result = values(processing_result),
|
||||||
|
notes = values(notes),
|
||||||
|
store_id = values(store_id),
|
||||||
|
create_time = values(create_time),
|
||||||
|
update_time = values(update_time),
|
||||||
|
create_by = values(create_by),
|
||||||
|
update_by = values(update_by)
|
||||||
|
</insert>
|
||||||
|
|
||||||
|
<!--通过主键修改数据-->
|
||||||
|
<update id="update">
|
||||||
|
update integral_orders
|
||||||
|
<set>
|
||||||
|
<if test="userId != null">
|
||||||
|
user_id = #{userId},
|
||||||
|
</if>
|
||||||
|
<if test="orderNumber != null and orderNumber != ''">
|
||||||
|
order_number = #{orderNumber},
|
||||||
|
</if>
|
||||||
|
<if test="giftId != null">
|
||||||
|
gift_id = #{giftId},
|
||||||
|
</if>
|
||||||
|
<if test="shippingType != null and shippingType != ''">
|
||||||
|
shipping_type = #{shippingType},
|
||||||
|
</if>
|
||||||
|
<if test="paidInfo != null">
|
||||||
|
paid_info = #{paidInfo},
|
||||||
|
</if>
|
||||||
|
<if test="amount != null">
|
||||||
|
amount = #{amount},
|
||||||
|
</if>
|
||||||
|
<if test="integral != null">
|
||||||
|
integral = #{integral},
|
||||||
|
</if>
|
||||||
|
<if test="comeOn != null">
|
||||||
|
come_on = #{comeOn},
|
||||||
|
</if>
|
||||||
|
<if test="exchangeQuantity != null">
|
||||||
|
exchange_quantity = #{exchangeQuantity},
|
||||||
|
</if>
|
||||||
|
<if test="orderStatus != null and orderStatus != ''">
|
||||||
|
order_status = #{orderStatus},
|
||||||
|
</if>
|
||||||
|
<if test="status != null and status != ''">
|
||||||
|
status = #{status},
|
||||||
|
</if>
|
||||||
|
<if test="orderType != null and orderType != ''">
|
||||||
|
order_type = #{orderType},
|
||||||
|
</if>
|
||||||
|
<if test="processingResult != null and processingResult != ''">
|
||||||
|
processing_result = #{processingResult},
|
||||||
|
</if>
|
||||||
|
<if test="notes != null and notes != ''">
|
||||||
|
notes = #{notes},
|
||||||
|
</if>
|
||||||
|
<if test="storeId != null">
|
||||||
|
store_id = #{storeId},
|
||||||
|
</if>
|
||||||
|
<if test="createTime != null">
|
||||||
|
create_time = #{createTime},
|
||||||
|
</if>
|
||||||
|
<if test="updateTime != null">
|
||||||
|
update_time = #{updateTime},
|
||||||
|
</if>
|
||||||
|
<if test="createBy != null">
|
||||||
|
create_by = #{createBy},
|
||||||
|
</if>
|
||||||
|
<if test="updateBy != null">
|
||||||
|
update_by = #{updateBy},
|
||||||
|
</if>
|
||||||
|
</set>
|
||||||
|
where id = #{id}
|
||||||
|
</update>
|
||||||
|
|
||||||
|
<!--通过主键删除-->
|
||||||
|
<delete id="deleteById">
|
||||||
|
delete from integral_orders where id = #{id}
|
||||||
|
</delete>
|
||||||
|
|
||||||
|
</mapper>
|
||||||
|
|
@ -57,4 +57,12 @@ public interface IntegralGiftService {
|
|||||||
*/
|
*/
|
||||||
boolean deleteById(Integer id);
|
boolean deleteById(Integer id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 单独修改商品的库存
|
||||||
|
* @param id
|
||||||
|
* @param editInventory
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
boolean updateInventory(@Param("id") Integer id,@Param("editInventory") Integer editInventory);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -0,0 +1,61 @@
|
|||||||
|
package com.fuint.business.integral.service;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
|
import com.fuint.business.integral.entity.IntegralOrders;
|
||||||
|
import com.fuint.business.integral.vo.IntegralOrdersVO;
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 存储兑换订单信息(IntegralOrders)表服务接口
|
||||||
|
*
|
||||||
|
* @author makejava
|
||||||
|
* @since 2023-11-07 13:59:23
|
||||||
|
*/
|
||||||
|
public interface IntegralOrdersService {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通过ID查询单条数据
|
||||||
|
*
|
||||||
|
* @param id 主键
|
||||||
|
* @return 实例对象
|
||||||
|
*/
|
||||||
|
IntegralOrders queryById(Integer id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分页查询
|
||||||
|
*
|
||||||
|
* @param integralOrders 筛选条件
|
||||||
|
* @param page 分页对象
|
||||||
|
* @return 查询结果
|
||||||
|
*/
|
||||||
|
IPage<IntegralOrdersVO> queryByPage(@Param("page") Page page, @Param("integralGift") IntegralOrders integralOrders);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增数据
|
||||||
|
*
|
||||||
|
* @param integralOrders 实例对象
|
||||||
|
* @return 实例对象
|
||||||
|
*/
|
||||||
|
IntegralOrders insert(IntegralOrders integralOrders);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改数据
|
||||||
|
*
|
||||||
|
* @param integralOrders 实例对象
|
||||||
|
* @return 实例对象
|
||||||
|
*/
|
||||||
|
IntegralOrders update(IntegralOrders integralOrders);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通过主键删除数据
|
||||||
|
*
|
||||||
|
* @param id 主键
|
||||||
|
* @return 是否成功
|
||||||
|
*/
|
||||||
|
boolean deleteById(Integer id);
|
||||||
|
Map<String, String> statistics();
|
||||||
|
|
||||||
|
}
|
@ -89,4 +89,17 @@ public class IntegralGiftServiceImpl implements IntegralGiftService {
|
|||||||
public boolean deleteById(Integer id) {
|
public boolean deleteById(Integer id) {
|
||||||
return this.integralGiftDao.deleteById(id) > 0;
|
return this.integralGiftDao.deleteById(id) > 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 单独修改商品的库存
|
||||||
|
* @param id
|
||||||
|
* @param editInventory
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public boolean updateInventory(@Param("id") Integer id,@Param("editInventory") Integer editInventory) {
|
||||||
|
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
|
||||||
|
return this.integralGiftDao.updateInventory(id,editInventory,nowAccountInfo.getStaffId()) > 0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -0,0 +1,96 @@
|
|||||||
|
package com.fuint.business.integral.service.impl;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
|
import com.fuint.business.integral.entity.IntegralGift;
|
||||||
|
import com.fuint.business.integral.entity.IntegralOrders;
|
||||||
|
import com.fuint.business.integral.mapper.IntegralOrdersMapper;
|
||||||
|
import com.fuint.business.integral.service.IntegralOrdersService;
|
||||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
|
|
||||||
|
import com.fuint.business.integral.vo.IntegralGiftVO;
|
||||||
|
import com.fuint.business.integral.vo.IntegralOrdersVO;
|
||||||
|
import com.fuint.common.dto.AccountInfo;
|
||||||
|
import com.fuint.common.util.TokenUtil;
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
import org.springframework.data.domain.PageImpl;
|
||||||
|
import org.springframework.data.domain.PageRequest;
|
||||||
|
|
||||||
|
import javax.annotation.Resource;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 存储兑换订单信息(IntegralOrders)表服务实现类
|
||||||
|
*
|
||||||
|
* @author makejava
|
||||||
|
* @since 2023-11-07 13:59:23
|
||||||
|
*/
|
||||||
|
@Service("integralOrdersService")
|
||||||
|
public class IntegralOrdersServiceImpl implements IntegralOrdersService {
|
||||||
|
@Resource
|
||||||
|
private IntegralOrdersMapper integralOrdersDao;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通过ID查询单条数据
|
||||||
|
*
|
||||||
|
* @param id 主键
|
||||||
|
* @return 实例对象
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public IntegralOrders queryById(Integer id) {
|
||||||
|
return this.integralOrdersDao.queryById(id);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分页查询
|
||||||
|
*
|
||||||
|
* @param integralOrders 筛选条件
|
||||||
|
* @param page 分页对象
|
||||||
|
* @return 查询结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public IPage<IntegralOrdersVO> queryByPage(@Param("page") Page page, @Param("integralOrders") IntegralOrders integralOrders) {
|
||||||
|
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
|
||||||
|
integralOrders.setStoreId(nowAccountInfo.getStoreId());
|
||||||
|
return integralOrdersDao.queryAllByLimit(page, integralOrders);
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* 新增数据
|
||||||
|
*
|
||||||
|
* @param integralOrders 实例对象
|
||||||
|
* @return 实例对象
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public IntegralOrders insert(IntegralOrders integralOrders) {
|
||||||
|
this.integralOrdersDao.insert(integralOrders);
|
||||||
|
return integralOrders;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改数据
|
||||||
|
*
|
||||||
|
* @param integralOrders 实例对象
|
||||||
|
* @return 实例对象
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public IntegralOrders update(IntegralOrders integralOrders) {
|
||||||
|
this.integralOrdersDao.update(integralOrders);
|
||||||
|
return this.queryById(integralOrders.getId());
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通过主键删除数据
|
||||||
|
*
|
||||||
|
* @param id 主键
|
||||||
|
* @return 是否成功
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public boolean deleteById(Integer id) {
|
||||||
|
return this.integralOrdersDao.deleteById(id) > 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Map<String, String> statistics() {
|
||||||
|
return this.integralOrdersDao.statistics();
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,14 @@
|
|||||||
|
package com.fuint.business.integral.vo;
|
||||||
|
|
||||||
|
|
||||||
|
import com.fuint.business.integral.entity.IntegralOrders;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class IntegralOrdersVO extends IntegralOrders {
|
||||||
|
private String mobile;
|
||||||
|
private String userNo;
|
||||||
|
private String name;
|
||||||
|
private String giftName;
|
||||||
|
private String coverImage;
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user