折扣营销
This commit is contained in:
parent
88e9ba8bc9
commit
1c320b17c1
@ -41,10 +41,6 @@
|
|||||||
|
|
||||||
>新增</el-button>
|
>新增</el-button>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</el-row>
|
</el-row>
|
||||||
|
|
||||||
<el-table v-loading="loading" :data="activeConsumptionList" @selection-change="handleSelectionChange">
|
<el-table v-loading="loading" :data="activeConsumptionList" @selection-change="handleSelectionChange">
|
||||||
@ -402,21 +398,14 @@
|
|||||||
<el-select v-model="form.participationCondition" clearable placeholder="请选择天参与条件">
|
<el-select v-model="form.participationCondition" clearable placeholder="请选择天参与条件">
|
||||||
<el-option label="不限制" value="0"></el-option>
|
<el-option label="不限制" value="0"></el-option>
|
||||||
<el-option label="优惠订单不参与" value="1"></el-option>
|
<el-option label="优惠订单不参与" value="1"></el-option>
|
||||||
|
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="参与次数类别" prop="participationAcount">
|
<el-form-item label="参与次数类别" prop="participationAcount">
|
||||||
<el-select v-model="form.participationAcount" clearable placeholder="请选择参与次数类别">
|
<el-select v-model="form.participationAcount" clearable placeholder="请选择参与次数类别">
|
||||||
<el-option label="不限制" value="0"></el-option>
|
<el-option label="不限制" value="0"></el-option>
|
||||||
<el-option label="限制" value="1"></el-option>
|
<el-option label="限制" value="1"></el-option>
|
||||||
|
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<el-form-item label="限制次数" prop="limitAcount" v-if="form.participationAcount == 1">
|
<el-form-item label="限制次数" prop="limitAcount" v-if="form.participationAcount == 1">
|
||||||
<el-input v-model="form.limitAcount" placeholder="请输入限制次数" />
|
<el-input v-model="form.limitAcount" placeholder="请输入限制次数" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
@ -1,22 +1,7 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="app-container">
|
<div class="">
|
||||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
|
<el-card style="margin-bottom: 20px">
|
||||||
<el-form-item label="所属连锁店id" prop="chainStoreId">
|
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="100px">
|
||||||
<el-input
|
|
||||||
v-model="queryParams.chainStoreId"
|
|
||||||
placeholder="请输入所属连锁店id"
|
|
||||||
clearable
|
|
||||||
@keyup.enter.native="handleQuery"
|
|
||||||
/>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="所属店铺id" prop="storeId">
|
|
||||||
<el-input
|
|
||||||
v-model="queryParams.storeId"
|
|
||||||
placeholder="请输入所属店铺id"
|
|
||||||
clearable
|
|
||||||
@keyup.enter.native="handleQuery"
|
|
||||||
/>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="活动名称" prop="name">
|
<el-form-item label="活动名称" prop="name">
|
||||||
<el-input
|
<el-input
|
||||||
v-model="queryParams.name"
|
v-model="queryParams.name"
|
||||||
@ -25,92 +10,26 @@
|
|||||||
@keyup.enter.native="handleQuery"
|
@keyup.enter.native="handleQuery"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="活动开始时间" prop="activeStartTime">
|
<el-form-item label="状态">
|
||||||
<el-date-picker clearable
|
<el-select v-model="queryParams.status" clearable placeholder="请选择活动状态">
|
||||||
v-model="queryParams.activeStartTime"
|
<el-option label="启用" value="0"></el-option>
|
||||||
type="date"
|
<el-option label="禁用" value="1"></el-option>
|
||||||
value-format="yyyy-MM-dd"
|
</el-select>
|
||||||
placeholder="请选择活动开始时间">
|
|
||||||
</el-date-picker>
|
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="活动结束时间" prop="activeEndTime">
|
<el-form-item label="是否在线" prop="isonline">
|
||||||
<el-date-picker clearable
|
<el-select v-model="queryParams.isonline" clearable placeholder="请选择是否在线">
|
||||||
v-model="queryParams.activeEndTime"
|
<el-option label="在线" value="0"></el-option>
|
||||||
type="date"
|
<el-option label="下线" value="1"></el-option>
|
||||||
value-format="yyyy-MM-dd"
|
</el-select>
|
||||||
placeholder="请选择活动结束时间">
|
|
||||||
</el-date-picker>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="适用油品0:92# 1: 95# 2:98# 3:0# 4:-10# 5: LNG 6;CNG 7:京92# 8:京95# 9:京0#" prop="adaptOil">
|
|
||||||
<el-input
|
|
||||||
v-model="queryParams.adaptOil"
|
|
||||||
placeholder="请输入适用油品0:92# 1: 95# 2:98# 3:0# 4:-10# 5: LNG 6;CNG 7:京92# 8:京95# 9:京0#"
|
|
||||||
clearable
|
|
||||||
@keyup.enter.native="handleQuery"
|
|
||||||
/>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="柴油会员等级 1:一级会员 2:二级会员。。。。。。。" prop="dieselUserLevel">
|
|
||||||
<el-input
|
|
||||||
v-model="queryParams.dieselUserLevel"
|
|
||||||
placeholder="请输入柴油会员等级 1:一级会员 2:二级会员。。。。。。。"
|
|
||||||
clearable
|
|
||||||
@keyup.enter.native="handleQuery"
|
|
||||||
/>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="汽油会员等级 1:一级会员 2:二级会员。。。。。。。" prop="gasolineUserLevel">
|
|
||||||
<el-input
|
|
||||||
v-model="queryParams.gasolineUserLevel"
|
|
||||||
placeholder="请输入汽油会员等级 1:一级会员 2:二级会员。。。。。。。"
|
|
||||||
clearable
|
|
||||||
@keyup.enter.native="handleQuery"
|
|
||||||
/>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="天然气会员等级 1:一级会员 2:二级会员。。。。。。。" prop="naturalUserLevel">
|
|
||||||
<el-input
|
|
||||||
v-model="queryParams.naturalUserLevel"
|
|
||||||
placeholder="请输入天然气会员等级 1:一级会员 2:二级会员。。。。。。。"
|
|
||||||
clearable
|
|
||||||
@keyup.enter.native="handleQuery"
|
|
||||||
/>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="参与条件 0:不限制 1:优惠订单不参与" prop="participationCondition">
|
|
||||||
<el-input
|
|
||||||
v-model="queryParams.participationCondition"
|
|
||||||
placeholder="请输入参与条件 0:不限制 1:优惠订单不参与"
|
|
||||||
clearable
|
|
||||||
@keyup.enter.native="handleQuery"
|
|
||||||
/>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="参与次数类别0:不限制 1:限制" prop="participationAcount">
|
|
||||||
<el-input
|
|
||||||
v-model="queryParams.participationAcount"
|
|
||||||
placeholder="请输入参与次数类别0:不限制 1:限制"
|
|
||||||
clearable
|
|
||||||
@keyup.enter.native="handleQuery"
|
|
||||||
/>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="限制次数" prop="limitAcount">
|
|
||||||
<el-input
|
|
||||||
v-model="queryParams.limitAcount"
|
|
||||||
placeholder="请输入限制次数"
|
|
||||||
clearable
|
|
||||||
@keyup.enter.native="handleQuery"
|
|
||||||
/>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="是否在线 0:在线 1: 下线" prop="isonline">
|
|
||||||
<el-input
|
|
||||||
v-model="queryParams.isonline"
|
|
||||||
placeholder="请输入是否在线 0:在线 1: 下线"
|
|
||||||
clearable
|
|
||||||
@keyup.enter.native="handleQuery"
|
|
||||||
/>
|
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
||||||
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
|
</el-card>
|
||||||
|
|
||||||
|
<el-card style="margin-bottom: 20px">
|
||||||
<el-row :gutter="10" class="mb8">
|
<el-row :gutter="10" class="mb8">
|
||||||
<el-col :span="1.5">
|
<el-col :span="1.5">
|
||||||
<el-button
|
<el-button
|
||||||
@ -119,72 +38,18 @@
|
|||||||
icon="el-icon-plus"
|
icon="el-icon-plus"
|
||||||
size="mini"
|
size="mini"
|
||||||
@click="handleAdd"
|
@click="handleAdd"
|
||||||
v-hasPermi="['business/marketingActivity:activeDiscount:add']"
|
|
||||||
>新增</el-button>
|
>新增</el-button>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="1.5">
|
|
||||||
<el-button
|
|
||||||
type="success"
|
|
||||||
plain
|
|
||||||
icon="el-icon-edit"
|
|
||||||
size="mini"
|
|
||||||
:disabled="single"
|
|
||||||
@click="handleUpdate"
|
|
||||||
v-hasPermi="['business/marketingActivity:activeDiscount:edit']"
|
|
||||||
>修改</el-button>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="1.5">
|
|
||||||
<el-button
|
|
||||||
type="danger"
|
|
||||||
plain
|
|
||||||
icon="el-icon-delete"
|
|
||||||
size="mini"
|
|
||||||
:disabled="multiple"
|
|
||||||
@click="handleDelete"
|
|
||||||
v-hasPermi="['business/marketingActivity:activeDiscount:remove']"
|
|
||||||
>删除</el-button>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="1.5">
|
|
||||||
<el-button
|
|
||||||
type="warning"
|
|
||||||
plain
|
|
||||||
icon="el-icon-download"
|
|
||||||
size="mini"
|
|
||||||
@click="handleExport"
|
|
||||||
v-hasPermi="['business/marketingActivity:activeDiscount:export']"
|
|
||||||
>导出</el-button>
|
|
||||||
</el-col>
|
|
||||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
|
||||||
</el-row>
|
</el-row>
|
||||||
|
|
||||||
<el-table v-loading="loading" :data="activeDiscountList" @selection-change="handleSelectionChange">
|
<el-table v-loading="loading" :data="activeDiscountList" @selection-change="handleSelectionChange">
|
||||||
<el-table-column type="selection" width="55" align="center" />
|
<el-table-column type="selection" width="55" align="center" />
|
||||||
<el-table-column label="主键id" align="center" prop="id" />
|
<el-table-column label="活动id" align="center" prop="id" />
|
||||||
<el-table-column label="所属连锁店id" align="center" prop="chainStoreId" />
|
|
||||||
<el-table-column label="所属店铺id" align="center" prop="storeId" />
|
|
||||||
<el-table-column label="活动名称" align="center" prop="name" />
|
<el-table-column label="活动名称" align="center" prop="name" />
|
||||||
<el-table-column label="活动开始时间" align="center" prop="activeStartTime" width="180">
|
<el-table-column label="柴油会员等级 " align="center" prop="dieselUserLevel" />
|
||||||
<template slot-scope="scope">
|
<el-table-column label="汽油会员等级 " align="center" prop="gasolineUserLevel" />
|
||||||
<span>{{ parseTime(scope.row.activeStartTime, '{y}-{m}-{d}') }}</span>
|
<el-table-column label="天然气会员等级 " align="center" prop="naturalUserLevel" />
|
||||||
</template>
|
<el-table-column label="活动状态 " align="center" prop="status" />
|
||||||
</el-table-column>
|
|
||||||
<el-table-column label="活动结束时间" align="center" prop="activeEndTime" width="180">
|
|
||||||
<template slot-scope="scope">
|
|
||||||
<span>{{ parseTime(scope.row.activeEndTime, '{y}-{m}-{d}') }}</span>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column label="适用油品0:92# 1: 95# 2:98# 3:0# 4:-10# 5: LNG 6;CNG 7:京92# 8:京95# 9:京0#" align="center" prop="adaptOil" />
|
|
||||||
<el-table-column label="适用会员类型 0:全部用户 1:全部会员 2:等级会员" align="center" prop="adaptUserType" />
|
|
||||||
<el-table-column label="会员类型 0:汽油会员 1:柴油会员 2:天然气会员" align="center" prop="memberType" />
|
|
||||||
<el-table-column label="柴油会员等级 1:一级会员 2:二级会员。。。。。。。" align="center" prop="dieselUserLevel" />
|
|
||||||
<el-table-column label="汽油会员等级 1:一级会员 2:二级会员。。。。。。。" align="center" prop="gasolineUserLevel" />
|
|
||||||
<el-table-column label="天然气会员等级 1:一级会员 2:二级会员。。。。。。。" align="center" prop="naturalUserLevel" />
|
|
||||||
<el-table-column label="支付方式 0:微信支付 1:支付宝 2:银行卡 3:会员卡 4:现金 5:组合支付" align="center" prop="paymentType" />
|
|
||||||
<el-table-column label="参与条件 0:不限制 1:优惠订单不参与" align="center" prop="participationCondition" />
|
|
||||||
<el-table-column label="参与次数类别0:不限制 1:限制" align="center" prop="participationAcount" />
|
|
||||||
<el-table-column label="限制次数" align="center" prop="limitAcount" />
|
|
||||||
<el-table-column label="活动状态 0:启用 1:禁用" align="center" prop="status" />
|
|
||||||
<el-table-column label="是否在线 0:在线 1: 下线" align="center" prop="isonline" />
|
|
||||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-button
|
<el-button
|
||||||
@ -192,15 +57,15 @@
|
|||||||
type="text"
|
type="text"
|
||||||
icon="el-icon-edit"
|
icon="el-icon-edit"
|
||||||
@click="handleUpdate(scope.row)"
|
@click="handleUpdate(scope.row)"
|
||||||
v-hasPermi="['business/marketingActivity:activeDiscount:edit']"
|
|
||||||
>修改</el-button>
|
>修改</el-button>
|
||||||
<el-button
|
<el-button
|
||||||
size="mini"
|
size="mini"
|
||||||
type="text"
|
type="text"
|
||||||
icon="el-icon-delete"
|
icon="el-icon-delete"
|
||||||
@click="handleDelete(scope.row)"
|
@click="handleDeletexia(scope.row)"
|
||||||
v-hasPermi="['business/marketingActivity:activeDiscount:remove']"
|
v-if="scope.row.isonline == 0"
|
||||||
>删除</el-button>
|
>下线</el-button>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
@ -212,58 +77,94 @@
|
|||||||
:limit.sync="queryParams.pageSize"
|
:limit.sync="queryParams.pageSize"
|
||||||
@pagination="getList"
|
@pagination="getList"
|
||||||
/>
|
/>
|
||||||
|
</el-card>
|
||||||
<!-- 添加或修改折扣营销对话框 -->
|
<!-- 添加或修改折扣营销对话框 -->
|
||||||
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
|
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
|
||||||
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
||||||
<el-form-item label="所属连锁店id" prop="chainStoreId">
|
|
||||||
<el-input v-model="form.chainStoreId" placeholder="请输入所属连锁店id" />
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="所属店铺id" prop="storeId">
|
|
||||||
<el-input v-model="form.storeId" placeholder="请输入所属店铺id" />
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="活动名称" prop="name">
|
<el-form-item label="活动名称" prop="name">
|
||||||
<el-input v-model="form.name" placeholder="请输入活动名称" />
|
<el-input v-model="form.name" placeholder="请输入活动名称" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="活动开始时间" prop="activeStartTime">
|
<el-form-item label="活动开始时间" prop="activeStartTime">
|
||||||
<el-date-picker clearable
|
<el-date-picker clearable
|
||||||
v-model="form.activeStartTime"
|
v-model="form.activeStartTime"
|
||||||
type="date"
|
type="datetime"
|
||||||
value-format="yyyy-MM-dd"
|
value-format="yyyy-MM-dd HH:mm:ss"
|
||||||
placeholder="请选择活动开始时间">
|
placeholder="请选择活动开始时间">
|
||||||
</el-date-picker>
|
</el-date-picker>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="活动结束时间" prop="activeEndTime">
|
<el-form-item label="活动结束时间" prop="activeEndTime">
|
||||||
<el-date-picker clearable
|
<el-date-picker clearable
|
||||||
v-model="form.activeEndTime"
|
v-model="form.activeEndTime"
|
||||||
type="date"
|
type="datetime"
|
||||||
value-format="yyyy-MM-dd"
|
value-format="yyyy-MM-dd HH:mm:ss"
|
||||||
placeholder="请选择活动结束时间">
|
placeholder="请选择活动结束时间">
|
||||||
</el-date-picker>
|
</el-date-picker>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="适用油品0:92# 1: 95# 2:98# 3:0# 4:-10# 5: LNG 6;CNG 7:京92# 8:京95# 9:京0#" prop="adaptOil">
|
<el-form-item label="可用油品" prop="adaptOil" >
|
||||||
<el-input v-model="form.adaptOil" placeholder="请输入适用油品0:92# 1: 95# 2:98# 3:0# 4:-10# 5: LNG 6;CNG 7:京92# 8:京95# 9:京0#" />
|
<el-checkbox-group v-model="form.adaptOil">
|
||||||
|
<el-checkbox v-for="city in oillist" :label="city" :key="city">{{city}}</el-checkbox>
|
||||||
|
</el-checkbox-group>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="柴油会员等级 1:一级会员 2:二级会员。。。。。。。" prop="dieselUserLevel">
|
<el-form-item label="柴油会员等级" prop="dieselUserLevel">
|
||||||
<el-input v-model="form.dieselUserLevel" placeholder="请输入柴油会员等级 1:一级会员 2:二级会员。。。。。。。" />
|
<el-select v-model="form.dieselUserLevel" multiple clearable placeholder="请选择柴油会员等级">
|
||||||
|
<el-option label="V1会员" value="1"></el-option>
|
||||||
|
<el-option label="V2会员" value="2"></el-option>
|
||||||
|
<el-option label="V3会员" value="3"></el-option>
|
||||||
|
<el-option label="V4会员" value="4"></el-option>
|
||||||
|
<el-option label="V5会员" value="5"></el-option>
|
||||||
|
<el-option label="V6会员" value="6"></el-option>
|
||||||
|
<el-option label="V7会员" value="7"></el-option>
|
||||||
|
<el-option label="V8会员" value="8"></el-option>
|
||||||
|
<el-option label="V9会员" value="9"></el-option>
|
||||||
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="汽油会员等级 1:一级会员 2:二级会员。。。。。。。" prop="gasolineUserLevel">
|
<el-form-item label="汽油会员等级" prop="gasolineUserLevel">
|
||||||
<el-input v-model="form.gasolineUserLevel" placeholder="请输入汽油会员等级 1:一级会员 2:二级会员。。。。。。。" />
|
<el-select v-model="form.gasolineUserLevel" multiple clearable placeholder="请选择汽油会员等级">
|
||||||
|
<el-option label="V1会员" value="1"></el-option>
|
||||||
|
<el-option label="V2会员" value="2"></el-option>
|
||||||
|
<el-option label="V3会员" value="3"></el-option>
|
||||||
|
<el-option label="V4会员" value="4"></el-option>
|
||||||
|
<el-option label="V5会员" value="5"></el-option>
|
||||||
|
<el-option label="V6会员" value="6"></el-option>
|
||||||
|
<el-option label="V7会员" value="7"></el-option>
|
||||||
|
<el-option label="V8会员" value="8"></el-option>
|
||||||
|
<el-option label="V9会员" value="9"></el-option>
|
||||||
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="天然气会员等级 1:一级会员 2:二级会员。。。。。。。" prop="naturalUserLevel">
|
<el-form-item label="天然气会员等级" prop="naturalUserLevel">
|
||||||
<el-input v-model="form.naturalUserLevel" placeholder="请输入天然气会员等级 1:一级会员 2:二级会员。。。。。。。" />
|
<el-select v-model="form.naturalUserLevel" multiple clearable placeholder="请选择天然气会员等级">
|
||||||
|
<el-option label="V1会员" value="1"></el-option>
|
||||||
|
<el-option label="V2会员" value="2"></el-option>
|
||||||
|
<el-option label="V3会员" value="3"></el-option>
|
||||||
|
<el-option label="V4会员" value="4"></el-option>
|
||||||
|
<el-option label="V5会员" value="5"></el-option>
|
||||||
|
<el-option label="V6会员" value="6"></el-option>
|
||||||
|
<el-option label="V7会员" value="7"></el-option>
|
||||||
|
<el-option label="V8会员" value="8"></el-option>
|
||||||
|
<el-option label="V9会员" value="9"></el-option>
|
||||||
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="参与条件 0:不限制 1:优惠订单不参与" prop="participationCondition">
|
<el-form-item label="参与条件" prop="participationCondition">
|
||||||
<el-input v-model="form.participationCondition" placeholder="请输入参与条件 0:不限制 1:优惠订单不参与" />
|
<el-select v-model="form.participationCondition" clearable placeholder="请选择天参与条件">
|
||||||
|
<el-option label="不限制" value="0"></el-option>
|
||||||
|
<el-option label="优惠订单不参与" value="1"></el-option>
|
||||||
|
|
||||||
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="参与次数类别0:不限制 1:限制" prop="participationAcount">
|
<el-form-item label="参与次数类别" prop="participationAcount">
|
||||||
<el-input v-model="form.participationAcount" placeholder="请输入参与次数类别0:不限制 1:限制" />
|
<el-select v-model="form.participationAcount" clearable placeholder="请选择参与次数类别">
|
||||||
|
<el-option label="不限制" value="0"></el-option>
|
||||||
|
<el-option label="限制" value="1"></el-option>
|
||||||
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="限制次数" prop="limitAcount">
|
<el-form-item label="限制次数" prop="limitAcount" v-if="form.participationAcount ==1">
|
||||||
<el-input v-model="form.limitAcount" placeholder="请输入限制次数" />
|
<el-input-number v-model="form.limitAcount" placeholder="请输入限制次数" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="是否在线 0:在线 1: 下线" prop="isonline">
|
<el-form-item label="是否上线" prop="isonline">
|
||||||
<el-input v-model="form.isonline" placeholder="请输入是否在线 0:在线 1: 下线" />
|
<el-select v-model="form.isonline" clearable placeholder="请选择参与次数类别">
|
||||||
|
<el-option label="上线" value="0"></el-option>
|
||||||
|
<el-option label="下线" value="1"></el-option>
|
||||||
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
<div slot="footer" class="dialog-footer">
|
<div slot="footer" class="dialog-footer">
|
||||||
@ -281,6 +182,7 @@ export default {
|
|||||||
name: "ActiveDiscount",
|
name: "ActiveDiscount",
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
oillist:['92#','95#','98#','0#','-10#','LNG','CNG','京92#','京95#','京0#',],
|
||||||
// 遮罩层
|
// 遮罩层
|
||||||
loading: true,
|
loading: true,
|
||||||
// 选中数组
|
// 选中数组
|
||||||
@ -336,8 +238,8 @@ export default {
|
|||||||
getList() {
|
getList() {
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
listActiveDiscount(this.queryParams).then(response => {
|
listActiveDiscount(this.queryParams).then(response => {
|
||||||
this.activeDiscountList = response.rows;
|
this.activeDiscountList = response.data.records;
|
||||||
this.total = response.total;
|
this.total = response.data.total;
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
@ -355,18 +257,19 @@ export default {
|
|||||||
name: null,
|
name: null,
|
||||||
activeStartTime: null,
|
activeStartTime: null,
|
||||||
activeEndTime: null,
|
activeEndTime: null,
|
||||||
adaptOil: null,
|
adaptOil: [],
|
||||||
adaptUserType: null,
|
adaptUserType: null,
|
||||||
memberType: null,
|
memberType: null,
|
||||||
dieselUserLevel: null,
|
dieselUserLevel: [],
|
||||||
gasolineUserLevel: null,
|
gasolineUserLevel: [],
|
||||||
naturalUserLevel: null,
|
naturalUserLevel: [],
|
||||||
paymentType: null,
|
paymentType: null,
|
||||||
participationCondition: null,
|
participationCondition: null,
|
||||||
participationAcount: null,
|
participationAcount: null,
|
||||||
limitAcount: null,
|
limitAcount: null,
|
||||||
status: null,
|
status: 0,
|
||||||
isonline: null,
|
isonline: 0,
|
||||||
|
activeDiscountChildList: [],
|
||||||
createBy: null,
|
createBy: null,
|
||||||
createTime: null,
|
createTime: null,
|
||||||
updateBy: null,
|
updateBy: null,
|
||||||
|
@ -1,22 +1,7 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="app-container">
|
<div class="">
|
||||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
|
<el-card style="margin-bottom: 20px">
|
||||||
<el-form-item label="所属连锁店id" prop="chainStorId">
|
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="100px">
|
||||||
<el-input
|
|
||||||
v-model="queryParams.chainStorId"
|
|
||||||
placeholder="请输入所属连锁店id"
|
|
||||||
clearable
|
|
||||||
@keyup.enter.native="handleQuery"
|
|
||||||
/>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="所属店铺id" prop="storeId">
|
|
||||||
<el-input
|
|
||||||
v-model="queryParams.storeId"
|
|
||||||
placeholder="请输入所属店铺id"
|
|
||||||
clearable
|
|
||||||
@keyup.enter.native="handleQuery"
|
|
||||||
/>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="活动名称" prop="name">
|
<el-form-item label="活动名称" prop="name">
|
||||||
<el-input
|
<el-input
|
||||||
v-model="queryParams.name"
|
v-model="queryParams.name"
|
||||||
@ -25,166 +10,46 @@
|
|||||||
@keyup.enter.native="handleQuery"
|
@keyup.enter.native="handleQuery"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="活动开始时间" prop="activeStartTime">
|
<el-form-item label="状态">
|
||||||
<el-date-picker clearable
|
<el-select v-model="queryParams.status" clearable placeholder="请选择活动状态">
|
||||||
v-model="queryParams.activeStartTime"
|
<el-option label="启用" value="0"></el-option>
|
||||||
type="date"
|
<el-option label="禁用" value="1"></el-option>
|
||||||
value-format="yyyy-MM-dd"
|
</el-select>
|
||||||
placeholder="请选择活动开始时间">
|
|
||||||
</el-date-picker>
|
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="活动结束时间" prop="activeEndTime">
|
<el-form-item label="是否在线" prop="isonline">
|
||||||
<el-date-picker clearable
|
<el-select v-model="queryParams.isonline" clearable placeholder="请选择是否在线">
|
||||||
v-model="queryParams.activeEndTime"
|
<el-option label="在线" value="0"></el-option>
|
||||||
type="date"
|
<el-option label="下线" value="1"></el-option>
|
||||||
value-format="yyyy-MM-dd"
|
</el-select>
|
||||||
placeholder="请选择活动结束时间">
|
|
||||||
</el-date-picker>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="适用油品0:92# 1: 95# 2:98# 3:0# 4:-10# 5: LNG 6;CNG 7:京92# 8:京95# 9:京0#" prop="adaptOil">
|
|
||||||
<el-input
|
|
||||||
v-model="queryParams.adaptOil"
|
|
||||||
placeholder="请输入适用油品0:92# 1: 95# 2:98# 3:0# 4:-10# 5: LNG 6;CNG 7:京92# 8:京95# 9:京0#"
|
|
||||||
clearable
|
|
||||||
@keyup.enter.native="handleQuery"
|
|
||||||
/>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="柴油会员等级 1:一级会员 2:二级会员。。。。。。。" prop="dieselUserLevel">
|
|
||||||
<el-input
|
|
||||||
v-model="queryParams.dieselUserLevel"
|
|
||||||
placeholder="请输入柴油会员等级 1:一级会员 2:二级会员。。。。。。。"
|
|
||||||
clearable
|
|
||||||
@keyup.enter.native="handleQuery"
|
|
||||||
/>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="汽油会员等级 1:一级会员 2:二级会员。。。。。。。" prop="gasolineUserLevel">
|
|
||||||
<el-input
|
|
||||||
v-model="queryParams.gasolineUserLevel"
|
|
||||||
placeholder="请输入汽油会员等级 1:一级会员 2:二级会员。。。。。。。"
|
|
||||||
clearable
|
|
||||||
@keyup.enter.native="handleQuery"
|
|
||||||
/>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="天然气会员等级 1:一级会员 2:二级会员。。。。。。。" prop="naturalUserLevel">
|
|
||||||
<el-input
|
|
||||||
v-model="queryParams.naturalUserLevel"
|
|
||||||
placeholder="请输入天然气会员等级 1:一级会员 2:二级会员。。。。。。。"
|
|
||||||
clearable
|
|
||||||
@keyup.enter.native="handleQuery"
|
|
||||||
/>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="参与条件 0:不限制 1:优惠订单不参与" prop="participationCondition">
|
|
||||||
<el-input
|
|
||||||
v-model="queryParams.participationCondition"
|
|
||||||
placeholder="请输入参与条件 0:不限制 1:优惠订单不参与"
|
|
||||||
clearable
|
|
||||||
@keyup.enter.native="handleQuery"
|
|
||||||
/>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="参与次数类别0:不限制 1:限制" prop="participationAcount">
|
|
||||||
<el-input
|
|
||||||
v-model="queryParams.participationAcount"
|
|
||||||
placeholder="请输入参与次数类别0:不限制 1:限制"
|
|
||||||
clearable
|
|
||||||
@keyup.enter.native="handleQuery"
|
|
||||||
/>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="限制次数" prop="limitAcount">
|
|
||||||
<el-input
|
|
||||||
v-model="queryParams.limitAcount"
|
|
||||||
placeholder="请输入限制次数"
|
|
||||||
clearable
|
|
||||||
@keyup.enter.native="handleQuery"
|
|
||||||
/>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="是否在线 0:在线 1: 下线" prop="isonline">
|
|
||||||
<el-input
|
|
||||||
v-model="queryParams.isonline"
|
|
||||||
placeholder="请输入是否在线 0:在线 1: 下线"
|
|
||||||
clearable
|
|
||||||
@keyup.enter.native="handleQuery"
|
|
||||||
/>
|
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
||||||
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
|
</el-card>
|
||||||
|
|
||||||
<el-row :gutter="10" class="mb8">
|
<el-card style="margin-bottom: 20px">
|
||||||
<el-col :span="1.5">
|
<el-row :gutter="10" class="mb8">
|
||||||
<el-button
|
<el-col :span="1.5">
|
||||||
type="primary"
|
<el-button
|
||||||
plain
|
type="primary"
|
||||||
icon="el-icon-plus"
|
plain
|
||||||
size="mini"
|
icon="el-icon-plus"
|
||||||
@click="handleAdd"
|
size="mini"
|
||||||
v-hasPermi="['business/marketingActivity:activeFullminus:add']"
|
@click="handleAdd"
|
||||||
>新增</el-button>
|
>新增</el-button>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="1.5">
|
</el-row>
|
||||||
<el-button
|
|
||||||
type="success"
|
|
||||||
plain
|
|
||||||
icon="el-icon-edit"
|
|
||||||
size="mini"
|
|
||||||
:disabled="single"
|
|
||||||
@click="handleUpdate"
|
|
||||||
v-hasPermi="['business/marketingActivity:activeFullminus:edit']"
|
|
||||||
>修改</el-button>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="1.5">
|
|
||||||
<el-button
|
|
||||||
type="danger"
|
|
||||||
plain
|
|
||||||
icon="el-icon-delete"
|
|
||||||
size="mini"
|
|
||||||
:disabled="multiple"
|
|
||||||
@click="handleDelete"
|
|
||||||
v-hasPermi="['business/marketingActivity:activeFullminus:remove']"
|
|
||||||
>删除</el-button>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="1.5">
|
|
||||||
<el-button
|
|
||||||
type="warning"
|
|
||||||
plain
|
|
||||||
icon="el-icon-download"
|
|
||||||
size="mini"
|
|
||||||
@click="handleExport"
|
|
||||||
v-hasPermi="['business/marketingActivity:activeFullminus:export']"
|
|
||||||
>导出</el-button>
|
|
||||||
</el-col>
|
|
||||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
|
||||||
</el-row>
|
|
||||||
|
|
||||||
<el-table v-loading="loading" :data="activeFullminusList" @selection-change="handleSelectionChange">
|
<el-table v-loading="loading" :data="activeFullminusList" @selection-change="handleSelectionChange">
|
||||||
<el-table-column type="selection" width="55" align="center" />
|
<el-table-column type="selection" width="55" align="center" />
|
||||||
<el-table-column label="主键id" align="center" prop="id" />
|
<el-table-column label="活动id" align="center" prop="id" />
|
||||||
<el-table-column label="所属连锁店id" align="center" prop="chainStorId" />
|
|
||||||
<el-table-column label="所属店铺id" align="center" prop="storeId" />
|
|
||||||
<el-table-column label="活动名称" align="center" prop="name" />
|
<el-table-column label="活动名称" align="center" prop="name" />
|
||||||
<el-table-column label="活动开始时间" align="center" prop="activeStartTime" width="180">
|
<el-table-column label="柴油会员等级 " align="center" prop="dieselUserLevel" />
|
||||||
<template slot-scope="scope">
|
<el-table-column label="汽油会员等级 " align="center" prop="gasolineUserLevel" />
|
||||||
<span>{{ parseTime(scope.row.activeStartTime, '{y}-{m}-{d}') }}</span>
|
<el-table-column label="天然气会员等级 " align="center" prop="naturalUserLevel" />
|
||||||
</template>
|
<el-table-column label="活动状态 " align="center" prop="status" />
|
||||||
</el-table-column>
|
|
||||||
<el-table-column label="活动结束时间" align="center" prop="activeEndTime" width="180">
|
|
||||||
<template slot-scope="scope">
|
|
||||||
<span>{{ parseTime(scope.row.activeEndTime, '{y}-{m}-{d}') }}</span>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column label="适用油品0:92# 1: 95# 2:98# 3:0# 4:-10# 5: LNG 6;CNG 7:京92# 8:京95# 9:京0#" align="center" prop="adaptOil" />
|
|
||||||
<el-table-column label="适用会员类型 0:全部用户 1:全部会员 2:等级会员" align="center" prop="adaptUserType" />
|
|
||||||
<el-table-column label="会员类型 0:汽油会员 1:柴油会员 2:天然气会员" align="center" prop="memberType" />
|
|
||||||
<el-table-column label="柴油会员等级 1:一级会员 2:二级会员。。。。。。。" align="center" prop="dieselUserLevel" />
|
|
||||||
<el-table-column label="汽油会员等级 1:一级会员 2:二级会员。。。。。。。" align="center" prop="gasolineUserLevel" />
|
|
||||||
<el-table-column label="天然气会员等级 1:一级会员 2:二级会员。。。。。。。" align="center" prop="naturalUserLevel" />
|
|
||||||
<el-table-column label="支付方式 0:微信支付 1:支付宝 2:银行卡 3:会员卡 4:现金 5:组合支付" align="center" prop="paymentType" />
|
|
||||||
<el-table-column label="参与条件 0:不限制 1:优惠订单不参与" align="center" prop="participationCondition" />
|
|
||||||
<el-table-column label="参与次数类别0:不限制 1:限制" align="center" prop="participationAcount" />
|
|
||||||
<el-table-column label="限制次数" align="center" prop="limitAcount" />
|
|
||||||
<el-table-column label="活动状态 0:启用 1:禁用" align="center" prop="status" />
|
|
||||||
<el-table-column label="是否在线 0:在线 1: 下线" align="center" prop="isonline" />
|
|
||||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-button
|
<el-button
|
||||||
@ -200,7 +65,7 @@
|
|||||||
icon="el-icon-delete"
|
icon="el-icon-delete"
|
||||||
@click="handleDelete(scope.row)"
|
@click="handleDelete(scope.row)"
|
||||||
v-hasPermi="['business/marketingActivity:activeFullminus:remove']"
|
v-hasPermi="['business/marketingActivity:activeFullminus:remove']"
|
||||||
>删除</el-button>
|
>下线</el-button>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
@ -212,58 +77,95 @@
|
|||||||
:limit.sync="queryParams.pageSize"
|
:limit.sync="queryParams.pageSize"
|
||||||
@pagination="getList"
|
@pagination="getList"
|
||||||
/>
|
/>
|
||||||
|
</el-card>
|
||||||
|
|
||||||
<!-- 添加或修改满减营销对话框 -->
|
<!-- 添加或修改满减营销对话框 -->
|
||||||
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
|
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
|
||||||
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
||||||
<el-form-item label="所属连锁店id" prop="chainStorId">
|
|
||||||
<el-input v-model="form.chainStorId" placeholder="请输入所属连锁店id" />
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="所属店铺id" prop="storeId">
|
|
||||||
<el-input v-model="form.storeId" placeholder="请输入所属店铺id" />
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="活动名称" prop="name">
|
<el-form-item label="活动名称" prop="name">
|
||||||
<el-input v-model="form.name" placeholder="请输入活动名称" />
|
<el-input v-model="form.name" placeholder="请输入活动名称" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="活动开始时间" prop="activeStartTime">
|
<el-form-item label="活动开始时间" prop="activeStartTime">
|
||||||
<el-date-picker clearable
|
<el-date-picker clearable
|
||||||
v-model="form.activeStartTime"
|
v-model="form.activeStartTime"
|
||||||
type="date"
|
type="datetime"
|
||||||
value-format="yyyy-MM-dd"
|
value-format="yyyy-MM-dd HH:mm:ss"
|
||||||
placeholder="请选择活动开始时间">
|
placeholder="请选择活动开始时间">
|
||||||
</el-date-picker>
|
</el-date-picker>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="活动结束时间" prop="activeEndTime">
|
<el-form-item label="活动结束时间" prop="activeEndTime">
|
||||||
<el-date-picker clearable
|
<el-date-picker clearable
|
||||||
v-model="form.activeEndTime"
|
v-model="form.activeEndTime"
|
||||||
type="date"
|
type="datetime"
|
||||||
value-format="yyyy-MM-dd"
|
value-format="yyyy-MM-dd HH:mm:ss"
|
||||||
placeholder="请选择活动结束时间">
|
placeholder="请选择活动结束时间">
|
||||||
</el-date-picker>
|
</el-date-picker>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="适用油品0:92# 1: 95# 2:98# 3:0# 4:-10# 5: LNG 6;CNG 7:京92# 8:京95# 9:京0#" prop="adaptOil">
|
<el-form-item label="可用油品" prop="adaptOil" >
|
||||||
<el-input v-model="form.adaptOil" placeholder="请输入适用油品0:92# 1: 95# 2:98# 3:0# 4:-10# 5: LNG 6;CNG 7:京92# 8:京95# 9:京0#" />
|
<el-checkbox-group v-model="form.adaptOil">
|
||||||
|
<el-checkbox v-for="city in oillist" :label="city" :key="city">{{city}}</el-checkbox>
|
||||||
|
</el-checkbox-group>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="柴油会员等级 1:一级会员 2:二级会员。。。。。。。" prop="dieselUserLevel">
|
<el-form-item label="柴油会员等级" prop="dieselUserLevel">
|
||||||
<el-input v-model="form.dieselUserLevel" placeholder="请输入柴油会员等级 1:一级会员 2:二级会员。。。。。。。" />
|
<el-select v-model="form.dieselUserLevel" multiple clearable placeholder="请选择柴油会员等级">
|
||||||
|
<el-option label="V1会员" value="1"></el-option>
|
||||||
|
<el-option label="V2会员" value="2"></el-option>
|
||||||
|
<el-option label="V3会员" value="3"></el-option>
|
||||||
|
<el-option label="V4会员" value="4"></el-option>
|
||||||
|
<el-option label="V5会员" value="5"></el-option>
|
||||||
|
<el-option label="V6会员" value="6"></el-option>
|
||||||
|
<el-option label="V7会员" value="7"></el-option>
|
||||||
|
<el-option label="V8会员" value="8"></el-option>
|
||||||
|
<el-option label="V9会员" value="9"></el-option>
|
||||||
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="汽油会员等级 1:一级会员 2:二级会员。。。。。。。" prop="gasolineUserLevel">
|
<el-form-item label="汽油会员等级" prop="gasolineUserLevel">
|
||||||
<el-input v-model="form.gasolineUserLevel" placeholder="请输入汽油会员等级 1:一级会员 2:二级会员。。。。。。。" />
|
<el-select v-model="form.gasolineUserLevel" multiple clearable placeholder="请选择汽油会员等级">
|
||||||
|
<el-option label="V1会员" value="1"></el-option>
|
||||||
|
<el-option label="V2会员" value="2"></el-option>
|
||||||
|
<el-option label="V3会员" value="3"></el-option>
|
||||||
|
<el-option label="V4会员" value="4"></el-option>
|
||||||
|
<el-option label="V5会员" value="5"></el-option>
|
||||||
|
<el-option label="V6会员" value="6"></el-option>
|
||||||
|
<el-option label="V7会员" value="7"></el-option>
|
||||||
|
<el-option label="V8会员" value="8"></el-option>
|
||||||
|
<el-option label="V9会员" value="9"></el-option>
|
||||||
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="天然气会员等级 1:一级会员 2:二级会员。。。。。。。" prop="naturalUserLevel">
|
<el-form-item label="天然气会员等级" prop="naturalUserLevel">
|
||||||
<el-input v-model="form.naturalUserLevel" placeholder="请输入天然气会员等级 1:一级会员 2:二级会员。。。。。。。" />
|
<el-select v-model="form.naturalUserLevel" multiple clearable placeholder="请选择天然气会员等级">
|
||||||
|
<el-option label="V1会员" value="1"></el-option>
|
||||||
|
<el-option label="V2会员" value="2"></el-option>
|
||||||
|
<el-option label="V3会员" value="3"></el-option>
|
||||||
|
<el-option label="V4会员" value="4"></el-option>
|
||||||
|
<el-option label="V5会员" value="5"></el-option>
|
||||||
|
<el-option label="V6会员" value="6"></el-option>
|
||||||
|
<el-option label="V7会员" value="7"></el-option>
|
||||||
|
<el-option label="V8会员" value="8"></el-option>
|
||||||
|
<el-option label="V9会员" value="9"></el-option>
|
||||||
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="参与条件 0:不限制 1:优惠订单不参与" prop="participationCondition">
|
<el-form-item label="参与条件" prop="participationCondition">
|
||||||
<el-input v-model="form.participationCondition" placeholder="请输入参与条件 0:不限制 1:优惠订单不参与" />
|
<el-select v-model="form.participationCondition" clearable placeholder="请选择天参与条件">
|
||||||
|
<el-option label="不限制" value="0"></el-option>
|
||||||
|
<el-option label="优惠订单不参与" value="1"></el-option>
|
||||||
|
|
||||||
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="参与次数类别0:不限制 1:限制" prop="participationAcount">
|
<el-form-item label="参与次数类别" prop="participationAcount">
|
||||||
<el-input v-model="form.participationAcount" placeholder="请输入参与次数类别0:不限制 1:限制" />
|
<el-select v-model="form.participationAcount" clearable placeholder="请选择参与次数类别">
|
||||||
|
<el-option label="不限制" value="0"></el-option>
|
||||||
|
<el-option label="限制" value="1"></el-option>
|
||||||
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="限制次数" prop="limitAcount">
|
<el-form-item label="限制次数" prop="limitAcount" v-if="form.participationAcount ==1">
|
||||||
<el-input v-model="form.limitAcount" placeholder="请输入限制次数" />
|
<el-input-number v-model="form.limitAcount" placeholder="请输入限制次数" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="是否在线 0:在线 1: 下线" prop="isonline">
|
<el-form-item label="是否上线" prop="isonline">
|
||||||
<el-input v-model="form.isonline" placeholder="请输入是否在线 0:在线 1: 下线" />
|
<el-select v-model="form.isonline" clearable placeholder="请选择参与次数类别">
|
||||||
|
<el-option label="上线" value="0"></el-option>
|
||||||
|
<el-option label="下线" value="1"></el-option>
|
||||||
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
<div slot="footer" class="dialog-footer">
|
<div slot="footer" class="dialog-footer">
|
||||||
@ -281,6 +183,7 @@ export default {
|
|||||||
name: "ActiveFullminus",
|
name: "ActiveFullminus",
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
oillist:['92#','95#','98#','0#','-10#','LNG','CNG','京92#','京95#','京0#',],
|
||||||
// 遮罩层
|
// 遮罩层
|
||||||
loading: true,
|
loading: true,
|
||||||
// 选中数组
|
// 选中数组
|
||||||
@ -336,8 +239,8 @@ export default {
|
|||||||
getList() {
|
getList() {
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
listActiveFullminus(this.queryParams).then(response => {
|
listActiveFullminus(this.queryParams).then(response => {
|
||||||
this.activeFullminusList = response.rows;
|
this.activeFullminusList = response.data.records;
|
||||||
this.total = response.total;
|
this.total = response.data.total;
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
@ -355,18 +258,19 @@ export default {
|
|||||||
name: null,
|
name: null,
|
||||||
activeStartTime: null,
|
activeStartTime: null,
|
||||||
activeEndTime: null,
|
activeEndTime: null,
|
||||||
adaptOil: null,
|
adaptOil: [],
|
||||||
adaptUserType: null,
|
adaptUserType: null,
|
||||||
memberType: null,
|
memberType: null,
|
||||||
dieselUserLevel: null,
|
dieselUserLevel: [],
|
||||||
gasolineUserLevel: null,
|
gasolineUserLevel: [],
|
||||||
naturalUserLevel: null,
|
naturalUserLevel: [],
|
||||||
paymentType: null,
|
paymentType: null,
|
||||||
participationCondition: null,
|
participationCondition: null,
|
||||||
participationAcount: null,
|
participationAcount: null,
|
||||||
limitAcount: null,
|
limitAcount: null,
|
||||||
status: null,
|
status: 0,
|
||||||
isonline: null,
|
isonline: 0,
|
||||||
|
activeDiscountChildList: [],
|
||||||
createBy: null,
|
createBy: null,
|
||||||
createTime: null,
|
createTime: null,
|
||||||
updateBy: null,
|
updateBy: null,
|
||||||
|
@ -158,6 +158,7 @@ public class ActiveDiscountServiceImpl extends ServiceImpl<ActiveDiscountMapper,
|
|||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public Boolean updateOneById(ActiveDiscountDTO activeDiscountDTO) {
|
public Boolean updateOneById(ActiveDiscountDTO activeDiscountDTO) {
|
||||||
|
boolean update = false;
|
||||||
//更新折扣营销
|
//更新折扣营销
|
||||||
ActiveDiscount activeDiscount = new ActiveDiscount();
|
ActiveDiscount activeDiscount = new ActiveDiscount();
|
||||||
BeanUtils.copyProperties(activeDiscountDTO,activeDiscount);
|
BeanUtils.copyProperties(activeDiscountDTO,activeDiscount);
|
||||||
@ -168,7 +169,22 @@ public class ActiveDiscountServiceImpl extends ServiceImpl<ActiveDiscountMapper,
|
|||||||
//天然气会员等级
|
//天然气会员等级
|
||||||
activeDiscount.setNaturalUserLevel(arrayToString(activeDiscountDTO.getNaturalUserLevel()));
|
activeDiscount.setNaturalUserLevel(arrayToString(activeDiscountDTO.getNaturalUserLevel()));
|
||||||
activeDiscount.setAdaptOil(arrayToString(activeDiscountDTO.getAdaptOil()));
|
activeDiscount.setAdaptOil(arrayToString(activeDiscountDTO.getAdaptOil()));
|
||||||
return updateById(activeDiscount);
|
|
||||||
|
update = updateById(activeDiscount);
|
||||||
|
//更新子表数据
|
||||||
|
LambdaQueryWrapper<ActiveDiscountChild> queryWrapper = new LambdaQueryWrapper<>();
|
||||||
|
queryWrapper.eq(ActiveDiscountChild::getActiveDiscountId,activeDiscountDTO.getId());
|
||||||
|
activeDiscountChildService.remove(queryWrapper);
|
||||||
|
//新增兑换物品
|
||||||
|
List<ActiveDiscountChild> activeDiscountChildList = activeDiscountDTO.getActiveDiscountChildList();
|
||||||
|
if (CollectionUtils.isNotEmpty(activeDiscountChildList)){
|
||||||
|
activeDiscountChildList.stream().map(s ->{
|
||||||
|
s.setActiveDiscountId(activeDiscount.getId());
|
||||||
|
return s;
|
||||||
|
}).collect(Collectors.toList());
|
||||||
|
update = activeDiscountChildService.saveBatch(activeDiscountChildList);
|
||||||
|
}
|
||||||
|
return update;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -152,6 +152,7 @@ public class ActiveFullminusServiceImpl extends ServiceImpl<ActiveFullminusMappe
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Boolean updateOneById(ActiveFullminusDTO activeFullminusDTO) {
|
public Boolean updateOneById(ActiveFullminusDTO activeFullminusDTO) {
|
||||||
|
boolean update = false;
|
||||||
//更新折扣营销
|
//更新折扣营销
|
||||||
ActiveFullminus activeFullminus = new ActiveFullminus();
|
ActiveFullminus activeFullminus = new ActiveFullminus();
|
||||||
BeanUtils.copyProperties(activeFullminusDTO,activeFullminus);
|
BeanUtils.copyProperties(activeFullminusDTO,activeFullminus);
|
||||||
@ -162,7 +163,22 @@ public class ActiveFullminusServiceImpl extends ServiceImpl<ActiveFullminusMappe
|
|||||||
//天然气会员等级
|
//天然气会员等级
|
||||||
activeFullminus.setNaturalUserLevel(arrayToString(activeFullminusDTO.getNaturalUserLevel()));
|
activeFullminus.setNaturalUserLevel(arrayToString(activeFullminusDTO.getNaturalUserLevel()));
|
||||||
activeFullminus.setAdaptOil(arrayToString(activeFullminusDTO.getAdaptOil()));
|
activeFullminus.setAdaptOil(arrayToString(activeFullminusDTO.getAdaptOil()));
|
||||||
return updateById(activeFullminus);
|
|
||||||
|
updateById(activeFullminus);
|
||||||
|
//更新子表数据
|
||||||
|
LambdaQueryWrapper<ActiveDiscountChild> queryWrapper = new LambdaQueryWrapper<>();
|
||||||
|
queryWrapper.eq(ActiveDiscountChild::getActiveFullminusId,activeFullminusDTO.getId());
|
||||||
|
activeDiscountChildService.remove(queryWrapper);
|
||||||
|
//新增兑换物品
|
||||||
|
List<ActiveDiscountChild> activeDiscountChildList = activeFullminusDTO.getActiveDiscountChildList();
|
||||||
|
if (CollectionUtils.isNotEmpty(activeDiscountChildList)){
|
||||||
|
activeDiscountChildList.stream().map(s ->{
|
||||||
|
s.setActiveFullminusId(activeFullminus.getId());
|
||||||
|
return s;
|
||||||
|
}).collect(Collectors.toList());
|
||||||
|
update = activeDiscountChildService.saveBatch(activeDiscountChildList);
|
||||||
|
}
|
||||||
|
return update;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -22,8 +22,10 @@ public class ActiveNewlywedsChild extends Model<ActiveNewlywedsChild> {
|
|||||||
private Integer id;
|
private Integer id;
|
||||||
//新人有礼活动id
|
//新人有礼活动id
|
||||||
private Integer activeNewlywedsId;
|
private Integer activeNewlywedsId;
|
||||||
//有礼奖励 0:优惠券 1:兑换券 2:成长值 3:积分
|
/**
|
||||||
private String courtesyReward;
|
* 活动奖品 0:赠送积分1:赠送优惠券 2. 赠送兑换券 3:赠送成长值 4. 赠送实物
|
||||||
|
*/
|
||||||
|
private String activeGift;
|
||||||
//券id
|
//券id
|
||||||
private Integer vouchersId;
|
private Integer vouchersId;
|
||||||
//赠送卡券名称
|
//赠送卡券名称
|
||||||
@ -34,6 +36,12 @@ public class ActiveNewlywedsChild extends Model<ActiveNewlywedsChild> {
|
|||||||
private String giftCardDetail;
|
private String giftCardDetail;
|
||||||
//券有效期
|
//券有效期
|
||||||
private Integer giftCardTime;
|
private Integer giftCardTime;
|
||||||
|
//有效期0
|
||||||
|
private Integer validityZero;
|
||||||
|
//有效期1
|
||||||
|
private Integer validityOne;
|
||||||
|
//有效期2
|
||||||
|
private Integer validityTwo;
|
||||||
//券数量
|
//券数量
|
||||||
private Integer giftCardTotal;
|
private Integer giftCardTotal;
|
||||||
//创建者
|
//创建者
|
||||||
@ -47,6 +55,29 @@ public class ActiveNewlywedsChild extends Model<ActiveNewlywedsChild> {
|
|||||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
private Date updateTime;
|
private Date updateTime;
|
||||||
|
|
||||||
|
public Integer getValidityZero() {
|
||||||
|
return validityZero;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setValidityZero(Integer validityZero) {
|
||||||
|
this.validityZero = validityZero;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getValidityOne() {
|
||||||
|
return validityOne;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setValidityOne(Integer validityOne) {
|
||||||
|
this.validityOne = validityOne;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getValidityTwo() {
|
||||||
|
return validityTwo;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setValidityTwo(Integer validityTwo) {
|
||||||
|
this.validityTwo = validityTwo;
|
||||||
|
}
|
||||||
|
|
||||||
public Integer getId() {
|
public Integer getId() {
|
||||||
return id;
|
return id;
|
||||||
@ -64,12 +95,12 @@ public class ActiveNewlywedsChild extends Model<ActiveNewlywedsChild> {
|
|||||||
this.activeNewlywedsId = activeNewlywedsId;
|
this.activeNewlywedsId = activeNewlywedsId;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getCourtesyReward() {
|
public String getActiveGift() {
|
||||||
return courtesyReward;
|
return activeGift;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setCourtesyReward(String courtesyReward) {
|
public void setActiveGift(String activeGift) {
|
||||||
this.courtesyReward = courtesyReward;
|
this.activeGift = activeGift;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Integer getVouchersId() {
|
public Integer getVouchersId() {
|
||||||
|
@ -15,6 +15,7 @@ import com.fuint.business.marketingActivity.activeNewlyweds.mapper.ActiveNewlywe
|
|||||||
import com.fuint.business.marketingActivity.activeNewlyweds.entity.ActiveNewlyweds;
|
import com.fuint.business.marketingActivity.activeNewlyweds.entity.ActiveNewlyweds;
|
||||||
import com.fuint.business.marketingActivity.activeNewlyweds.service.ActiveNewlywedsChildService;
|
import com.fuint.business.marketingActivity.activeNewlyweds.service.ActiveNewlywedsChildService;
|
||||||
import com.fuint.business.marketingActivity.activeNewlyweds.service.ActiveNewlywedsService;
|
import com.fuint.business.marketingActivity.activeNewlyweds.service.ActiveNewlywedsService;
|
||||||
|
import com.fuint.business.marketingActivity.activeRecommend.entity.ActiveRecommendChild;
|
||||||
import com.fuint.business.store.service.StoreService;
|
import com.fuint.business.store.service.StoreService;
|
||||||
import com.fuint.common.util.TokenUtil;
|
import com.fuint.common.util.TokenUtil;
|
||||||
import org.apache.commons.lang3.ObjectUtils;
|
import org.apache.commons.lang3.ObjectUtils;
|
||||||
@ -145,12 +146,28 @@ public class ActiveNewlywedsServiceImpl extends ServiceImpl<ActiveNewlywedsMappe
|
|||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public Boolean updateOneById(ActiveNewlywedsDTO activeNewlywedsDTO) {
|
public Boolean updateOneById(ActiveNewlywedsDTO activeNewlywedsDTO) {
|
||||||
|
boolean update = false;
|
||||||
//更新新人有礼活动
|
//更新新人有礼活动
|
||||||
ActiveNewlyweds activeNewlyweds = new ActiveNewlyweds();
|
ActiveNewlyweds activeNewlyweds = new ActiveNewlyweds();
|
||||||
BeanUtils.copyProperties(activeNewlywedsDTO,activeNewlyweds);
|
BeanUtils.copyProperties(activeNewlywedsDTO,activeNewlyweds);
|
||||||
//奖励类型
|
//奖励类型
|
||||||
activeNewlyweds.setCourtesyReward(arrayToString(activeNewlywedsDTO.getCourtesyReward()));
|
activeNewlyweds.setCourtesyReward(arrayToString(activeNewlywedsDTO.getCourtesyReward()));
|
||||||
return updateById(activeNewlyweds);
|
|
||||||
|
update = updateById(activeNewlyweds);
|
||||||
|
//更新子表数据
|
||||||
|
LambdaQueryWrapper<ActiveNewlywedsChild> queryWrapper = new LambdaQueryWrapper<>();
|
||||||
|
queryWrapper.eq(ActiveNewlywedsChild::getActiveNewlywedsId,activeNewlywedsDTO.getId());
|
||||||
|
activeNewlywedsChildService.remove(queryWrapper);
|
||||||
|
//新增兑换物品
|
||||||
|
List<ActiveNewlywedsChild> activeNewlywedsChildList = activeNewlywedsDTO.getActiveNewlywedsChildList();
|
||||||
|
if (CollectionUtils.isNotEmpty(activeNewlywedsChildList)){
|
||||||
|
activeNewlywedsChildList.stream().map(s ->{
|
||||||
|
s.setActiveNewlywedsId(activeNewlyweds.getId());
|
||||||
|
return s;
|
||||||
|
}).collect(Collectors.toList());
|
||||||
|
update = activeNewlywedsChildService.saveBatch(activeNewlywedsChildList);
|
||||||
|
}
|
||||||
|
return update;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -34,6 +34,8 @@ public class ActiveRecommendDTO extends Model<ActiveRecommendDTO> {
|
|||||||
private String newuserGiftType;
|
private String newuserGiftType;
|
||||||
//分享标题
|
//分享标题
|
||||||
private String title;
|
private String title;
|
||||||
|
//分享图片
|
||||||
|
private String titleUrl;
|
||||||
//邀请二维码类型 0:小程序二维码 1:参数二维码
|
//邀请二维码类型 0:小程序二维码 1:参数二维码
|
||||||
private String invitationCodeType;
|
private String invitationCodeType;
|
||||||
//奖励显示 0:优惠券 1:成长值总额 2:积分总额
|
//奖励显示 0:优惠券 1:成长值总额 2:积分总额
|
||||||
@ -73,6 +75,14 @@ public class ActiveRecommendDTO extends Model<ActiveRecommendDTO> {
|
|||||||
this.activeRecommendChildList = activeRecommendChildList;
|
this.activeRecommendChildList = activeRecommendChildList;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public String getTitleUrl() {
|
||||||
|
return titleUrl;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setTitleUrl(String titleUrl) {
|
||||||
|
this.titleUrl = titleUrl;
|
||||||
|
}
|
||||||
|
|
||||||
public Integer getId() {
|
public Integer getId() {
|
||||||
return id;
|
return id;
|
||||||
}
|
}
|
||||||
|
@ -36,6 +36,8 @@ public class ActiveRecommend extends Model<ActiveRecommend> {
|
|||||||
private String newuserGiftType;
|
private String newuserGiftType;
|
||||||
//分享标题
|
//分享标题
|
||||||
private String title;
|
private String title;
|
||||||
|
//分享图片
|
||||||
|
private String titleUrl;
|
||||||
//邀请二维码类型 0:小程序二维码 1:参数二维码
|
//邀请二维码类型 0:小程序二维码 1:参数二维码
|
||||||
private String invitationCodeType;
|
private String invitationCodeType;
|
||||||
//奖励显示 0:优惠券 1:成长值总额 2:积分总额
|
//奖励显示 0:优惠券 1:成长值总额 2:积分总额
|
||||||
@ -57,6 +59,13 @@ public class ActiveRecommend extends Model<ActiveRecommend> {
|
|||||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
private Date updateTime;
|
private Date updateTime;
|
||||||
|
|
||||||
|
public String getTitleUrl() {
|
||||||
|
return titleUrl;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setTitleUrl(String titleUrl) {
|
||||||
|
this.titleUrl = titleUrl;
|
||||||
|
}
|
||||||
|
|
||||||
public Integer getId() {
|
public Integer getId() {
|
||||||
return id;
|
return id;
|
||||||
|
@ -22,8 +22,10 @@ public class ActiveRecommendChild extends Model<ActiveRecommendChild> {
|
|||||||
private Integer id;
|
private Integer id;
|
||||||
//推荐有礼活动id
|
//推荐有礼活动id
|
||||||
private Integer activeRecommendId;
|
private Integer activeRecommendId;
|
||||||
//邀请人获得 0:优惠券 1:兑换券 2:成长值 3:积分
|
/**
|
||||||
private String inviterGiftType;
|
* 活动奖品 0:赠送积分1:赠送优惠券 2. 赠送兑换券 3:赠送成长值 4. 赠送实物
|
||||||
|
*/
|
||||||
|
private String activeGift;
|
||||||
//礼品对象类型 0:邀请人获得 1:新用户获得
|
//礼品对象类型 0:邀请人获得 1:新用户获得
|
||||||
private String giftUserType;
|
private String giftUserType;
|
||||||
//券id
|
//券id
|
||||||
@ -36,6 +38,12 @@ public class ActiveRecommendChild extends Model<ActiveRecommendChild> {
|
|||||||
private String giftCardDetail;
|
private String giftCardDetail;
|
||||||
//券有效期
|
//券有效期
|
||||||
private Integer giftCardTime;
|
private Integer giftCardTime;
|
||||||
|
//有效期0
|
||||||
|
private Integer validityZero;
|
||||||
|
//有效期1
|
||||||
|
private Integer validityOne;
|
||||||
|
//有效期2
|
||||||
|
private Integer validityTwo;
|
||||||
//券数量
|
//券数量
|
||||||
private Integer giftCardTotal;
|
private Integer giftCardTotal;
|
||||||
//创建者
|
//创建者
|
||||||
@ -49,6 +57,30 @@ public class ActiveRecommendChild extends Model<ActiveRecommendChild> {
|
|||||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
private Date updateTime;
|
private Date updateTime;
|
||||||
|
|
||||||
|
public Integer getValidityZero() {
|
||||||
|
return validityZero;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setValidityZero(Integer validityZero) {
|
||||||
|
this.validityZero = validityZero;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getValidityOne() {
|
||||||
|
return validityOne;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setValidityOne(Integer validityOne) {
|
||||||
|
this.validityOne = validityOne;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getValidityTwo() {
|
||||||
|
return validityTwo;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setValidityTwo(Integer validityTwo) {
|
||||||
|
this.validityTwo = validityTwo;
|
||||||
|
}
|
||||||
|
|
||||||
public String getGiftUserType() {
|
public String getGiftUserType() {
|
||||||
return giftUserType;
|
return giftUserType;
|
||||||
}
|
}
|
||||||
@ -73,12 +105,12 @@ public class ActiveRecommendChild extends Model<ActiveRecommendChild> {
|
|||||||
this.activeRecommendId = activeRecommendId;
|
this.activeRecommendId = activeRecommendId;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getInviterGiftType() {
|
public String getActiveGift() {
|
||||||
return inviterGiftType;
|
return activeGift;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setInviterGiftType(String inviterGiftType) {
|
public void setActiveGift(String activeGift) {
|
||||||
this.inviterGiftType = inviterGiftType;
|
this.activeGift = activeGift;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Integer getVouchersId() {
|
public Integer getVouchersId() {
|
||||||
|
@ -3,6 +3,7 @@ package com.fuint.business.marketingActivity.activeRecommend.service.impl;
|
|||||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
import com.baomidou.mybatisplus.core.toolkit.CollectionUtils;
|
import com.baomidou.mybatisplus.core.toolkit.CollectionUtils;
|
||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
|
import com.fuint.business.marketingActivity.activeDiscount.entity.ActiveDiscountChild;
|
||||||
import com.fuint.business.marketingActivity.activeNewlyweds.controller.vo.ActiveNewlywedsVO;
|
import com.fuint.business.marketingActivity.activeNewlyweds.controller.vo.ActiveNewlywedsVO;
|
||||||
import com.fuint.business.marketingActivity.activeNewlyweds.entity.ActiveNewlyweds;
|
import com.fuint.business.marketingActivity.activeNewlyweds.entity.ActiveNewlyweds;
|
||||||
import com.fuint.business.marketingActivity.activeNewlyweds.entity.ActiveNewlywedsChild;
|
import com.fuint.business.marketingActivity.activeNewlyweds.entity.ActiveNewlywedsChild;
|
||||||
@ -47,27 +48,33 @@ public class ActiveRecommendServiceImpl extends ServiceImpl<ActiveRecommendMappe
|
|||||||
@Transactional
|
@Transactional
|
||||||
public Boolean add(ActiveRecommendDTO activeRecommendDTO) {
|
public Boolean add(ActiveRecommendDTO activeRecommendDTO) {
|
||||||
boolean save = false;
|
boolean save = false;
|
||||||
//获取当前店铺的id和连锁店id
|
//根据id查询
|
||||||
if (ObjectUtils.isNotEmpty(TokenUtil.getNowAccountInfo().getStoreId())) {
|
ActiveRecommendVO activeRecommendVO = getOneById(activeRecommendDTO.getId());
|
||||||
activeRecommendDTO.setStoreId(TokenUtil.getNowAccountInfo().getStoreId());
|
if (ObjectUtils.isNotEmpty(activeRecommendVO)){
|
||||||
activeRecommendDTO.setChainStoreId(storeService.getById(TokenUtil.getNowAccountInfo().getStoreId()).getChainStoreId());
|
save = this.updateOneById(activeRecommendDTO);
|
||||||
}
|
}else {
|
||||||
//新增推荐有礼模板
|
//获取当前店铺的id和连锁店id
|
||||||
ActiveRecommend activeRecommend = new ActiveRecommend();
|
if (ObjectUtils.isNotEmpty(TokenUtil.getNowAccountInfo().getStoreId())) {
|
||||||
if (ObjectUtils.isNotEmpty(activeRecommendDTO)){
|
activeRecommendDTO.setStoreId(TokenUtil.getNowAccountInfo().getStoreId());
|
||||||
BeanUtils.copyProperties(activeRecommendDTO,activeRecommend);
|
activeRecommendDTO.setChainStoreId(storeService.getById(TokenUtil.getNowAccountInfo().getStoreId()).getChainStoreId());
|
||||||
//邀请人礼品类型
|
}
|
||||||
activeRecommend.setInviterGiftType(arrayToString(activeRecommendDTO.getInviterGiftType()));
|
//新增推荐有礼模板
|
||||||
save = save(activeRecommend);
|
ActiveRecommend activeRecommend = new ActiveRecommend();
|
||||||
}
|
if (ObjectUtils.isNotEmpty(activeRecommendDTO)) {
|
||||||
//礼品
|
BeanUtils.copyProperties(activeRecommendDTO, activeRecommend);
|
||||||
List<ActiveRecommendChild> list = activeRecommendDTO.getActiveRecommendChildList();
|
//邀请人礼品类型
|
||||||
if (CollectionUtils.isNotEmpty(list)){
|
activeRecommend.setInviterGiftType(arrayToString(activeRecommendDTO.getInviterGiftType()));
|
||||||
list.stream().map(s ->{
|
save = save(activeRecommend);
|
||||||
s.setActiveRecommendId(activeRecommend.getId());
|
}
|
||||||
return s;
|
//礼品
|
||||||
}).collect(Collectors.toList());
|
List<ActiveRecommendChild> list = activeRecommendDTO.getActiveRecommendChildList();
|
||||||
save = activeRecommendChildService.saveBatch(list);
|
if (CollectionUtils.isNotEmpty(list)) {
|
||||||
|
list.stream().map(s -> {
|
||||||
|
s.setActiveRecommendId(activeRecommend.getId());
|
||||||
|
return s;
|
||||||
|
}).collect(Collectors.toList());
|
||||||
|
save = activeRecommendChildService.saveBatch(list);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return save;
|
return save;
|
||||||
}
|
}
|
||||||
@ -105,12 +112,28 @@ public class ActiveRecommendServiceImpl extends ServiceImpl<ActiveRecommendMappe
|
|||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public Boolean updateOneById(ActiveRecommendDTO activeRecommendDTO) {
|
public Boolean updateOneById(ActiveRecommendDTO activeRecommendDTO) {
|
||||||
|
boolean update = false;
|
||||||
//更新推荐有礼活动
|
//更新推荐有礼活动
|
||||||
ActiveRecommend activeRecommend = new ActiveRecommend();
|
ActiveRecommend activeRecommend = new ActiveRecommend();
|
||||||
BeanUtils.copyProperties(activeRecommendDTO,activeRecommend);
|
BeanUtils.copyProperties(activeRecommendDTO,activeRecommend);
|
||||||
//柴油会员等级
|
//柴油会员等级
|
||||||
activeRecommend.setInviterGiftType(arrayToString(activeRecommendDTO.getInviterGiftType()));
|
activeRecommend.setInviterGiftType(arrayToString(activeRecommendDTO.getInviterGiftType()));
|
||||||
return updateById(activeRecommend);
|
|
||||||
|
update = updateById(activeRecommend);
|
||||||
|
//更新子表数据
|
||||||
|
LambdaQueryWrapper<ActiveRecommendChild> queryWrapper = new LambdaQueryWrapper<>();
|
||||||
|
queryWrapper.eq(ActiveRecommendChild::getActiveRecommendId,activeRecommendDTO.getId());
|
||||||
|
activeRecommendChildService.remove(queryWrapper);
|
||||||
|
//新增兑换物品
|
||||||
|
List<ActiveRecommendChild> activeRecommendChildList = activeRecommendDTO.getActiveRecommendChildList();
|
||||||
|
if (CollectionUtils.isNotEmpty(activeRecommendChildList)){
|
||||||
|
activeRecommendChildList.stream().map(s ->{
|
||||||
|
s.setActiveRecommendId(activeRecommend.getId());
|
||||||
|
return s;
|
||||||
|
}).collect(Collectors.toList());
|
||||||
|
update = activeRecommendChildService.saveBatch(activeRecommendChildList);
|
||||||
|
}
|
||||||
|
return update;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -34,6 +34,8 @@ public class ActiveRecommendVO extends Model<ActiveRecommendVO> {
|
|||||||
private String newuserGiftType;
|
private String newuserGiftType;
|
||||||
//分享标题
|
//分享标题
|
||||||
private String title;
|
private String title;
|
||||||
|
//分享图片
|
||||||
|
private String titleUrl;
|
||||||
//邀请二维码类型 0:小程序二维码 1:参数二维码
|
//邀请二维码类型 0:小程序二维码 1:参数二维码
|
||||||
private String invitationCodeType;
|
private String invitationCodeType;
|
||||||
//奖励显示 0:优惠券 1:成长值总额 2:积分总额
|
//奖励显示 0:优惠券 1:成长值总额 2:积分总额
|
||||||
@ -57,6 +59,14 @@ public class ActiveRecommendVO extends Model<ActiveRecommendVO> {
|
|||||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
private Date updateTime;
|
private Date updateTime;
|
||||||
|
|
||||||
|
public String getTitleUrl() {
|
||||||
|
return titleUrl;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setTitleUrl(String titleUrl) {
|
||||||
|
this.titleUrl = titleUrl;
|
||||||
|
}
|
||||||
|
|
||||||
public String[] getInviterGiftType() {
|
public String[] getInviterGiftType() {
|
||||||
return inviterGiftType;
|
return inviterGiftType;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user