This commit is contained in:
PQZ 2024-09-09 23:24:22 +08:00
commit 6436423875
5 changed files with 826 additions and 598 deletions

Binary file not shown.

View File

@ -1,13 +1,53 @@
import request from '@/utils/request' import request from '@/utils/request'
// 上传文件
export function uploadFile(data,activeNum,interType) {
return request({
url: '/cardGiftActive/importCardInfo?activeNum='+activeNum+'&interType='+interType,
method: 'post',
data: data,
headers: {
'Content-Type': 'multipart/form-data'
}
})
}
// 分页查询列表 // 分页查询列表
export function getList(query) { export function getList(query) {
return request({ return request({
url: 'business/marketingActivity/cardGift', url: '/cardGiftActive',
method: 'get', method: 'get',
params: query params: query
}) })
} }
//修改
export function updateId(data) {
return request({
url: '/cardGiftActive',
method: 'put',
data: data
})
}
//新增
export function add(data) {
return request({
url: '/cardGiftActive',
method: 'post',
data: data
})
}
//下载模板
export function downloadTemplate() {
return request({
url: 'business/marketingActivity/cardGift/template',
method: 'get',
responseType: 'blob'
})
}
export function getListtj(query) { export function getListtj(query) {
return request({ return request({
url: 'business/marketingActivity/cardGift/list/11', url: 'business/marketingActivity/cardGift/list/11',

View File

@ -3,23 +3,16 @@
<div class="card-box" style="margin-bottom: 20px"> <div class="card-box" style="margin-bottom: 20px">
<div class="top-hang"> <div class="top-hang">
<div class="d-s"> <div class="d-s">
<el-select v-model="queryParams.cardAmount" clearable style="margin-right: 10px" placeholder="请选择面值">
<el-option <el-input
v-for="item in jglist" placeholder="请输入内容"
:key="item.cardAmount" v-model="queryParams.activeName"
:label="item.cardAmount" clearable
:value="item.cardAmount"> width="150px"
</el-option> >
</el-select> </el-input>
<el-select v-model="queryParams.activateStatus" clearable style="margin-right: 10px" placeholder="请选择激活状态">
<el-option <el-select v-model="queryParams.status" clearable style="margin-left: 10px" placeholder="请选择状态">
v-for="item in option"
:key="item.value"
:label="item.label"
:value="item.value">
</el-option>
</el-select>
<el-select v-model="queryParams.sailStatus" clearable style="margin-right: 10px" placeholder="请选择出售状态">
<el-option <el-option
v-for="item in options" v-for="item in options"
:key="item.value" :key="item.value"
@ -31,7 +24,7 @@
<div class="d-s"> <div class="d-s">
<el-button type="primary" icon="el-icon-search" @click="getlist">查询</el-button> <el-button type="primary" icon="el-icon-search" @click="getlist">查询</el-button>
<el-button icon="el-icon-refresh" @click="resetQuery">重置</el-button> <el-button icon="el-icon-refresh" @click="resetQuery">重置</el-button>
<el-button type="primary" icon="el-icon-search" >下载模板</el-button> <el-button type="primary" icon="el-icon-search" @click="downloadTemplate()">下载模板</el-button>
<el-button type="primary" @click="centerDialogVisible =! centerDialogVisible">新增礼品卡活动</el-button> <el-button type="primary" @click="centerDialogVisible =! centerDialogVisible">新增礼品卡活动</el-button>
</div> </div>
@ -46,27 +39,27 @@
> >
</el-table-column> </el-table-column>
<el-table-column <el-table-column
prop="number" prop="activeNum"
label="活动编号" label="活动编号"
> >
</el-table-column> </el-table-column>
<el-table-column <el-table-column
prop="cardAmount" prop="activeName"
label="活动名称" label="活动名称"
> >
</el-table-column> </el-table-column>
<el-table-column <el-table-column
prop="useTime" prop="cardAmount"
label="礼品卡面值" label="礼品卡面值"
> >
</el-table-column> </el-table-column>
<el-table-column <el-table-column
prop="sailTime" prop="sumNum"
label="制卡数量" label="制卡数量"
> >
</el-table-column> </el-table-column>
<el-table-column <el-table-column
prop="createTime" prop="lastNum"
label="剩余制卡数量" label="剩余制卡数量"
> >
</el-table-column> </el-table-column>
@ -74,24 +67,27 @@
prop="createTime" prop="createTime"
label="有效期" label="有效期"
> >
<template slot-scope="scope">
{{ scope.row.effectiveTimeStart + '~' + scope.row.effectiveTimeEnd }}
</template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
prop="createTime" prop="pwdType"
label="关联油品油号"
>
</el-table-column>
<el-table-column
prop="createTime"
label="密码" label="密码"
> >
<template slot-scope="scope">
<span v-if="scope.row.pwdType == 0">免密</span>
<span v-if="scope.row.pwdType == 1">密码</span>
</template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
prop="sailStatus" prop="status"
label="状态" label="状态"
> >
<template slot-scope="scope"> <template slot-scope="scope">
<span v-if="scope.row.sailStatus == 1">已售</span> <span v-if="scope.row.status == 0">待上传</span>
<span v-if="scope.row.sailStatus != 1">未售</span> <span v-if="scope.row.status == 1">待加密</span>
<span v-if="scope.row.status == 2">生效中</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
@ -106,27 +102,28 @@
<div style="display: flex;flex-wrap: wrap"> <div style="display: flex;flex-wrap: wrap">
<el-button <el-button
type="text" type="text"
>修改</el-button> @click="updateId(scope.row)"
>修改
</el-button>
<el-button <el-button
type="text" type="text"
@click="uploadShow()" @click="uploadShow(scope.row)"
>上传礼品卡数据</el-button> >上传礼品卡数据
</el-button>
<el-button <el-button
type="text" type="text"
@click="Encryption =! Encryption" @click="Encryption =! Encryption"
>密码加密</el-button> >密码加密
</el-button>
<el-button <el-button
type="text" type="text"
@click="orderShow =! orderShow" @click="orderShow =! orderShow"
>查看订单信息</el-button> >查看订单信息
</el-button>
</div> </div>
</template> </template>
</el-table-column> </el-table-column>
<!-- <el-table-column
prop="remark"
label="备注信息"
width="280">
</el-table-column>-->
</el-table> </el-table>
<pagination <pagination
v-show="total>0" v-show="total>0"
@ -214,27 +211,79 @@
title="上传礼品卡数据" title="上传礼品卡数据"
:visible.sync="uploadingShow" :visible.sync="uploadingShow"
width="40%" width="40%"
@close="handleClose2"
> >
<el-form :model="ruleForm2" :rules="rules2" ref="ruleForm2" label-width="100px" class="demo-ruleForm">
<el-form-item label="活动编号" prop="activeNum">
<el-input v-model="ruleForm2.activeNum"></el-input>
</el-form-item>
<el-form-item label="上传数据形式">
<div class="d-s">
<div class="icon-type" v-for="(item,index) in modalitylsit2" :key="index"
:class="{ 'acvtive' : index === tindex2 }" @click="Typeindex2(index)">
<img src="../../../assets/images/wx.png" style="width: 20px;height: 20px" v-if="index != tindex2">
<img src="../../../assets/images/xz.png" style="width: 20px;height: 20px" v-if="index == tindex2">
{{ item }}
</div>
</div>
</el-form-item>
<el-form-item label="文件" prop="activeNum">
<el-upload
:action=uploadUrl
ref="upload2"
class="upload-demo"
drag
:auto-upload="false"
:before-upload="beforeUpload"
:on-success="handleSuccess"
:on-error="handleError"
:on-exceed="handleExceed"
:file-list="fileList2"
:limit="1"
:on-change="handleChange"
>
<i class="el-icon-upload"></i>
<div class="el-upload__text">将文件拖到此处<em>点击上传</em></div>
<div class="el-upload__tip" slot="tip">
<span>上传文件必须符合模板格式请下载
<a @click="downloadTemplate" style="color:blue">导入模板</a>
</span>
</div>
</el-upload>
<el-button @click="uploadingShow = false">取消</el-button>
<el-button type="primary" @click="submitUpload">导入</el-button>
</el-form-item>
</el-form>
</el-dialog> </el-dialog>
<el-dialog <el-dialog
title="新增/修改礼品卡活动" title="新增/修改礼品卡活动"
:visible.sync="centerDialogVisible" :visible.sync="centerDialogVisible"
width="40%" width="40%"
@close="handleClose1"
> >
<el-form :model="ruleForm" :rules="rules" :label-position="labelPosition" ref="ruleForm" label-width="100px" class="demo-ruleForm"> <el-form ref="formName" :model="ruleForm" :rules="rules" :label-position="labelPosition" label-width="100px"
<el-form-item label="活动编号" prop="quantity"> class="demo-ruleForm">
<el-input v-model="ruleForm.quantity"></el-input> <el-form-item label="活动编号" prop="activeNum">
<el-input v-model="ruleForm.activeNum"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="活动名称" prop="quantity"> <el-form-item label="活动名称" prop="activeName">
<el-input v-model="ruleForm.name"></el-input> <el-input v-model="ruleForm.activeName"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="礼品卡面值" prop="quantity"> <el-form-item label="礼品卡面值" prop="cardAmount">
<el-input placeholder="请输入内容" v-model="ruleForm.name"> <el-input placeholder="请输入内容" v-model="ruleForm.cardAmount">
<template slot="append"></template> <template slot="append"></template>
</el-input> </el-input>
</el-form-item> </el-form-item>
<el-form-item label="有效期" prop="quantity"> <el-form-item label="有效期" prop="value1">
<el-date-picker <el-date-picker
v-model="ruleForm.value1" v-model="ruleForm.value1"
type="datetimerange" type="datetimerange"
@ -243,51 +292,30 @@
end-placeholder="结束日期"> end-placeholder="结束日期">
</el-date-picker> </el-date-picker>
</el-form-item> </el-form-item>
<el-form-item label="关联油品油号" prop="name" > <el-form-item label="卡类型" prop="cardType">
<div class="d-s"> <el-select v-model="ruleForm.cardType" placeholder="请选择投放类型" style="width: 300px">
<div class="icon-type" v-for="(item,index) in oillist" :key="index" <el-option v-for="dict in dict.type.card_gift_type" :key="dict.value" :label="dict.label"
:class="{ 'acvtive' : index === tindex }" @click="Typeindex(index)"> :value="dict.value"/>
<img src="../../../assets/images/wx.png" style="width: 20px;height: 20px" v-if="index != tindex">
<img src="../../../assets/images/xz.png" style="width: 20px;height: 20px" v-if="index == tindex">
{{ item }}
</div>
<el-select v-model="ruleForm.value" placeholder="请选择">
<el-option
v-for="item in oilnumlist"
:key="item.value"
:label="item.label"
:value="item.value">
</el-option>
</el-select> </el-select>
</div>
</el-form-item> </el-form-item>
<el-form-item label="卡类型" prop="quantity"> <el-form-item label="密码形式" prop="name">
<el-date-picker
v-model="ruleForm.value1"
type="datetimerange"
range-separator="至"
start-placeholder="开始日期"
end-placeholder="结束日期">
</el-date-picker>
</el-form-item>
<el-form-item label="关联油品油号" prop="name" >
<div class="d-s"> <div class="d-s">
<div class="icon-type" v-for="(item,index) in modalitylsit" :key="index" <div class="icon-type" v-for="(item,index) in modalitylsit" :key="index"
:class="{ 'acvtive' : index === tindex }" @click="Typeindex(index)"> :class="{ 'acvtive' : index === tindex }" @click="Typeindex2(index)">
<img src="../../../assets/images/wx.png" style="width: 20px;height: 20px" v-if="index != tindex"> <img src="../../../assets/images/wx.png" style="width: 20px;height: 20px" v-if="index != tindex">
<img src="../../../assets/images/xz.png" style="width: 20px;height: 20px" v-if="index == tindex"> <img src="../../../assets/images/xz.png" style="width: 20px;height: 20px" v-if="index == tindex">
{{ item }} {{ item }}
</div> </div>
</div> </div>
</el-form-item> </el-form-item>
<el-form-item label="礼品卡说明" prop="name" > <el-form-item label="礼品卡说明" prop="remark">
<el-input type="textarea" v-model="ruleForm.desc"></el-input> <el-input type="textarea" v-model="ruleForm.remark"></el-input>
</el-form-item> </el-form-item>
</el-form> </el-form>
<span slot="footer" class="dialog-footer"> <span slot="footer" class="dialog-footer">
<el-button @click="centerDialogVisible = false"> </el-button> <el-button @click="centerDialogVisible = false"> </el-button>
<el-button type="primary" @click="addBlock()">创建</el-button> <el-button type="primary" @click="addBlock('formName')">创建</el-button>
</span> </span>
</el-dialog> </el-dialog>
<el-dialog <el-dialog
@ -342,8 +370,12 @@
<script> <script>
import { import {
add,
updateId,
getList, getList,
getListtj, getListtj,
uploadFile,
downloadTemplate,
addList, addList,
eitList, eitList,
deleteList, deleteList,
@ -356,10 +388,15 @@ import {
getsk getsk
} from "@/api/EventMarketing/giftBlock"; } from "@/api/EventMarketing/giftBlock";
import {getToken} from "@/utils/auth"; import {getToken} from "@/utils/auth";
import saveAs from 'file-saver';
export default { export default {
name: 'index', name: 'index',
dicts: ['card_gift_type'],
data() { data() {
return { return {
//http://localhost:81/dev-api/cardGiftActive
uploadUrl: process.env.VUE_APP_BASE_API + ' /cardGiftActive/importCardInfo',
Encryption: false, Encryption: false,
uploadingShow: false, uploadingShow: false,
oillist: [ oillist: [
@ -370,6 +407,10 @@ import {
"免密", "免密",
"密码" "密码"
], ],
modalitylsit2: [
"新增",
"覆盖新增"
],
oilnumlist: [ oilnumlist: [
{ {
value: '1', value: '1',
@ -381,6 +422,7 @@ import {
}, },
], ],
tindex: 0, tindex: 0,
tindex2: 0,
jglist: [], jglist: [],
onelist: [], onelist: [],
twolist: [], twolist: [],
@ -396,12 +438,13 @@ import {
}, },
uploading: false, uploading: false,
fileList: [], fileList: [],
fileList2: [],
labelPosition: 'left', labelPosition: 'left',
queryParams: { queryParams: {
number:'', //
remark:'', activeName: '',
activateStatus:null,
status:'',
pageNo: 1, pageNo: 1,
pageSize: 10 pageSize: 10
}, },
@ -420,12 +463,18 @@ import {
},], },],
options: [ options: [
{ {
value: '1',
label: '已售'
}, {
value: '0', value: '0',
label: '未售' label: '待上传'
},], }, {
value: '1',
label: '待加密'
},
{
value: '2',
label: '生效中'
}
],
value: '', value: '',
tjdata: {}, tjdata: {},
tableData: [ tableData: [
@ -447,22 +496,41 @@ import {
address: '上海市普陀区金沙江路 1516 弄' address: '上海市普陀区金沙江路 1516 弄'
}], }],
ruleForm: { ruleForm: {
status:'1', //
quantity:'1', activeNum: '',
cardAmount:'1', //
remark:'' activeName: '',
//
cardAmount: '',
//
value1: '',
//
cardType: '',
//
remark: '',
}, },
ruleForm2: {},
rules: { rules: {
status: [ activeNum: [
{required: true, message: '此为必填项', trigger: 'blur'}, {required: true, message: '此为必填项', trigger: 'blur'},
], ],
quantity: [ activeName: [
{required: true, message: '此为必填项', trigger: 'blur'}, {required: true, message: '此为必填项', trigger: 'blur'},
], ],
cardAmount: [ cardAmount: [
{required: true, message: '此为必填项', trigger: 'blur'}, {required: true, message: '此为必填项', trigger: 'blur'},
], ],
value1: [
{required: true, message: '此为必填项', trigger: 'blur'},
],
cardType: [
{required: true, message: '此为必填项', trigger: 'change'},
],
remark: [
{required: true, message: '此为必填项', trigger: 'blur'},
],
} }
@ -472,13 +540,95 @@ import {
this.getlist() this.getlist()
this.gettj() this.gettj()
}, },
methods: { methods: {
uploadShow(){
beforeUpload(file) {
//
return new Promise((resolve, reject) => {
//
console.log('Before Upload:', file);
resolve(true); //
});
},
handleSuccess(response, file, fileList) {
console.log('上传成功:', response);
this.$message.success('上传成功!');
this.uploadingShow = false;
},
handleError(error, file, fileList) {
console.error('上传失败:', error);
this.$message.error('上传失败!');
this.uploadingShow = false;
},
handleExceed(files, fileList) {
this.$message.warning(`当前限制选择一个文件,本次选择了 ${files.length} 个文件,共选择了 ${files.length + fileList.length} 个文件`);
},
submitUpload() {
if (this.fileList2.length > 0) {
//
this.customUpload(this.fileList2[0])
} else {
this.$message.warning('请选择一个文件上传!');
}
},
customUpload(file) {
const formData = new FormData();
formData.append('file', file.raw); // FormData
uploadFile(formData, this.ruleForm2.activeNum, this.tindex2) //
.then(response => {
this.handleSuccess(response.data, file, this.fileList2);
})
.catch(error => {
this.handleError(error, file, this.fileList2);
});
},
downloadTemplate() {
const link = document.createElement('a');
link.href = '/CardGiftActiveTemplate.xlsx'; // public
link.download = 'CardGiftActiveTemplate.xlsx';
link.click();
},
handleClose1() {
//
this.$refs['formName'].resetFields();
//
this.ruleForm = {};
},
handleClose2() {
this.fileList2 = []
},
updateId(row) {
this.centerDialogVisible = !this.centerDialogVisible
this.ruleForm = row
//
this.ruleForm.value1 = [row.effectiveTimeStart, row.effectiveTimeEnd]
//
this.ruleForm.cardType = row.cardType
},
uploadShow(row) {
this.uploadingShow = !this.uploadingShow this.uploadingShow = !this.uploadingShow
//
this.ruleForm2.activeNum = row.activeName
}, },
Typeindex(index) { Typeindex(index) {
this.tindex = index this.tindex = index
}, },
Typeindex2(index) {
this.tindex2 = index
},
toggleSelection(rows) { toggleSelection(rows) {
if (rows) { if (rows) {
rows.forEach(row => { rows.forEach(row => {
@ -511,20 +661,12 @@ import {
}) })
}, },
//
handleChange(file, fileList) { handleChange(file, fileList) {
this.uploading = true; //
console.log(file) console.log('文件变化:', file, fileList);
if(file.status === 'success'){ this.fileList2 = fileList; // fileList
this.uploading = false;
this.openUpload = false;
this.openUser = false;
this.fileList.splice(0,1)
this.result = file.response.data
this.getlist()
}
}, },
putStatus(id) { putStatus(id) {
let data = { let data = {
id: 1, id: 1,
@ -551,21 +693,7 @@ import {
this.getlist(); this.getlist();
}, },
getlist() { getlist() {
getselectGiftValue().then(res=>{
console.log(res)
this.jglist = res.data
})
getqb().then(res=>{
this.onelist = res.data
console.log(this.onelist)
})
getyi().then(res=>{
this.twolist = res.data
})
getwei().then(res=>{
this.threelist = res.data
})
this.queryParams.pageNo = this.pageNo this.queryParams.pageNo = this.pageNo
this.queryParams.pageSize = this.pageSize this.queryParams.pageSize = this.pageSize
getList(this.queryParams).then(res => { getList(this.queryParams).then(res => {
@ -597,22 +725,55 @@ import {
remark: '' remark: ''
} }
}, },
addBlock(){ addBlock(formName) {
if(this.ruleForm.quantity == '' ||this.ruleForm.cardAmount == '' ||this.ruleForm.status == '' ){ this.$refs[formName].validate((valid) => {
this.$message.error('必填项不能有空') if (valid) {
return
//
this.ruleForm.pwdType = this.tindex
//
this.ruleForm.effectiveTimeStart = this.ruleForm.value1[0]
this.ruleForm.effectiveTimeEnd = this.ruleForm.value1[1]
// id
if (this.ruleForm.id) {
updateId(this.ruleForm).then(
(res) => {
if (res.code == 200) {
this.$message.success('修改成功');
} else {
this.$message.error('修改失败');
} }
let data = this.ruleForm }
addList(data).then(res=>{ )
} else {
add(this.ruleForm).then(res => {
if (res.code == 200) { if (res.code == 200) {
this.$message.success('添加成功'); this.$message.success('添加成功');
this.gettj()
this.getlist()
} else { } else {
this.$message.error('操作失败请稍后再试'); this.$message.error('添加失败');
} }
}) })
}
//
this.centerDialogVisible = false this.centerDialogVisible = false
//
this.$refs[formName].resetFields();
//
this.getlist()
} else {
console.log('error submit!!');
return false;
}
});
} }
} }
} }
@ -625,16 +786,19 @@ import {
justify-content: space-between; justify-content: space-between;
} }
.box-der { .box-der {
box-sizing: border-box; box-sizing: border-box;
padding: 15px; padding: 15px;
} }
.kar { .kar {
width: 100%; width: 100%;
background: #FFFFFF; background: #FFFFFF;
margin-bottom: 10px; margin-bottom: 10px;
} }
.d-b { .d-b {
display: flex; display: flex;
align-items: center; align-items: center;
@ -642,21 +806,25 @@ import {
width: 100%; width: 100%;
margin-bottom: 10px; margin-bottom: 10px;
} }
.one-size { .one-size {
font-size: 20px; font-size: 20px;
font-weight: bold; font-weight: bold;
color: #000; color: #000;
} }
.two-size { .two-size {
font-size: 20px; font-size: 20px;
font-weight: bold; font-weight: bold;
color: #78b0fb; color: #78b0fb;
} }
.three-size { .three-size {
font-size: 20px; font-size: 20px;
font-weight: bold; font-weight: bold;
color: #f73f3f; color: #f73f3f;
} }
.ds { .ds {
width: 100%; width: 100%;
display: flex; display: flex;
@ -667,22 +835,26 @@ import {
box-sizing: border-box; box-sizing: border-box;
padding: 15px 5px; padding: 15px 5px;
} }
.tj-text { .tj-text {
font-size: 18px; font-size: 18px;
font-weight: bold; font-weight: bold;
} }
.tj-num { .tj-num {
margin: 5px auto; margin: 5px auto;
//font-size: 28px; //font-size: 28px;
color: #666; color: #666;
text-align: center; text-align: center;
} }
.tj-siez { .tj-siez {
margin: 5px auto; margin: 5px auto;
color: #909399; color: #909399;
font-size: 14px; font-size: 14px;
text-align: center; text-align: center;
} }
.top-hang { .top-hang {
width: 100%; width: 100%;
display: flex; display: flex;
@ -690,10 +862,12 @@ import {
justify-content: space-between; justify-content: space-between;
margin-bottom: 15px; margin-bottom: 15px;
} }
.d-s { .d-s {
display: flex; display: flex;
align-items: center; align-items: center;
} }
.butoon { .butoon {
box-sizing: border-box; box-sizing: border-box;
padding: 6px 10px; padding: 6px 10px;
@ -702,6 +876,7 @@ import {
font-size: 16px; font-size: 16px;
margin-left: 15px; margin-left: 15px;
} }
.sshi { .sshi {
width: 33%; width: 33%;
background: #FFFFFF; background: #FFFFFF;
@ -711,12 +886,14 @@ import {
border-radius: 6px; border-radius: 6px;
//background: #f9f9f9; //background: #f9f9f9;
} }
.tjaocuo { .tjaocuo {
width: 100%; width: 100%;
margin-bottom: 15px; margin-bottom: 15px;
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
} }
.title_ { .title_ {
width: 100%; width: 100%;
display: flex; display: flex;
@ -726,6 +903,7 @@ import {
justify-content: center; justify-content: center;
margin-bottom: 20px; margin-bottom: 20px;
} }
.card-box { .card-box {
width: 100%; width: 100%;
background: #fff; background: #fff;
@ -733,6 +911,7 @@ import {
padding: 15px; padding: 15px;
border-radius: 10px; border-radius: 10px;
} }
.icon-type { .icon-type {
display: flex; display: flex;
align-items: center; align-items: center;
@ -742,6 +921,7 @@ import {
margin-right: 20px; margin-right: 20px;
cursor: pointer; cursor: pointer;
} }
.acvtive { .acvtive {
color: #FF770F !important; color: #FF770F !important;
} }

View File

@ -27,7 +27,7 @@ import java.util.List;
* @since 2024-08-21 16:47:40 * @since 2024-08-21 16:47:40
*/ */
@RestController @RestController
@RequestMapping("cardGiftActive") @RequestMapping("/cardGiftActive")
public class CardGiftActiveController extends BaseController { public class CardGiftActiveController extends BaseController {
/** /**
* 服务对象 * 服务对象

View File

@ -2,8 +2,11 @@ package com.fuint.business.marketingActivity.cardGiftActive.entity;
import java.util.Date; import java.util.Date;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField; import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.extension.activerecord.Model; import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data; import lombok.Data;
import java.io.Serializable; import java.io.Serializable;
@ -17,6 +20,7 @@ import java.io.Serializable;
@Data @Data
public class CardGiftActive extends Model<CardGiftActive> { public class CardGiftActive extends Model<CardGiftActive> {
//主键 //主键
@TableId(type = IdType.AUTO)
private Integer id; private Integer id;
//活动编号 //活动编号
private String activeNum; private String activeNum;
@ -25,8 +29,10 @@ public class CardGiftActive extends Model<CardGiftActive> {
//礼品卡金额 //礼品卡金额
private Double cardAmount; private Double cardAmount;
//有效期开始时间 //有效期开始时间
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss" , timezone = "GMT+8")
private Date effectiveTimeStart; private Date effectiveTimeStart;
//有效期结束时间 //有效期结束时间
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss" , timezone = "GMT+8")
private Date effectiveTimeEnd; private Date effectiveTimeEnd;
//卡类型比如纸卡 使用数据字典 card_gift_type //卡类型比如纸卡 使用数据字典 card_gift_type
private String cardType; private String cardType;
@ -39,10 +45,12 @@ public class CardGiftActive extends Model<CardGiftActive> {
//创建者 //创建者
private String createBy; private String createBy;
//创建时间 //创建时间
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss" , timezone = "GMT+8")
private Date createTime; private Date createTime;
//更新者 //更新者
private String updateBy; private String updateBy;
//更新时间 //更新时间
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss" , timezone = "GMT+8")
private Date updateTime; private Date updateTime;
//所属连锁店id //所属连锁店id
private Integer chainStorId; private Integer chainStorId;