This commit is contained in:
cun-nan 2024-09-11 17:35:10 +08:00
parent 9322714578
commit d182ba99ad
31 changed files with 1227 additions and 2089 deletions

View File

@ -8,7 +8,7 @@
</div>
<div class="ping-box">
<div v-show="tabindex == 0">
<SaveBlock></SaveBlock>
<SaveBlock :type="type"></SaveBlock>
<storeOilBlock></storeOilBlock>
</div>
<div v-show="tabindex == 1">
@ -36,7 +36,8 @@ export default {
"电子卡",
"礼品卡",
"优惠券"
]
],
type:"",
}
},
components: {
@ -45,6 +46,11 @@ export default {
giftBlock,
newCertificate
},
created() {
if (this.$route.query.type) {
this.type = this.$route.query.type
}
},
methods: {
// goDetail(id){
// if(id == 1){

View File

@ -543,6 +543,7 @@ import {
export default {
name: 'index',
dicts: ['CardCoupon_type', 'putType_type', 'oilNumber_type'],
props:['type'],
data(){
return{
ruleForm: {
@ -695,8 +696,14 @@ import {
vipname:[]
}
},
mounted() {
created() {
this.getlist()
if (this.type){
this.dialog = true
}
},
mounted() {
},
methods:{
addCrule(){

View File

@ -1,664 +1,5 @@
<template>
<div class="app-container">
<div>
<!-- <el-card style="margin-bottom: 20px">-->
<!-- <el-breadcrumb separator="/" style="margin-bottom: 35px">-->
<!-- <el-breadcrumb-item :to="{ path: '/' }">首页</el-breadcrumb-item>-->
<!-- <el-breadcrumb-item :to="{ path: '/EventMarketing/center/index' }">活动中心</el-breadcrumb-item>-->
<!-- <el-breadcrumb-item>消费有礼</el-breadcrumb-item>-->
<!-- </el-breadcrumb>-->
<!-- <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch"-->
<!-- label-width="100px">-->
<!-- <el-form-item label="" prop="name">-->
<!-- <el-input-->
<!-- v-model="queryParams.name"-->
<!-- placeholder="活动名称"-->
<!-- clearable-->
<!-- @keyup.enter.native="handleQuery"-->
<!-- />-->
<!-- </el-form-item>-->
<!-- <el-form-item label="">-->
<!-- <el-select v-model="queryParams.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 style="float: right">-->
<!-- <el-button type="primary" icon="el-icon-search" size="mini" @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-bottom: 20px">-->
<!-- <el-row :gutter="10" class="mb8">-->
<!-- <el-col :span="1.5">-->
<!-- <el-button-->
<!-- type="primary"-->
<!-- icon="el-icon-plus"-->
<!-- size="mini"-->
<!-- @click="handleAdd"-->
<!-- >新增-->
<!-- </el-button>-->
<!-- </el-col>-->
<!-- </el-row>-->
<!-- <el-table v-loading="loading" :data="activeConsumptionList" :label-position="labelPosition"-->
<!-- @selection-change="handleSelectionChange">-->
<!-- <el-table-column-->
<!-- type="index"-->
<!-- align="center"-->
<!-- label="序号"-->
<!-- >-->
<!-- </el-table-column>-->
<!-- <el-table-column label="活动名称" align="center" prop="name"/>-->
<!-- <el-table-column label="适用油品" align="center" prop="adaptOil">-->
<!-- <template slot-scope="scope">-->
<!-- <span>{{ getName(oilNameList, scope.row.adaptOil) }} </span>-->
<!-- </template>-->
<!-- </el-table-column>-->
<!-- <el-table-column label="满足金额" align="center" prop="participationConditionMoney">-->
<!-- <template slot-scope="scope">-->
<!-- <span>{{ scope.row.participationConditionMoney }} </span>-->
<!-- </template>-->
<!-- </el-table-column>-->
<!-- <el-table-column label="适用用户" align="center" prop="adaptUserType">-->
<!-- <template slot-scope="scope">-->
<!-- <span v-if="scope.row.adaptUserType == 0">全部用户</span>-->
<!-- <span v-if="scope.row.adaptUserType == 1">全部会员</span>-->
<!-- <span v-if="scope.row.adaptUserType == 2">等级会员</span>-->
<!-- </template>-->
<!-- </el-table-column>-->
<!-- <el-table-column label="赠券数量" align="center" prop="adaptUserType">-->
<!-- <template slot-scope="scope">-->
<!-- <div>优惠券{{ scope.row.youhuiTotal || 0 }}</div>-->
<!-- <div>兑换券{{ scope.row.duihuanTotal || 0 }}</div>-->
<!-- </template>-->
<!-- </el-table-column>-->
<!-- <el-table-column label="核销统计" align="center" prop="adaptUserType">-->
<!-- <template slot-scope="scope">-->
<!-- <div>优惠券{{ scope.row.youhuiTotaled || 0 }}</div>-->
<!-- <div>兑换券{{ scope.row.duihuanTotaled || 0 }}</div>-->
<!-- </template>-->
<!-- </el-table-column>-->
<!-- <el-table-column label="活动时间" width="150" align="center" prop="adaptUserType">-->
<!-- <template slot-scope="scope">-->
<!-- <div>{{ scope.row.activeStartTime || 0 }}</div>-->
<!-- <div>{{ scope.row.activeEndTime || 0 }}</div>-->
<!-- </template>-->
<!-- </el-table-column>-->
<!-- <el-table-column label="活动状态" align="center" prop="status">-->
<!-- <template slot-scope="scope">-->
<!-- <span style="cursor: pointer;" @click="qiyong(scope.row)" v-if="scope.row.status == 0"> <el-tag>上线</el-tag> </span>-->
<!-- <span style="cursor: pointer;" @click="jinyong(scope.row)" v-if="scope.row.status == 1"> <el-tag-->
<!-- type="danger">已下线</el-tag> </span>-->
<!-- </template>-->
<!-- </el-table-column>-->
<!-- <el-table-column label="活动更新时间" width="150" align="center" prop="updateTime">-->
<!-- <template slot-scope="scope">-->
<!-- <span>{{ scope.row.updateTime || '暂无更新' }}</span>-->
<!-- </template>-->
<!-- </el-table-column>-->
<!-- <el-table-column label="操作员" align="center" prop="updateTime">-->
<!-- <template slot-scope="scope">-->
<!-- <span>{{ scope.row.createBy || '' }}</span>-->
<!-- </template>-->
<!-- </el-table-column>-->
<!-- <el-table-column label="操作" align="center" width="160" class-name="small-padding fixed-width">-->
<!-- <template slot-scope="scope">-->
<!-- <el-button-->
<!-- size="mini"-->
<!-- type="text"-->
<!-- icon="el-icon-edit"-->
<!-- @click="handleUpdate(scope.row)"-->
<!-- >修改-->
<!-- </el-button>-->
<!-- <el-button-->
<!-- size="mini"-->
<!-- type="text"-->
<!-- icon="el-icon-view"-->
<!-- @click="lookDetail(scope.row)"-->
<!-- >详情-->
<!-- </el-button>-->
<!-- <el-button-->
<!-- size="mini"-->
<!-- type="text"-->
<!-- icon="el-icon-delete"-->
<!-- @click="handleDeletexia(scope.row)"-->
<!-- v-if="scope.row.isonline == 0"-->
<!-- >下线-->
<!-- </el-button>-->
<!-- <el-button-->
<!-- size="mini"-->
<!-- type="text"-->
<!-- icon="el-icon-delete"-->
<!-- @click="Deleteshan(scope.row)"-->
<!-- v-if="scope.row.isonline == 1"-->
<!-- >删除-->
<!-- </el-button>-->
<!-- </template>-->
<!-- </el-table-column>-->
<!-- </el-table>-->
<!-- <pagination-->
<!-- v-show="total>0"-->
<!-- :total="total"-->
<!-- :page.sync="queryParams.pageNum"-->
<!-- :limit.sync="queryParams.pageSize"-->
<!-- @pagination="getList"-->
<!-- />-->
<!-- </el-card>-->
<!-- &lt;!&ndash; 添加或修改消费有礼活动对话框 &ndash;&gt;-->
<!-- <el-dialog :title="title" :visible.sync="open" width="45%" append-to-body>-->
<!-- <el-form ref="form" :model="form" :rules="rules" :label-position="labelPosition" label-width="110px">-->
<!-- <el-form-item label="活动名称" prop="name">-->
<!-- <div style="width: 217px">-->
<!-- <el-input v-model="form.name" placeholder="请输入活动名称"/>-->
<!-- </div>-->
<!-- </el-form-item>-->
<!-- <el-form-item label="满足金额" prop="moneyType">-->
<!-- <el-select v-model="form.moneyType" placeholder="请选择满足金额">-->
<!-- <el-option-->
<!-- v-for="dict in moneyList"-->
<!-- :key="dict.id.toString()"-->
<!-- :label="dict.name"-->
<!-- :value="dict.id">-->
<!-- </el-option>-->
<!-- </el-select>-->
<!-- </el-form-item>-->
<!-- <el-form-item label="满足金额" prop="participationConditionMoney">-->
<!-- <el-input-number :min="0.01" v-model="form.participationConditionMoney" placeholder="请输入满足金额"/>-->
<!-- </el-form-item>-->
<!-- <el-form-item label="可用油品" prop="adaptOil">-->
<!-- <el-checkbox-group v-model="form.adaptOil">-->
<!-- <el-checkbox v-for="(item,index) in oillist" :label="item.id" :key="index">-->
<!-- {{ item.oilType }}{{ item.oilName }}-->
<!-- </el-checkbox>-->
<!-- </el-checkbox-group>-->
<!-- </el-form-item>-->
<!-- <el-form-item label="适用用户" prop="adaptUserType">-->
<!-- <el-radio-group v-model="form.adaptUserType">-->
<!-- <el-radio label="1">全部会员</el-radio>-->
<!-- <el-radio label="2">等级会员</el-radio>-->
<!-- </el-radio-group>-->
<!-- </el-form-item>-->
<!-- <el-form-item label="会员等级" prop="dieselUserLevel" v-if="form.adaptUserType == 2">-->
<!-- <el-select v-model="form.dieselUserLevel" multiple clearable placeholder="会员等级">-->
<!-- <el-option :label="item.name" :value="item.id.toString()" v-for="(item,index) in userGradeList"-->
<!-- :key="index"></el-option>-->
<!-- </el-select>-->
<!-- </el-form-item>-->
<!-- <el-form-item label="赠送类型" prop="activeGift">-->
<!-- <el-checkbox-group v-model="form.activeGift">-->
<!-- <el-checkbox label="1">赠送优惠券</el-checkbox>-->
<!-- <el-checkbox label="2">赠送兑换券</el-checkbox>-->
<!-- </el-checkbox-group>-->
<!-- </el-form-item>-->
<!-- &lt;!&ndash; 选择优惠券&ndash;&gt;-->
<!-- <div class="xh-box" v-if="form.activeGift && form.activeGift.indexOf('1')>-1 ">-->
<!-- <div class="box-bt">-->
<!-- <div>选择优惠券</div>-->
<!-- <el-button type="primary" icon="el-icon-plus" @click="getlistFavorable()">新增</el-button>-->
<!-- </div>-->
<!-- <div style="margin: 10px 0px">-->
<!-- <el-table-->
<!-- :data="tableData1"-->
<!-- border-->
<!-- style="width: 100%">-->
<!-- <el-table-column-->
<!-- prop="giftCardName"-->
<!-- label="卡券名称"-->
<!-- width="0">-->
<!-- </el-table-column>-->
<!-- <el-table-column-->
<!-- prop="giftCardType"-->
<!-- label="券类型"-->
<!-- width="80">-->
<!-- <template slot-scope="scope">-->
<!-- <span v-if="scope.row.giftCardType == 0">满减券</span>-->
<!-- <span v-if="scope.row.giftCardType == 1">折扣券</span>-->
<!-- </template>-->
<!-- </el-table-column>-->
<!-- <el-table-column-->
<!-- prop="date"-->
<!-- label="券详情"-->
<!-- width="80">-->
<!-- <template slot-scope="scope">-->
<!-- <span>{{ scope.row.giftCardDetail }}</span>-->
<!-- </template>-->
<!-- </el-table-column>-->
<!-- <el-table-column-->
<!-- prop="instruction"-->
<!-- label="使用说明"-->
<!-- width="0">-->
<!-- </el-table-column>-->
<!-- <el-table-column-->
<!-- prop="date"-->
<!-- label="有效期(天)">-->
<!-- <template slot-scope="scope">-->
<!-- <span v-if="scope.row.timeType == 0"> {{ scope.row.validityZero }} </span>-->
<!-- <span v-if="scope.row.timeType == 1"> {{ scope.row.validityOne }} </span>-->
<!-- <span v-if="scope.row.timeType == 2"> {{ scope.row.validityTwo }} </span>-->
<!-- </template>-->
<!-- </el-table-column>-->
<!-- <el-table-column-->
<!-- prop="date"-->
<!-- label="数量"-->
<!-- width="240">-->
<!-- <template slot-scope="scope">-->
<!-- <el-input-number v-model="scope.row.giftCardTotal" controls-position="right" :min="1"-->
<!-- :max="9999"></el-input-number>-->
<!-- </template>-->
<!-- </el-table-column>-->
<!-- <el-table-column-->
<!-- prop="address"-->
<!-- label="操作">-->
<!-- <template slot-scope="scope">-->
<!-- <el-button-->
<!-- size="mini"-->
<!-- type="text"-->
<!-- @click="deletedata(scope.row)"-->
<!-- >删除-->
<!-- </el-button>-->
<!-- </template>-->
<!-- </el-table-column>-->
<!-- </el-table>-->
<!-- </div>-->
<!-- </div>-->
<!-- &lt;!&ndash; 选择兑换券&ndash;&gt;-->
<!-- <div class="xh-box" v-if="form.activeGift && form.activeGift.indexOf('2')>-1 ">-->
<!-- <div class="box-bt">-->
<!-- <div>选择兑换券</div>-->
<!-- <el-button type="primary" icon="el-icon-plus" @click="getlistExchange()">新增</el-button>-->
<!-- </div>-->
<!-- <div style="margin: 10px 0px">-->
<!-- <el-table-->
<!-- :data="tableDatas"-->
<!-- border-->
<!-- style="width: 100%">-->
<!-- <el-table-column-->
<!-- prop="giftCardName"-->
<!-- label="卡券名称"-->
<!-- width="80">-->
<!-- </el-table-column>-->
<!-- <el-table-column-->
<!-- prop="date"-->
<!-- label="券类型"-->
<!-- width="80">-->
<!-- <template slot-scope="scope">-->
<!-- <span v-if="scope.row.giftCardType == 0">商品券</span>-->
<!-- <span v-if="scope.row.giftCardType == 1">洗车券</span>-->
<!-- </template>-->
<!-- </el-table-column>-->
<!-- <el-table-column-->
<!-- prop="date"-->
<!-- label="券详情"-->
<!-- width="80">-->
<!-- <template slot-scope="scope">-->
<!-- <span>{{ scope.row.giftCardDetail }}</span>-->
<!-- </template>-->
<!-- </el-table-column>-->
<!-- <el-table-column-->
<!-- prop="instruction"-->
<!-- label="使用说明"-->
<!-- width="80">-->
<!-- </el-table-column>-->
<!-- <el-table-column-->
<!-- prop="date"-->
<!-- label="有效期(天)">-->
<!-- <template slot-scope="scope">-->
<!-- <span> {{ scope.row.giftCardTime }} </span>-->
<!-- </template>-->
<!-- </el-table-column>-->
<!-- <el-table-column-->
<!-- prop="date"-->
<!-- label="数量"-->
<!-- width="240">-->
<!-- <template slot-scope="scope">-->
<!-- <el-input-number v-model="scope.row.giftCardTotal" controls-position="right" :min="1"-->
<!-- :max="9999"></el-input-number>-->
<!-- </template>-->
<!-- </el-table-column>-->
<!-- <el-table-column-->
<!-- prop="address"-->
<!-- label="操作"-->
<!-- >-->
<!-- <template slot-scope="scope">-->
<!-- <el-button-->
<!-- size="mini"-->
<!-- type="text"-->
<!-- @click="deletedhdata(scope.row)"-->
<!-- >删除-->
<!-- </el-button>-->
<!-- </template>-->
<!-- </el-table-column>-->
<!-- </el-table>-->
<!-- </div>-->
<!-- </div>-->
<!-- &lt;!&ndash; 选择实物&ndash;&gt;-->
<!-- <div class="xh-box" v-if="form.activeGift && form.activeGift.indexOf('4')>-1 ">-->
<!-- <div class="box-bt">-->
<!-- <div>选择实物</div>-->
<!-- <el-button type="primary" icon="el-icon-plus" @click="getlistLJGoods()">新增</el-button>-->
<!-- </div>-->
<!-- <div style="margin: 10px 0px">-->
<!-- <el-table-->
<!-- :data="form.shiwudata"-->
<!-- border-->
<!-- style="width: 100%">-->
<!-- <el-table-column-->
<!-- prop="goodsId"-->
<!-- label="实物名称"-->
<!-- width="240">-->
<!-- <template slot-scope="scope">-->
<!-- <span>{{ scope.row.goodsName }}</span>-->
<!-- </template>-->
<!-- </el-table-column>-->
<!-- <el-table-column-->
<!-- prop="count"-->
<!-- label="数量"-->
<!-- width="240">-->
<!-- <template slot-scope="scope">-->
<!-- <el-input-number v-model="scope.row.goodsTotal" controls-position="right" :min="1"-->
<!-- :max="9999"></el-input-number>-->
<!-- </template>-->
<!-- </el-table-column>-->
<!-- <el-table-column-->
<!-- prop="address"-->
<!-- label="操作"-->
<!-- >-->
<!-- <template slot-scope="scope">-->
<!-- <el-button-->
<!-- size="mini"-->
<!-- type="text"-->
<!-- @click="deleteswdata(scope.row)"-->
<!-- >删除-->
<!-- </el-button>-->
<!-- </template>-->
<!-- </el-table-column>-->
<!-- </el-table>-->
<!-- </div>-->
<!-- </div>-->
<!-- <el-row :gutter="20">-->
<!-- <el-col :span="12">-->
<!-- <el-form-item label="活动开始时间" prop="activeStartTime">-->
<!-- <el-date-picker clearable-->
<!-- v-model="form.activeStartTime"-->
<!-- type="datetime"-->
<!-- value-format="yyyy-MM-dd HH:mm:ss"-->
<!-- placeholder="请选择活动开始时间">-->
<!-- </el-date-picker>-->
<!-- </el-form-item>-->
<!-- </el-col>-->
<!-- <el-col :span="12">-->
<!-- <el-form-item label="活动结束时间" prop="activeEndTime">-->
<!-- <el-date-picker clearable-->
<!-- v-model="form.activeEndTime"-->
<!-- type="datetime"-->
<!-- value-format="yyyy-MM-dd HH:mm:ss"-->
<!-- placeholder="请选择活动结束时间">-->
<!-- </el-date-picker>-->
<!-- </el-form-item>-->
<!-- </el-col>-->
<!-- </el-row>-->
<!-- <el-form-item label="参与次数类别" prop="participationAcount">-->
<!-- <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 label="限制次数" prop="limitAcount" v-if="form.participationAcount == 1">-->
<!-- <el-input v-model="form.limitAcount" placeholder="请输入限制次数"/>-->
<!-- </el-form-item>-->
<!-- <el-form-item label="赠送积分" prop="points">-->
<!-- <el-input-number v-model="form.points" controls-position="right" :min="1" :max="999999"></el-input-number>-->
<!-- </el-form-item>-->
<!-- </el-form>-->
<!-- <div slot="footer" class="dialog-footer">-->
<!-- <el-button type="primary" @click="submitForm"> </el-button>-->
<!-- &lt;!&ndash; 最终提交&ndash;&gt;-->
<!-- <el-button @click="cancel"> </el-button>-->
<!-- </div>-->
<!-- </el-dialog>-->
<!-- <el-dialog title="详情统计" :visible.sync="opendetails" width="45%" append-to-body>-->
<!-- <div style="display: flex;justify-content: space-between;width: 100%;">-->
<!-- <div class="x-box">-->
<!-- <div>优惠券数量统计</div>-->
<!-- <div>总数量: {{ statisticsyou.count || 0 }}</div>-->
<!-- <div>已使用数量: {{ statisticsyou.countEd || 0 }}</div>-->
<!-- <div>未使用数量: {{ statisticsyou.countLd || 0 }}</div>-->
<!-- </div>-->
<!-- <div class="x-box">-->
<!-- <div>兑换券数量统计</div>-->
<!-- <div>总数量: {{ statisticsyou.counts || 0 }}</div>-->
<!-- <div>已使用数量: {{ statisticsyou.countEds || 0 }}</div>-->
<!-- <div>未使用数量: {{ statisticsyou.countLds || 0 }}</div>-->
<!-- </div>-->
<!-- </div>-->
<!-- <el-table-->
<!-- :data="looklist"-->
<!-- style="width: 100%">-->
<!-- <el-table-column-->
<!-- prop="name"-->
<!-- label="昵称"-->
<!-- >-->
<!-- </el-table-column>-->
<!-- <el-table-column-->
<!-- prop="mobile"-->
<!-- label="联系方式"-->
<!-- >-->
<!-- </el-table-column>-->
<!-- <el-table-column-->
<!-- prop="createTime"-->
<!-- label="领取日期"-->
<!-- >-->
<!-- </el-table-column>-->
<!-- <el-table-column-->
<!-- prop="exchangeFrom"-->
<!-- label="获取方式"-->
<!-- >-->
<!-- </el-table-column>-->
<!-- </el-table>-->
<!-- </el-dialog>-->
<!-- &lt;!&ndash; 详情列表&ndash;&gt;-->
<!-- <el-dialog title="优惠券列表" :visible.sync="dialogTableVisible">-->
<!-- <div style="display: flex;align-items: center; margin-bottom: 20px ">-->
<!-- <el-input v-model="youhuiquan.name" placeholder="优惠券名称"></el-input>-->
<!-- <el-button type="primary" icon="el-icon-search" @click="getlistFavorable">搜索</el-button>-->
<!-- </div>-->
<!-- <el-table-->
<!-- :data="tableData"-->
<!-- border-->
<!-- style="width: 100%">-->
<!-- <el-table-column-->
<!-- prop="name"-->
<!-- label="卡券名称"-->
<!-- >-->
<!-- </el-table-column>-->
<!-- <el-table-column-->
<!-- prop="date"-->
<!-- label="券类型"-->
<!-- >-->
<!-- <template slot-scope="scope">-->
<!-- <span v-if="scope.row.discountType == 0">满减券</span>-->
<!-- <span v-if="scope.row.discountType == 1">折扣券</span>-->
<!-- </template>-->
<!-- </el-table-column>-->
<!-- <el-table-column-->
<!-- prop="date"-->
<!-- label="券详情"-->
<!-- >-->
<!-- <template slot-scope="scope">-->
<!-- <span>{{ scope.row.cardDetail }}</span>-->
<!-- </template>-->
<!-- </el-table-column>-->
<!-- <el-table-column-->
<!-- prop="date"-->
<!-- label="有效期(天)"-->
<!-- >-->
<!-- <template slot-scope="scope">-->
<!-- <span v-if="scope.row.timeType == 0">{{ scope.row.validityZero }} </span>-->
<!-- <span v-if="scope.row.timeType == 1">{{ scope.row.validityOne }} </span>-->
<!-- <span v-if="scope.row.timeType == 2">{{ scope.row.validityTwo }} </span>-->
<!-- </template>-->
<!-- </el-table-column>-->
<!-- <el-table-column-->
<!-- prop="address"-->
<!-- label="操作">-->
<!-- <template slot-scope="scope">-->
<!-- <el-button-->
<!-- size="mini"-->
<!-- type="text"-->
<!-- @click="chosedata(scope.row)"-->
<!-- >选择-->
<!-- </el-button>-->
<!-- </template>-->
<!-- </el-table-column>-->
<!-- </el-table>-->
<!-- <div>-->
<!-- <pagination-->
<!-- v-show="ytotal>0"-->
<!-- :total="ytotal"-->
<!-- :page.sync="youhuiquan.pageNum"-->
<!-- :limit.sync="youhuiquan.pageSize"-->
<!-- @pagination="getlistFavorable"-->
<!-- />-->
<!-- </div>-->
<!-- </el-dialog>-->
<!-- &lt;!&ndash; 兑换券列表&ndash;&gt;-->
<!-- <el-dialog title="兑换券列表" :visible.sync="dialogTableVisibledh">-->
<!-- <div style="display: flex;align-items: center; margin-bottom: 20px ">-->
<!-- <el-input v-model="duihuanquan.name" placeholder="兑换券名称"></el-input>-->
<!-- <el-button type="primary" icon="el-icon-search" @click="getlistExchange">搜索</el-button>-->
<!-- </div>-->
<!-- <el-table-->
<!-- :data="tableDatadh"-->
<!-- border-->
<!-- style="width: 100%">-->
<!-- <el-table-column-->
<!-- prop="name"-->
<!-- label="卡券名称"-->
<!-- >-->
<!-- </el-table-column>-->
<!-- <el-table-column-->
<!-- prop="date"-->
<!-- label="券类型"-->
<!-- >-->
<!-- <template slot-scope="scope">-->
<!-- <span v-if="scope.row.type == 0">商品券</span>-->
<!-- <span v-if="scope.row.type == 1">洗车券</span>-->
<!-- </template>-->
<!-- </el-table-column>-->
<!-- <el-table-column-->
<!-- prop="date"-->
<!-- label="券详情"-->
<!-- width="80">-->
<!-- <template slot-scope="scope">-->
<!-- <span>{{ scope.row.cardDetail }}</span>-->
<!-- </template>-->
<!-- </el-table-column>-->
<!-- <el-table-column-->
<!-- prop="date"-->
<!-- label="使用说明"-->
<!-- >-->
<!-- <template slot-scope="scope">-->
<!-- <span>{{ scope.row.useInstructions }}</span>-->
<!-- </template>-->
<!-- </el-table-column>-->
<!-- <el-table-column-->
<!-- prop="date"-->
<!-- label="有效期(天)"-->
<!-- >-->
<!-- <template slot-scope="scope">-->
<!-- <span>{{ scope.row.validity }} </span>-->
<!-- </template>-->
<!-- </el-table-column>-->
<!-- <el-table-column-->
<!-- prop="address"-->
<!-- label="操作">-->
<!-- <template slot-scope="scope">-->
<!-- <el-button-->
<!-- size="mini"-->
<!-- type="text"-->
<!-- @click="Favorabledata(scope.row)"-->
<!-- >选择-->
<!-- </el-button>-->
<!-- </template>-->
<!-- </el-table-column>-->
<!-- </el-table>-->
<!-- <div>-->
<!-- <pagination-->
<!-- v-show="dtotal>0"-->
<!-- :total="dtotal"-->
<!-- :page.sync="duihuanquan.pageNum"-->
<!-- :limit.sync="duihuanquan.pageSize"-->
<!-- @pagination="getlistExchange"-->
<!-- />-->
<!-- </div>-->
<!-- </el-dialog>-->
<!-- &lt;!&ndash; 实物列表&ndash;&gt;-->
<!-- <el-dialog title="实物列表" :visible.sync="dialogTableVisiblesw">-->
<!-- <el-form ref="form" :model="form" :rules="rules" label-width="110px">-->
<!-- <el-form-item label="选择商品">-->
<!-- <el-select v-model="shopdata.goodsId" placeholder="请选择商品" @change="swchange">-->
<!-- <el-option :label="item.name" :value="item" v-for="(item,index) in tableDatasw"-->
<!-- :key="item.id"></el-option>-->
<!-- </el-select>-->
<!-- </el-form-item>-->
<!-- <el-form-item label="商品数量" prop="nmb">-->
<!-- <el-input-number v-model="shopdata.count" controls-position="right" :min="1" :max="9999"></el-input-number>-->
<!-- </el-form-item>-->
<!-- <el-button-->
<!-- type="primary"-->
<!-- @click="shwdata()"-->
<!-- >确定-->
<!-- </el-button>-->
<!-- </el-form>-->
<!-- </el-dialog>-->
</div>
<div class="cot-box">
<el-form :model="ruleForm" :rules="rules" ref="ruleForm" label-width="140px">
@ -1093,7 +434,7 @@ export default {
// this.getoilName()
this.listUserGrade()
this.getInfo()
// this.getInfo()
this.getCardCoupon()
this.getUserLabelList()
},
@ -1263,16 +604,27 @@ export default {
if (this.ruleForm.paymentType) this.ruleForm.paymentType = this.ruleForm.paymentType.toString()
//
if (this.ruleForm.activeGift) this.ruleForm.activeGift = this.ruleForm.activeGift.toString()
if (this.pointList) {
this.ruleForm.pointList = this.pointList
}
if (this.growthValueList) {
this.ruleForm.growthValueList = this.growthValueList
}
if (this.couponList) {
this.ruleForm.couponList = this.couponList
}
if (this.ruleForm.id) {
editActivity(this.ruleForm).then(response => {
this.$modal.msgSuccess("修改成功");
this.getInfo();
// this.getInfo();
this.$router.push({path:"/EventMarketing/center/index",query:{id:'5'}})
});
} else {
addActivity(this.ruleForm).then(response => {
this.$modal.msgSuccess("新增成功");
this.getInfo();
// this.getInfo();
this.$router.push({path:"/EventMarketing/center/index",query:{id:'5'}})
});
}
}
@ -1280,7 +632,8 @@ export default {
},
resetForm(formName) {
this.$refs[formName].resetFields();
this.getInfo()
// this.getInfo()
this.$router.push({path:"/EventMarketing/center/index"})
},
indexMethod(index) {
return index * 2;

View File

@ -1,546 +1,7 @@
<template>
<div class="app-container">
<div>
<!-- <el-card style="margin-bottom: 20px">-->
<!-- <el-breadcrumb separator="/" style="margin-bottom: 35px">-->
<!-- <el-breadcrumb-item :to="{ path: '/' }">首页</el-breadcrumb-item>-->
<!-- <el-breadcrumb-item :to="{ path: '/EventMarketing/center/index' }">活动中心</el-breadcrumb-item>-->
<!-- <el-breadcrumb-item>新人有礼</el-breadcrumb-item>-->
<!-- </el-breadcrumb>-->
<!-- <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch"-->
<!-- label-width="100px">-->
<!-- <el-form-item label="" prop="name">-->
<!-- <div style="width: 220px">-->
<!-- <el-input-->
<!-- v-model="queryParams.name"-->
<!-- placeholder="活动名称"-->
<!-- clearable-->
<!-- @keyup.enter.native="handleQuery"-->
<!-- />-->
<!-- </div>-->
<!-- </el-form-item>-->
<!-- <el-form-item label="" prop="isonline">-->
<!-- <el-select v-model="queryParams.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 style="float: right">-->
<!-- <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>-->
<!-- <el-button icon="el-icon-refresh" @click="resetQuery">重置</el-button>-->
<!-- </el-form-item>-->
<!-- </el-form>-->
<!-- </el-card>-->
<!-- <el-dialog :title="title" :visible.sync="open" width="55%" append-to-body>-->
<!-- <el-form ref="form" :model="form" :rules="rules" :label-position="labelPosition" label-width="110px">-->
<!-- <el-form-item label="活动名称" prop="name">-->
<!-- <div style="width: 220px">-->
<!-- <el-input v-model="form.name" placeholder="请输入活动名称"/>-->
<!-- </div>-->
<!-- </el-form-item>-->
<!-- <el-row :gutter="20">-->
<!-- <el-col :span="12">-->
<!-- <el-form-item label="活动开始时间" prop="activeStartTime">-->
<!-- <el-date-picker clearable-->
<!-- v-model="form.activeStartTime"-->
<!-- type="datetime"-->
<!-- value-format="yyyy-MM-dd HH:mm:ss"-->
<!-- placeholder="请选择活动开始时间">-->
<!-- </el-date-picker>-->
<!-- </el-form-item>-->
<!-- </el-col>-->
<!-- <el-col :span="12">-->
<!-- <el-form-item label="活动结束时间" prop="activeEndTime">-->
<!-- <el-date-picker clearable-->
<!-- v-model="form.activeEndTime"-->
<!-- type="datetime"-->
<!-- value-format="yyyy-MM-dd HH:mm:ss"-->
<!-- placeholder="请选择活动结束时间">-->
<!-- </el-date-picker>-->
<!-- </el-form-item>-->
<!-- </el-col>-->
<!-- </el-row>-->
<!-- <el-form-item label="有礼奖励" prop="courtesyReward">-->
<!-- <el-checkbox-group v-model="form.courtesyReward">-->
<!-- <el-checkbox label="1">赠送优惠券</el-checkbox>-->
<!-- <el-checkbox label="2">赠送兑换券</el-checkbox>-->
<!-- </el-checkbox-group>-->
<!-- </el-form-item>-->
<!-- &lt;!&ndash; 选择优惠券&ndash;&gt;-->
<!-- <div class="xh-box" v-if="form.courtesyReward && form.courtesyReward.indexOf('1')>-1 ">-->
<!-- <div class="box-bt">-->
<!-- <div>赠送卡券</div>-->
<!-- <el-button type="primary" icon="el-icon-plus" @click="getlistFavorable()">新增</el-button>-->
<!-- </div>-->
<!-- <div style="margin: 10px 0px">-->
<!-- <el-table-->
<!-- :data="form.tableDatas"-->
<!-- border-->
<!-- style="width: 100%">-->
<!-- <el-table-column-->
<!-- prop="giftCardName"-->
<!-- label="卡券名称"-->
<!-- >-->
<!-- </el-table-column>-->
<!-- <el-table-column-->
<!-- prop="giftCardType"-->
<!-- label="券类型"-->
<!-- >-->
<!-- <template slot-scope="scope">-->
<!-- <span v-if="scope.row.giftCardType == 0">满减券</span>-->
<!-- <span v-if="scope.row.giftCardType == 1">折扣券</span>-->
<!-- </template>-->
<!-- </el-table-column>-->
<!-- <el-table-column-->
<!-- prop="date"-->
<!-- label="券详情"-->
<!-- >-->
<!-- <template slot-scope="scope">-->
<!-- <span>{{ scope.row.giftCardDetail }}</span>-->
<!-- </template>-->
<!-- </el-table-column>-->
<!-- <el-table-column-->
<!-- prop="instruction"-->
<!-- label="使用说明"-->
<!-- >-->
<!-- </el-table-column>-->
<!-- <el-table-column-->
<!-- prop="date"-->
<!-- label="有效期(天)"-->
<!-- >-->
<!-- <template slot-scope="scope">-->
<!-- <span v-if="scope.row.timeType == 0"> {{ scope.row.validityZero }} </span>-->
<!-- <span v-if="scope.row.timeType == 1"> {{ scope.row.validityOne }} </span>-->
<!-- <span v-if="scope.row.timeType == 2"> {{ scope.row.validityTwo }} </span>-->
<!-- </template>-->
<!-- </el-table-column>-->
<!-- <el-table-column-->
<!-- prop="date"-->
<!-- label="数量" width="130"-->
<!-- >-->
<!-- <template slot-scope="scope">-->
<!-- <el-input-number style="width: 110px" v-model="scope.row.giftCardTotal" controls-position="right"-->
<!-- :min="1" :max="9999"></el-input-number>-->
<!-- </template>-->
<!-- </el-table-column>-->
<!-- <el-table-column-->
<!-- prop="address"-->
<!-- label="操作">-->
<!-- <template slot-scope="scope">-->
<!-- <el-button-->
<!-- size="mini"-->
<!-- type="text"-->
<!-- @click="deletedata(scope.row)"-->
<!-- >删除-->
<!-- </el-button>-->
<!-- </template>-->
<!-- </el-table-column>-->
<!-- </el-table>-->
<!-- </div>-->
<!-- </div>-->
<!-- &lt;!&ndash; 选择兑换券&ndash;&gt;-->
<!-- <div class="xh-box" v-if="form.courtesyReward && form.courtesyReward.indexOf('2')>-1 ">-->
<!-- <div class="box-bt">-->
<!-- <div>选择兑换券</div>-->
<!-- <el-button type="primary" icon="el-icon-plus" @click="getlistExchange()">新增</el-button>-->
<!-- </div>-->
<!-- <div style="margin: 10px 0px">-->
<!-- <el-table-->
<!-- :data="tableDatas"-->
<!-- border-->
<!-- style="width: 100%">-->
<!-- <el-table-column-->
<!-- prop="giftCardName"-->
<!-- label="卡券名称"-->
<!-- >-->
<!-- </el-table-column>-->
<!-- <el-table-column-->
<!-- prop="date"-->
<!-- label="券类型"-->
<!-- >-->
<!-- <template slot-scope="scope">-->
<!-- <span v-if="scope.row.giftCardType == 0">商品券</span>-->
<!-- <span v-if="scope.row.giftCardType == 1">洗车券</span>-->
<!-- </template>-->
<!-- </el-table-column>-->
<!-- <el-table-column-->
<!-- prop="date"-->
<!-- label="券详情"-->
<!-- >-->
<!-- <template slot-scope="scope">-->
<!-- <span>{{ scope.row.giftCardDetail }}</span>-->
<!-- </template>-->
<!-- </el-table-column>-->
<!-- <el-table-column-->
<!-- prop="instruction"-->
<!-- label="使用说明"-->
<!-- >-->
<!-- </el-table-column>-->
<!-- <el-table-column-->
<!-- prop="date"-->
<!-- label="有效期(天)"-->
<!-- >-->
<!-- <template slot-scope="scope">-->
<!-- <span> {{ scope.row.giftCardTime }} </span>-->
<!-- </template>-->
<!-- </el-table-column>-->
<!-- <el-table-column-->
<!-- prop="date"-->
<!-- label="数量" width="130"-->
<!-- >-->
<!-- <template slot-scope="scope">-->
<!-- <el-input-number style="width: 110px" v-model="scope.row.giftCardTotal" size="small"-->
<!-- controls-position="right" :min="1" :max="9999"></el-input-number>-->
<!-- </template>-->
<!-- </el-table-column>-->
<!-- <el-table-column-->
<!-- prop="address"-->
<!-- label="操作"-->
<!-- >-->
<!-- <template slot-scope="scope">-->
<!-- <el-button-->
<!-- size="mini"-->
<!-- type="text"-->
<!-- @click="deletedhdata(scope.row)"-->
<!-- >删除-->
<!-- </el-button>-->
<!-- </template>-->
<!-- </el-table-column>-->
<!-- </el-table>-->
<!-- </div>-->
<!-- </div>-->
<!-- <el-form-item label="赠送积分" prop="points">-->
<!-- <el-input-number v-model="form.points" controls-position="right" :min="1" :max="99999"></el-input-number>-->
<!-- </el-form-item>-->
<!-- <el-form-item label="赠送成长值" prop="growthValue">-->
<!-- <el-input-number v-model="form.growthValue" controls-position="right" :min="1"-->
<!-- :max="9999999"></el-input-number>-->
<!-- </el-form-item>-->
<!-- <el-form-item label="自定义规则" prop="remark">-->
<!-- <div style="width: 200px">-->
<!-- <el-input v-model="form.remark" placeholder="请输入自定义规则"/>-->
<!-- </div>-->
<!-- </el-form-item>-->
<!-- </el-form>-->
<!-- <div>-->
<!-- <el-button type="primary" @click="submitForm">保存</el-button>-->
<!-- </div>-->
<!-- </el-dialog>-->
<!-- <el-card>-->
<!-- <el-row :gutter="10" class="mb8">-->
<!-- <el-col :span="1.5">-->
<!-- <el-button-->
<!-- type="primary"-->
<!-- icon="el-icon-plus"-->
<!-- size="mini"-->
<!-- @click="addDatas"-->
<!-- >新增-->
<!-- </el-button>-->
<!-- </el-col>-->
<!-- </el-row>-->
<!-- <el-table v-loading="loading" :data="activeFullminusList" @selection-change="handleSelectionChange">-->
<!-- <el-table-column-->
<!-- type="index"-->
<!-- align="center"-->
<!-- label="序号"-->
<!-- >-->
<!-- </el-table-column>-->
<!-- <el-table-column label="活动名称" align="center" prop="name"/>-->
<!-- <el-table-column label="活动时间" align="center" prop="adaptUserType">-->
<!-- <template slot-scope="scope">-->
<!-- <span>{{ scope.row.activeStartTime || 0 }}-{{ scope.row.activeEndTime || 0 }}</span>-->
<!-- </template>-->
<!-- </el-table-column>-->
<!-- <el-table-column label="活动状态 " align="center" prop="status">-->
<!-- <template slot-scope="scope">-->
<!-- <span style="cursor: pointer;" v-if="scope.row.status == 0"> <el-tag>进行中</el-tag> </span>-->
<!-- <span style="cursor: pointer;" v-if="scope.row.status == 1"> <el-tag-->
<!-- type="danger">待生效</el-tag> </span>-->
<!-- <span style="cursor: pointer;" v-if="scope.row.status == 2"> <el-tag type="danger">下线</el-tag> </span>-->
<!-- </template>-->
<!-- </el-table-column>-->
<!-- <el-table-column label="赠送积分" align="center" prop="adaptUserType">-->
<!-- <template slot-scope="scope">-->
<!-- <span>{{ scope.row.points || 0 }}</span>-->
<!-- </template>-->
<!-- </el-table-column>-->
<!-- <el-table-column label="赠送成长值" align="center" prop="adaptUserType">-->
<!-- <template slot-scope="scope">-->
<!-- <span>{{ scope.row.growthValue || 0 }}</span>-->
<!-- </template>-->
<!-- </el-table-column>-->
<!-- <el-table-column label="活动更新时间" align="center" prop="updateTime">-->
<!-- <template slot-scope="scope">-->
<!-- <span>{{ scope.row.updateTime || '暂无更新' }}</span>-->
<!-- </template>-->
<!-- </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"-->
<!-- icon="el-icon-edit"-->
<!-- @click="handleUpdate(scope.row)"-->
<!-- >修改-->
<!-- </el-button>-->
<!-- <el-button-->
<!-- size="mini"-->
<!-- type="text"-->
<!-- icon="el-icon-view"-->
<!-- @click="lookDetail(scope.row)"-->
<!-- >详情-->
<!-- </el-button>-->
<!-- <el-button-->
<!-- size="mini"-->
<!-- type="text"-->
<!-- icon="el-icon-sort-up"-->
<!-- @click="handleDeletexia(scope.row,0)"-->
<!-- v-if="scope.row.isonline == 1"-->
<!-- >上线-->
<!-- </el-button>-->
<!-- <el-button-->
<!-- size="mini"-->
<!-- type="text"-->
<!-- icon="el-icon-sort-up"-->
<!-- @click="handleDeletexia(scope.row,1)"-->
<!-- v-if="scope.row.isonline == 0"-->
<!-- >下线-->
<!-- </el-button>-->
<!-- <el-button-->
<!-- size="mini"-->
<!-- type="text"-->
<!-- icon="el-icon-delete"-->
<!-- @click="Deleteshan(scope.row)"-->
<!-- v-if="scope.row.isonline == 1"-->
<!-- >删除-->
<!-- </el-button>-->
<!-- </template>-->
<!-- </el-table-column>-->
<!-- </el-table>-->
<!-- <pagination-->
<!-- v-show="ztotal>0"-->
<!-- :total="ztotal"-->
<!-- :page.sync="queryParams.pageNum"-->
<!-- :limit.sync="queryParams.pageSize"-->
<!-- @pagination="getList"-->
<!-- />-->
<!-- </el-card>-->
<!-- &lt;!&ndash; 优惠券列表&ndash;&gt;-->
<!-- <el-dialog title="优惠券列表" :visible.sync="dialogTableVisible">-->
<!-- <div style="display: flex;align-items: center; margin-bottom: 20px ">-->
<!-- <el-input v-model="youhuiquan.name" placeholder="优惠券名称"></el-input>-->
<!-- <el-button type="primary" icon="el-icon-search" @click="getlistFavorable">搜索</el-button>-->
<!-- </div>-->
<!-- <el-table-->
<!-- :data="tableData"-->
<!-- border-->
<!-- style="width: 100%">-->
<!-- <el-table-column-->
<!-- prop="name"-->
<!-- label="卡券名称"-->
<!-- >-->
<!-- </el-table-column>-->
<!-- <el-table-column-->
<!-- prop="date"-->
<!-- label="券类型"-->
<!-- >-->
<!-- <template slot-scope="scope">-->
<!-- <span v-if="scope.row.discountType == 0">满减券</span>-->
<!-- <span v-if="scope.row.discountType == 1">折扣券</span>-->
<!-- </template>-->
<!-- </el-table-column>-->
<!-- <el-table-column-->
<!-- prop="date"-->
<!-- label="券详情"-->
<!-- >-->
<!-- <template slot-scope="scope">-->
<!-- <span>{{ scope.row.cardDetail }}</span>-->
<!-- </template>-->
<!-- </el-table-column>-->
<!-- <el-table-column-->
<!-- prop="date"-->
<!-- label="有效期(天)"-->
<!-- width="180">-->
<!-- <template slot-scope="scope">-->
<!-- <span v-if="scope.row.timeType == 0">{{ scope.row.validityZero }} </span>-->
<!-- <span v-if="scope.row.timeType == 1">{{ scope.row.validityOne }} </span>-->
<!-- <span v-if="scope.row.timeType == 2">{{ scope.row.validityTwo }} </span>-->
<!-- </template>-->
<!-- </el-table-column>-->
<!-- <el-table-column-->
<!-- prop="address"-->
<!-- label="操作">-->
<!-- <template slot-scope="scope">-->
<!-- <el-button-->
<!-- size="mini"-->
<!-- type="text"-->
<!-- @click="chosedata(scope.row)"-->
<!-- >选择-->
<!-- </el-button>-->
<!-- </template>-->
<!-- </el-table-column>-->
<!-- </el-table>-->
<!-- <div>-->
<!-- <pagination-->
<!-- v-show="ytotal>0"-->
<!-- :total="ytotal"-->
<!-- :page.sync="youhuiquan.pageNum"-->
<!-- :limit.sync="youhuiquan.pageSize"-->
<!-- @pagination="getlistFavorable"-->
<!-- />-->
<!-- </div>-->
<!-- </el-dialog>-->
<!-- &lt;!&ndash; 兑换券列表&ndash;&gt;-->
<!-- <el-dialog title="兑换券列表" :visible.sync="dialogTableVisibledh">-->
<!-- <div style="display: flex;align-items: center; margin-bottom: 20px ">-->
<!-- <el-input v-model="duihuanquan.name" placeholder="兑换券名称"></el-input>-->
<!-- <el-button type="primary" icon="el-icon-search" @click="getlistExchange">搜索</el-button>-->
<!-- </div>-->
<!-- <el-table-->
<!-- :data="tableDatadh"-->
<!-- border-->
<!-- style="width: 100%">-->
<!-- <el-table-column-->
<!-- prop="name"-->
<!-- label="卡券名称"-->
<!-- >-->
<!-- </el-table-column>-->
<!-- <el-table-column-->
<!-- prop="date"-->
<!-- label="券类型"-->
<!-- >-->
<!-- <template slot-scope="scope">-->
<!-- <span v-if="scope.row.type == 0">洗车券</span>-->
<!-- <span v-if="scope.row.type == 1">商品券</span>-->
<!-- </template>-->
<!-- </el-table-column>-->
<!-- <el-table-column-->
<!-- prop="date"-->
<!-- label="券详情"-->
<!-- width="80">-->
<!-- <template slot-scope="scope">-->
<!-- <span>{{ scope.row.cardDetail }}</span>-->
<!-- </template>-->
<!-- </el-table-column>-->
<!-- <el-table-column-->
<!-- prop="date"-->
<!-- label="使用说明"-->
<!-- >-->
<!-- <template slot-scope="scope">-->
<!-- <span>{{ scope.row.useInstructions }}</span>-->
<!-- </template>-->
<!-- </el-table-column>-->
<!-- <el-table-column-->
<!-- prop="date"-->
<!-- label="有效期(天)"-->
<!-- >-->
<!-- <template slot-scope="scope">-->
<!-- <span>{{ scope.row.validity }} </span>-->
<!-- </template>-->
<!-- </el-table-column>-->
<!-- <el-table-column-->
<!-- prop="address"-->
<!-- label="操作">-->
<!-- <template slot-scope="scope">-->
<!-- <el-button-->
<!-- size="mini"-->
<!-- type="text"-->
<!-- @click="Favorabledata(scope.row)"-->
<!-- >选择-->
<!-- </el-button>-->
<!-- </template>-->
<!-- </el-table-column>-->
<!-- </el-table>-->
<!-- <div>-->
<!-- <pagination-->
<!-- v-show="dtotal>0"-->
<!-- :total="dtotal"-->
<!-- :page.sync="duihuanquan.pageNum"-->
<!-- :limit.sync="duihuanquan.pageSize"-->
<!-- @pagination="getlistExchange"-->
<!-- />-->
<!-- </div>-->
<!-- </el-dialog>-->
<!-- <el-dialog title="详情统计" :visible.sync="opendetails" width="45%" append-to-body>-->
<!-- <div style="display: flex;justify-content: space-between;width: 100%;">-->
<!-- <div class="x-box">-->
<!-- <div>优惠券数量统计</div>-->
<!-- <div>总数量: {{ statisticsyou.count || 0 }}</div>-->
<!-- <div>已使用数量: {{ statisticsyou.countEd || 0 }}</div>-->
<!-- <div>未使用数量: {{ statisticsyou.countLd || 0 }}</div>-->
<!-- </div>-->
<!-- <div class="x-box">-->
<!-- <div>兑换券数量统计</div>-->
<!-- <div>总数量: {{ statisticsyou.counts || 0 }}</div>-->
<!-- <div>已使用数量: {{ statisticsyou.countEds || 0 }}</div>-->
<!-- <div>未使用数量: {{ statisticsyou.countLds || 0 }}</div>-->
<!-- </div>-->
<!-- </div>-->
<!-- <el-table-->
<!-- :data="looklist"-->
<!-- style="width: 100%">-->
<!-- <el-table-column-->
<!-- prop="name"-->
<!-- label="昵称"-->
<!-- >-->
<!-- </el-table-column>-->
<!-- <el-table-column-->
<!-- prop="mobile"-->
<!-- label="联系方式"-->
<!-- >-->
<!-- </el-table-column>-->
<!-- <el-table-column-->
<!-- prop="createTime"-->
<!-- label="领取日期"-->
<!-- >-->
<!-- </el-table-column>-->
<!-- <el-table-column-->
<!-- prop="exchangeFrom"-->
<!-- label="获取方式"-->
<!-- >-->
<!-- </el-table-column>-->
<!-- </el-table>-->
<!-- </el-dialog>-->
<!-- <el-dialog-->
<!-- title="二维码"-->
<!-- v-loading="loadingdialog"-->
<!-- :visible.sync="centerDialogVisible"-->
<!-- width="350px"-->
<!-- center>-->
<!-- <div style="display: flex;align-items: center">-->
<!-- <div class="qr-code" id="qrCode" ref="qrCodeUrl"></div>-->
<!-- </div>-->
<!-- <span slot="footer" class="dialog-footer">-->
<!-- <el-button @click="centerDialogVisible = false"> </el-button>-->
<!-- <el-button type="primary" @click="centerDialogVisible = false"> </el-button>-->
<!-- </span>-->
<!-- </el-dialog>-->
</div>
<div class="cot-box">
<el-form :model="ruleForm" :rules="rules" ref="ruleForm" label-width="90px" style="width: 70%;margin: 0 auto">
<el-form :model="ruleForm" :rules="rules" ref="ruleForm" label-width="90px" style="margin: 0 auto;width: 70%">
<el-form-item label="活动名称" prop="name">
<el-input v-model="ruleForm.name"></el-input>
</el-form-item>
@ -597,18 +58,18 @@
</div>
</el-checkbox-group>
</div>
<div style="width: 70%">
<div style="width: 100%" >
<div style="display: flex;font-size: 14px;">
<div>赠送</div>
<el-input placeholder="请输入赠送的积分数量" style="width: 70%;margin: 0 10px"
<div style="width: 10%">赠送</div>
<el-input placeholder="请输入赠送的积分数量" style="width: 100%;"
v-model="ruleForm.points">
<template slot="append">积分</template>
</el-input>
</div>
<div style="display: flex;font-size: 14px;margin: 15px 0">
<div>赠送</div>
<el-input placeholder="请输入赠送的成长值数量" style="width: 70%;margin: 0 10px"
<div style="width: 10%">赠送</div>
<el-input placeholder="请输入赠送的成长值数量" style="width: 100%;"
v-model="ruleForm.growthValue">
<template slot="append">成长值</template>
</el-input>
@ -738,7 +199,10 @@ export default {
activeNewlywedsChildList: [],
},
ruleForm: {},
ruleForm: {
activeTimeType:0,
courtesyReward:[]
},
ifWrite: true,
tindex1: 0,
activityTimeTypeList: [
@ -768,8 +232,7 @@ export default {
};
},
created() {
// this.getList()
this.getInfo()
// this.getInfo()
this.getCardCoupon()
},
methods: {
@ -823,12 +286,18 @@ export default {
if (this.ruleForm.id) {
editActiveNewlyweds1(this.ruleForm).then(response => {
this.$modal.msgSuccess("修改成功");
this.getInfo()
// this.getInfo()
this.$router.push({path:"/EventMarketing/center/index",query:{id:'6'}})
});
}else {
insertActiveNewlyweds(this.ruleForm).then(response => {
this.$modal.msgSuccess("新增成功");
this.getInfo()
if (response.data==1){
this.$modal.msgSuccess("新增成功");
// this.getInfo()
this.$router.push({path:"/EventMarketing/center/index",query:{id:'6'}})
}else {
this.$modal.msgError("新增失败");
}
});
}
}
@ -837,7 +306,8 @@ export default {
resetForm(formName) {
this.$refs[formName].resetFields();
this.ifWrite = true
this.getInfo()
// this.getInfo()
this.$router.push({path:"/EventMarketing/center/index"})
},
/** 查询新人有礼活动列表 */
getList() {

File diff suppressed because it is too large Load Diff

View File

@ -413,7 +413,7 @@ export default {
},
created() {
//
this.getInfo()
// this.getInfo()
this.listUserGrade()
this.getUserLabelList()
this.getOilList()
@ -570,14 +570,16 @@ export default {
//
editActiveSubPrice(this.ruleForm).then(res => {
this.$message.success("修改成功")
this.getInfo()
// this.getInfo()
this.$router.push({path:"/EventMarketing/center/index",query:{id:'3'}})
})
} else {
//
addActiveSubPrice(this.ruleForm).then(res => {
if (res.data) {
this.$message.success("添加成功")
this.getInfo()
// this.getInfo()
this.$router.push({path:"/EventMarketing/center/index",query:{id:'3'}})
} else {
this.$message.error("添加失败")
}
@ -588,7 +590,8 @@ export default {
},
resetForm(formName) {
this.$refs[formName].resetFields();
this.getInfo()
// this.getInfo()
this.$router.push({path:"/EventMarketing/center/index"})
},
}
}

View File

@ -125,17 +125,10 @@ import {
delActiveNewlyweds,
addActiveNewlyweds,
updateActiveNewlyweds,
huiActiveNewlyweds,
editActiveNewlyweds, getInfoActiveNewlyweds, insertActiveNewlyweds, editActiveNewlyweds1
editActiveNewlyweds
} from "@/api/EventMarketing/activeNewlyweds";
import {getoilName, listExchange, listFavorable, looklook, looklooklook} from "@/api/EventMarketing/activeConsumption";
import QRCode from "qrcodejs2";
import {
delActiveFullminus,
editActiveFullminus,
getActiveFullminus,
updateActiveFullminus
} from "@/api/EventMarketing/activeFullminus";
import {listCardCoupon} from "@/api/EventMarketing/cardCoupon";
import {listUserGrade} from "@/api/staff/user/usergrade";
import {addActiveBirthday, editActiveBirthday, getActiveBirthday} from "@/api/EventMarketing/activeBirthday";
@ -216,7 +209,10 @@ export default {
activeNewlywedsChildList: [],
},
ruleForm: {},
ruleForm: {
activeTimeType:0,
courtesyReward:[]
},
ifWrite: true,
tindex1: 0,
activityTimeTypeList: [
@ -254,7 +250,7 @@ export default {
},
created() {
// this.getList()
this.getInfo()
// this.getInfo()
this.getCardCoupon()
this.listUserGrade()
},
@ -316,12 +312,14 @@ export default {
if (this.ruleForm.id) {
editActiveBirthday(this.ruleForm).then(response => {
this.$modal.msgSuccess("修改成功");
this.getInfo()
// this.getInfo()
this.$router.push({path: "/EventMarketing/center/index", query: {id: '4'}})
});
}else {
addActiveBirthday(this.ruleForm).then(response => {
this.$modal.msgSuccess("新增成功");
this.getInfo()
// this.getInfo()
this.$router.push({path: "/EventMarketing/center/index", query: {id: '4'}})
});
}
}
@ -330,7 +328,8 @@ export default {
resetForm(formName) {
this.$refs[formName].resetFields();
this.ifWrite = true
this.getInfo()
// this.getInfo()
this.$router.push({path: "/EventMarketing/center/index"})
},
/** 查询新人有礼活动列表 */
getList() {

View File

@ -1,52 +1,111 @@
<template>
<div class="a-container">
<!---->
<div class="top-tab">
当前位置营销中心--
<span @click="goActivity">营销活动</span>
--
{{ title }}
</div>
<!---->
<activeNewlyweds v-if="id == 1"></activeNewlyweds>
<activeConsumption v-if="id == 3" ></activeConsumption>
<activeConsumption v-if="id == 3"></activeConsumption>
<invite v-if="id == 4"></invite>
<birthday v-if="id == 5" ></birthday>
<separate v-if="id == 9" ></separate>
<birthday v-if="id == 5"></birthday>
<separate v-if="id == 9"></separate>
<TimeLimited v-if="id == 10"></TimeLimited>
<liJianMarketing v-if="id == 11"></liJianMarketing>
<userRecharge v-if="id == 6"></userRecharge>
<userConsume v-if="id == 7"></userConsume>
<popUp v-if="id == 8"></popUp>
<liJianMarketing v-if="id == 11"></liJianMarketing>
<userRecharge v-if="id == 6"></userRecharge>
<userConsume v-if="id == 7"></userConsume>
<popUp v-if="id == 8"></popUp>
</div>
</template>
<script>
//
import activeNewlyweds from '../../EventMarketing/activeNewlyweds/index.vue'
import activeNewlyweds from '../../EventMarketing/activeNewlyweds/index.vue'
//
import activeConsumption from '../../EventMarketing/activeConsumption/index.vue'
import activeConsumption from '../../EventMarketing/activeConsumption/index.vue'
//
import separate from './separate.vue'
import separate from './separate.vue'
//
import TimeLimited from './TimeLimited.vue'
import TimeLimited from './TimeLimited.vue'
//
import liJianMarketing from "@/views/EventMarketing/liJianMarketing/index.vue";
//
import invite from "./invite.vue";
//
import birthday from "./birthday.vue"
import birthday from "./birthday.vue"
//
import userRecharge from "@/views/EventMarketing/openCardGift/userRecharge.vue";
//
import userConsume from "@/views/EventMarketing/openCardGift/userConsume.vue";
//
import popUp from "@/views/EventMarketing/openCardGift/popUp.vue";
export default {
data() {
return {
id:''
id: '',
title: ""
}
},
created() {
this.id = this.$route.query.id
console.log(this.$route.query.id)
if (this.id == 1) {
if (this.$route.query.type && this.$route.query.type == "edit") {
this.title = "修改开卡有礼"
} else {
this.title = "新增开卡有礼"
}
} else if (this.id == 3) {
if (this.$route.query.type && this.$route.query.type == "edit") {
this.title = "修改消费有礼"
} else {
this.title = "新增消费有礼"
}
} else if (this.id == 4) {
if (this.$route.query.type && this.$route.query.type == "edit") {
this.title = "修改邀请有礼"
} else {
this.title = "新增邀请有礼"
}
} else if (this.id == 5) {
if (this.$route.query.type && this.$route.query.type == "edit") {
this.title = "修改生日有礼"
} else {
this.title = "新增生日有礼"
}
} else if (this.id == 9) {
this.title = "分时优惠设置"
} else if (this.id == 10) {
this.title = "限时特价设置"
} else if (this.id == 11) {
if (this.$route.query.type && this.$route.query.type == "edit") {
this.title = "修改立减营销"
} else {
this.title = "新增立减营销"
}
} else if (this.id == 6) {
if (this.$route.query.type && this.$route.query.type == "edit") {
this.title = "修改推荐会员充值有礼"
} else {
this.title = "新增推荐会员充值有礼"
}
} else if (this.id == 7) {
if (this.$route.query.type && this.$route.query.type == "edit") {
this.title = "修改推荐会员消费有礼"
} else {
this.title = "新增推荐会员消费有礼"
}
} else if (this.id == 8) {
if (this.$route.query.type && this.$route.query.type == "edit") {
this.title = "修改弹窗营销"
} else {
this.title = "新增弹窗营销"
}
}
},
components:{
components: {
//
activeNewlyweds,
//
@ -69,7 +128,9 @@ export default {
popUp,
},
methods: {
goActivity() {
this.$router.push("/EventMarketing/center/index")
}
}
}
</script>
@ -80,6 +141,20 @@ export default {
height: 100vh;
background: #f6f8f9;
}
.top-tab {
width: 100%;
height: 40px;
box-sizing: border-box;
padding: 15px 35px;
display: flex;
align-items: center;
cursor: pointer;
background: #fff;
font-size: 12px;
color: #666666;
}
.cot-box {
width: 100%;
border-radius: 8px;

View File

@ -199,8 +199,8 @@ export default {
},
ruleForm: {
activeTimeType:0,
rewardDisplay:[]
activeTimeType: 0,
rewardDisplay: []
},
ifWrite: true,
tindex1: 0,
@ -209,7 +209,7 @@ export default {
],
couponList: [],
//
cardCouponList:[],
cardCouponList: [],
//
rules: {
activeName: [
@ -232,30 +232,30 @@ export default {
},
created() {
// this.getList()
this.getInfo()
// this.getInfo()
this.getCardCoupon()
},
methods: {
getCardCoupon(){
listCardCoupon({status:1,putType:1}).then(res => {
getCardCoupon() {
listCardCoupon({status: 1, putType: 1}).then(res => {
this.cardCouponList = res.data.records
})
},
getInfo(){
getInfo() {
getActiveRecommendInfo().then(res => {
if (res.data) {
this.ruleForm = res.data
if (res.data.rewardDisplay) {
this.ruleForm.rewardDisplay = res.data.rewardDisplay.split(",")
}else {
} else {
this.ruleForm.rewardDisplay = []
}
if (res.data.activeTimeType) this.tindex1 = res.data.activeTimeType
if (res.data.couponList) this.couponList = res.data.couponList
}else {
} else {
this.ruleForm = {
activeTimeType:0,
rewardDisplay:[]
activeTimeType: 0,
rewardDisplay: []
}
this.tindex1 = 0
}
@ -277,8 +277,8 @@ export default {
this.ruleForm.activeTimeType = index
},
submitRuleForm(formName) {
if (this.tindex1 == 1){
if (!this.ruleForm.activeStartTime || !this.ruleForm.activeEndTime){
if (this.tindex1 == 1) {
if (!this.ruleForm.activeStartTime || !this.ruleForm.activeEndTime) {
this.$message.error("请选择活动开始时间")
return
}
@ -290,12 +290,14 @@ export default {
if (this.ruleForm.id) {
updateActiveRecommend1(this.ruleForm).then(response => {
this.$modal.msgSuccess("修改成功");
this.getInfo()
// this.getInfo()
this.$router.push({path: "/EventMarketing/center/index", query: {id: '7'}})
});
}else {
} else {
insertActiveRecommend(this.ruleForm).then(response => {
this.$modal.msgSuccess("新增成功");
this.getInfo()
// this.getInfo()
this.$router.push({path: "/EventMarketing/center/index", query: {id: '7'}})
});
}
}
@ -304,7 +306,8 @@ export default {
resetForm(formName) {
this.$refs[formName].resetFields();
this.ifWrite = true
this.getInfo()
// this.getInfo()
this.$router.push({path: "/EventMarketing/center/index"})
},
/** 查询新人有礼活动列表 */
getList() {

View File

@ -236,6 +236,9 @@ export default {
},
ruleForm: {
activeTimeType:0,
suitModule:0,
suitTimeSlotType:0,
paymentType:[],
courtesyReward:[]
},
@ -288,7 +291,7 @@ export default {
},
created() {
// this.getList()
this.getInfo()
// this.getInfo()
this.getCardCoupon()
this.listUserGrade()
},
@ -383,12 +386,14 @@ export default {
if (this.ruleForm.id) {
editActivePopUp(this.ruleForm).then(response => {
this.$modal.msgSuccess("修改成功");
this.getInfo()
// this.getInfo()
this.$router.push({path: "/EventMarketing/center/index", query: {id: '10'}})
});
}else {
addActivePopUp(this.ruleForm).then(response => {
this.$modal.msgSuccess("新增成功");
this.getInfo()
// this.getInfo()
this.$router.push({path: "/EventMarketing/center/index", query: {id: '10'}})
});
}
}
@ -397,7 +402,8 @@ export default {
resetForm(formName) {
this.$refs[formName].resetFields();
this.ifWrite = true
this.getInfo()
// this.getInfo()
this.$router.push({path: "/EventMarketing/center/index"})
},
/** 查询新人有礼活动列表 */
getList() {

View File

@ -230,6 +230,7 @@ export default {
},
ruleForm: {
activeTimeType:0,
suitOilType:0,
paymentType:[],
courtesyReward:[]
@ -276,7 +277,7 @@ export default {
},
created() {
// this.getList()
this.getInfo()
// this.getInfo()
this.getCardCoupon()
this.listUserGrade()
this.getOilList()
@ -370,12 +371,14 @@ export default {
if (this.ruleForm.id) {
editActiveUserConsume(this.ruleForm).then(response => {
this.$modal.msgSuccess("修改成功");
this.getInfo()
// this.getInfo()
this.$router.push({path: "/EventMarketing/center/index", query: {id: '9'}})
});
}else {
addActiveUserConsume(this.ruleForm).then(response => {
this.$modal.msgSuccess("新增成功");
this.getInfo()
// this.getInfo()
this.$router.push({path: "/EventMarketing/center/index", query: {id: '9'}})
});
}
}
@ -384,7 +387,8 @@ export default {
resetForm(formName) {
this.$refs[formName].resetFields();
this.ifWrite = true
this.getInfo()
// this.getInfo()
this.$router.push({path: "/EventMarketing/center/index"})
},
/** 查询新人有礼活动列表 */
getList() {

View File

@ -215,6 +215,7 @@ export default {
},
ruleForm: {
activeTimeType:0,
paymentType:[],
courtesyReward:[]
},
@ -252,7 +253,7 @@ export default {
},
created() {
// this.getList()
this.getInfo()
// this.getInfo()
this.getCardCoupon()
this.listUserGrade()
},
@ -317,12 +318,14 @@ export default {
if (this.ruleForm.id) {
editActiveUserRecharge(this.ruleForm).then(response => {
this.$modal.msgSuccess("修改成功");
this.getInfo()
// this.getInfo()
this.$router.push({path: "/EventMarketing/center/index", query: {id: '8'}})
});
}else {
addActiveUserRecharge(this.ruleForm).then(response => {
this.$modal.msgSuccess("新增成功");
this.getInfo()
// this.getInfo()
this.$router.push({path: "/EventMarketing/center/index", query: {id: '8'}})
});
}
}
@ -331,7 +334,8 @@ export default {
resetForm(formName) {
this.$refs[formName].resetFields();
this.ifWrite = true
this.getInfo()
// this.getInfo()
this.$router.push({path: "/EventMarketing/center/index"})
},
/** 查询新人有礼活动列表 */
getList() {

View File

@ -103,7 +103,7 @@ public class ActiveAppletController extends BaseController {
} catch (Exception ignored) {
}
return getSuccessResult(this.activeAppletService.save(activeApplet));
return getSuccessResult(this.activeAppletService.insertActiveApplet(activeApplet));
}
/**

View File

@ -42,6 +42,12 @@ public class ActiveApplet extends Model<ActiveApplet> {
private Integer points;
//时间
private String time;
//开始时间
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
private Date activeStartTime;
//结束时间
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
private Date activeEndTime;
//类型
private String type;
//名称
@ -53,13 +59,19 @@ public class ActiveApplet extends Model<ActiveApplet> {
//创建者
private String createBy;
//创建时间
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss" , timezone = "GMT+8")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
private Date createTime;
//更新者
private String updateBy;
//更新时间
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
private Date updateTime;
@TableField(exist = false)
private String typeText;
}
/**
* 创建人名称
*/
@TableField(exist = false)
private String createName;
}

View File

@ -28,18 +28,18 @@
</select>
<select id="pageActive" resultType="com.fuint.business.marketingActivity.activeApplet.entity.ActiveApplet">
SELECT
*
aa.*,ta.real_name createName
FROM
active_applet
active_applet aa LEFT JOIN t_account ta on aa.create_by = ta.acct_id
<where>
<if test="entity.name != null and entity.name != ''">
AND name like concat('%', #{entity.name}, '%')
AND aa.name like concat('%', #{entity.name}, '%')
</if>
<if test="entity.name != null and entity.name != ''">
AND type = #{entity.type}
<if test="entity.type != null and entity.type != ''">
AND aa.type = #{entity.type}
</if>
<if test="entity.activeStatus != null and entity.activeStatus != ''">
AND active_status = #{entity.activeStatus}
AND aa.active_status = #{entity.activeStatus}
</if>
</where>
ORDER BY create_time desc

View File

@ -33,5 +33,12 @@ public interface ActiveAppletService extends IService<ActiveApplet> {
* @date 21:37 2024/9/9
**/
IPage<ActiveApplet> pageActive(Page<ActiveApplet> page, ActiveApplet activeApplet);
/**
* 添加信息
* @param activeApplet
* @return
*/
int insertActiveApplet(ActiveApplet activeApplet);
}

View File

@ -8,6 +8,8 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.fuint.business.marketingActivity.activeApplet.mapper.ActiveAppletMapper;
import com.fuint.business.marketingActivity.activeApplet.entity.ActiveApplet;
import com.fuint.business.marketingActivity.activeApplet.service.ActiveAppletService;
import com.fuint.common.dto.AccountInfo;
import com.fuint.common.util.TokenUtil;
import com.fuint.utils.StringUtil;
import org.springframework.stereotype.Service;
@ -68,6 +70,15 @@ public class ActiveAppletServiceImpl extends ServiceImpl<ActiveAppletMapper, Act
});
return result;
}
@Override
public int insertActiveApplet(ActiveApplet activeApplet) {
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
activeApplet.setChainStoreId(nowAccountInfo.getChainStoreId());
activeApplet.setStoreId(nowAccountInfo.getStoreId());
return baseMapper.insert(activeApplet);
}
/**
* 类型转换
* @author PQZ
@ -80,12 +91,13 @@ public class ActiveAppletServiceImpl extends ServiceImpl<ActiveAppletMapper, Act
type = type.replace("1", "储值卡");
type = type.replace("2", "囤油卡");
type = type.replace("3", "立减营销");
type = type.replace("4", "立减营销");
type = type.replace("4", "生日有礼");
type = type.replace("5", "消费有礼");
type = type.replace("6", "开卡有礼");
type = type.replace("7", "邀请有礼");
type = type.replace("8", "分时优惠");
type = type.replace("9", "限时特价");
type = type.replace("8", "推荐会员充值有礼");
type = type.replace("9", "推荐会员消费有礼");
type = type.replace("10", "弹窗营销");
} else {
type = "";
}

View File

@ -82,6 +82,10 @@ public class ActiveBirthday extends BaseEntity implements Serializable {
* 赠送成长值
*/
private Integer growthValue;
/**
* 是否在线 0在线 1 下线
*/
private String isonline;
/**
* 创建者
*/

View File

@ -3,6 +3,8 @@ package com.fuint.business.marketingActivity.activeBirthday.service.impl;
import cn.hutool.core.util.ObjectUtil;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.fuint.business.marketingActivity.activeApplet.entity.ActiveApplet;
import com.fuint.business.marketingActivity.activeApplet.service.ActiveAppletService;
import com.fuint.business.marketingActivity.activeBirthday.entity.ActiveBirthday;
import com.fuint.business.marketingActivity.activeBirthday.entity.ActiveBirthdayChild;
import com.fuint.business.marketingActivity.activeBirthday.mapper.ActiveBirthdayMapper;
@ -27,6 +29,8 @@ public class ActiveBirthdayServiceImpl extends ServiceImpl<ActiveBirthdayMapper,
@Autowired
private ActiveBirthdayChildService activeBirthdayChildService;
@Autowired
private ActiveAppletService activeAppletService;
/**
* 通过ID查询单条数据
@ -71,20 +75,42 @@ public class ActiveBirthdayServiceImpl extends ServiceImpl<ActiveBirthdayMapper,
*/
@Override
public int insert(ActiveBirthday activeBirthday) {
ActiveBirthday activeBirthday1 = selectByStoreId();
if (ObjectUtil.isNotEmpty(activeBirthday1)) return 0;
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
activeBirthday.setChainStoreId(nowAccountInfo.getChainStoreId());
activeBirthday.setStoreId(nowAccountInfo.getStoreId());
activeBirthday.setIsonline("0");
int row = baseMapper.insert(activeBirthday);
activeBirthday1 = selectByStoreId();
// 往子表插入信息
if (ObjectUtil.isNotEmpty(activeBirthday.getCouponList())){
for (ActiveBirthdayChild activeBirthdayChild : activeBirthday.getCouponList()) {
activeBirthdayChild.setActiveBirthdayId(activeBirthday1.getId());
activeBirthdayChild.setActiveBirthdayId(activeBirthday.getId());
activeBirthdayChildService.insert(activeBirthdayChild);
}
}
// 往总表插入信息
ActiveApplet activeApplet = new ActiveApplet();
String discountActiveDescribe = "";
if (activeBirthday.getCourtesyReward().contains("0")) {
discountActiveDescribe += "赠送优惠券,";
}
if (activeBirthday.getCourtesyReward().contains("2")) {
discountActiveDescribe += "赠送成长值,";
}
if (activeBirthday.getCourtesyReward().contains("3")) {
discountActiveDescribe += "赠送积分,";
}
activeApplet.setDiscountActiveDescribe(discountActiveDescribe);
activeApplet.setTime(activeBirthday.getActiveTimeType());
activeApplet.setActiveStartTime(activeBirthday.getActiveStartTime());
activeApplet.setActiveEndTime(activeBirthday.getActiveEndTime());
activeApplet.setType("4");
activeApplet.setActiveId(activeBirthday.getId());
activeApplet.setName(activeBirthday.getName());
activeApplet.setIsonline(activeBirthday.getIsonline());
activeApplet.setActiveStatus(activeBirthday.getIsonline().equals("0") ? "1":"2");
activeAppletService.insertActiveApplet(activeApplet);
return row;
}

View File

@ -111,8 +111,6 @@ public class ActiveConsumptionServiceImpl extends ServiceImpl<ActiveConsumptionM
@Override
@Transactional
public Boolean add(ActiveConsumptionDTO activeConsumptionDTO) {
ActiveConsumption activeConsumption1 = selectByStoreId();
if (ObjectUtil.isNotEmpty(activeConsumption1)) return false;
boolean save = false;
ActiveApplet activeApplet = new ActiveApplet();
@ -595,33 +593,54 @@ public class ActiveConsumptionServiceImpl extends ServiceImpl<ActiveConsumptionM
@Override
public int insertActiveConsumption(ActiveConsumption activeConsumption) {
ActiveConsumption activeConsumption1 = selectByStoreId();
if (ObjectUtil.isNotEmpty(activeConsumption1)){
return 0;
}
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
activeConsumption.setChainStorId(nowAccountInfo.getChainStoreId());
activeConsumption.setStoreId(nowAccountInfo.getStoreId());
activeConsumption.setIsonline("0");
int row = baseMapper.insert(activeConsumption);
activeConsumption1 = selectByStoreId();
// 插入子表信息
if (ObjectUtil.isNotEmpty(activeConsumption.getPointList())){
for (ActiveConsumptionChild activeConsumptionChild : activeConsumption.getPointList()) {
activeConsumptionChild.setActiveConsumptionId(activeConsumption1.getId());
activeConsumptionChild.setActiveConsumptionId(activeConsumption.getId());
activeConsumptionChildService.save(activeConsumptionChild);
}
}
if (ObjectUtil.isNotEmpty(activeConsumption.getGrowthValueList())){
for (ActiveConsumptionChild activeConsumptionChild : activeConsumption.getGrowthValueList()) {
activeConsumptionChild.setActiveConsumptionId(activeConsumption1.getId());
activeConsumptionChild.setActiveConsumptionId(activeConsumption.getId());
activeConsumptionChildService.save(activeConsumptionChild);
}
}
if (ObjectUtil.isNotEmpty(activeConsumption.getCouponList())){
for (ActiveConsumptionChild activeConsumptionChild : activeConsumption.getCouponList()) {
activeConsumptionChild.setActiveConsumptionId(activeConsumption1.getId());
activeConsumptionChild.setActiveConsumptionId(activeConsumption.getId());
activeConsumptionChildService.save(activeConsumptionChild);
}
}
// 往总表插入信息
ActiveApplet activeApplet = new ActiveApplet();
String discountActiveDescribe = "";
if (activeConsumption.getActiveGift().contains("1")) {
discountActiveDescribe += "赠送优惠券,";
}
if (activeConsumption.getActiveGift().contains("3")) {
discountActiveDescribe += "赠送成长值,";
}
if (activeConsumption.getActiveGift().contains("0")) {
discountActiveDescribe += "赠送积分,";
}
activeApplet.setDiscountActiveDescribe(discountActiveDescribe);
activeApplet.setTime(activeConsumption.getActivityTimeType());
activeApplet.setActiveStartTime(activeConsumption.getActiveStartTime());
activeApplet.setActiveEndTime(activeConsumption.getActiveEndTime());
activeApplet.setType("5");
activeApplet.setAdaptUserType(activeConsumption.getDieselUserLevel());
activeApplet.setActiveId(activeConsumption.getId());
activeApplet.setName(activeConsumption.getName());
activeApplet.setIsonline(activeConsumption.getIsonline());
activeApplet.setActiveStatus(activeConsumption.getIsonline().equals("0") ? "1":"2");
activeAppletService.insertActiveApplet(activeApplet);
return row;
}

View File

@ -66,7 +66,7 @@ public interface ActiveNewlywedsService extends IService<ActiveNewlyweds> {
List<ActiveNewlywedsAppletVO> selectApplet(ActiveConsumption activeConsumption);
/**
* 根据店铺id查询新人有礼信息
* 根据店铺id查询在线的新人有礼信息
* @return
*/
ActiveNewlyweds selectByStoreId();
@ -76,7 +76,7 @@ public interface ActiveNewlywedsService extends IService<ActiveNewlyweds> {
* @param activeNewlyweds
* @return
*/
int insertActiveNewlyweds(ActiveNewlyweds activeNewlyweds);
boolean insertActiveNewlyweds(ActiveNewlyweds activeNewlyweds);
/**
* 修改开卡有礼活动信息

View File

@ -72,7 +72,6 @@ public class ActiveNewlywedsServiceImpl extends ServiceImpl<ActiveNewlywedsMappe
private ActiveAppletService activeAppletService;
/**
*
* @param activeNewlywedsDTO
* @return
*/
@ -85,25 +84,25 @@ public class ActiveNewlywedsServiceImpl extends ServiceImpl<ActiveNewlywedsMappe
boolean save = false;
ActiveApplet activeApplet = new ActiveApplet();
activeApplet.setStoreId(TokenUtil.getNowAccountInfo().getStoreId());
if (ObjectUtils.isNotEmpty(TokenUtil.getNowAccountInfo().getStoreId())) {
activeNewlywedsDTO.setStoreId(TokenUtil.getNowAccountInfo().getStoreId());
activeNewlywedsDTO.setChainStoreId(storeService.getById(TokenUtil.getNowAccountInfo().getStoreId()).getChainStoreId());
}
//新增折扣营销活动模板
ActiveNewlyweds activeNewlyweds = new ActiveNewlyweds();
if (ObjectUtils.isNotEmpty(activeNewlywedsDTO)){
BeanUtils.copyProperties(activeNewlywedsDTO,activeNewlyweds);
TAccount accountInfoById = accountService.getAccountInfoById(TokenUtil.getNowAccountInfo().getId());
if (ObjectUtil.isNotEmpty(accountInfoById)) activeNewlyweds.setCreateBy(accountInfoById.getRealName());
//有礼奖励
activeNewlyweds.setCourtesyReward(arrayToString(activeNewlywedsDTO.getCourtesyReward()));
save = save(activeNewlyweds);
}
if (ObjectUtils.isNotEmpty(TokenUtil.getNowAccountInfo().getStoreId())) {
activeNewlywedsDTO.setStoreId(TokenUtil.getNowAccountInfo().getStoreId());
activeNewlywedsDTO.setChainStoreId(storeService.getById(TokenUtil.getNowAccountInfo().getStoreId()).getChainStoreId());
}
//新增折扣营销活动模板
ActiveNewlyweds activeNewlyweds = new ActiveNewlyweds();
if (ObjectUtils.isNotEmpty(activeNewlywedsDTO)) {
BeanUtils.copyProperties(activeNewlywedsDTO, activeNewlyweds);
TAccount accountInfoById = accountService.getAccountInfoById(TokenUtil.getNowAccountInfo().getId());
if (ObjectUtil.isNotEmpty(accountInfoById)) activeNewlyweds.setCreateBy(accountInfoById.getRealName());
//有礼奖励
activeNewlyweds.setCourtesyReward(arrayToString(activeNewlywedsDTO.getCourtesyReward()));
save = save(activeNewlyweds);
}
activeApplet.setActiveId(activeNewlyweds.getId());
SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy.MM.dd");
String formatSt = dateFormat.format(activeNewlyweds.getActiveStartTime());
String formatEd = dateFormat.format(activeNewlyweds.getActiveEndTime());
activeApplet.setTime(formatSt+"-" + formatEd+"");
activeApplet.setTime(formatSt + "-" + formatEd + "");
activeApplet.setPoints(activeNewlyweds.getPoints());
activeApplet.setGrowaValue(activeNewlyweds.getGrowthValue());
activeApplet.setType("6");
@ -115,13 +114,13 @@ public class ActiveNewlywedsServiceImpl extends ServiceImpl<ActiveNewlywedsMappe
card += activeNewlywedsChild.getGiftCardDetail() + "的券,";
}
}
activeApplet.setDiscountActiveDescribe("此项新人有礼活动,登录赠送积分为:"+activeNewlywedsDTO.getPoints()+
"积分,赠送成长值为:"+activeNewlywedsDTO.getGrowthValue()+"成长值,赠送券为:"+
(ObjectUtil.isNotEmpty(card) ? card : "")+"");
activeApplet.setDiscountActiveDescribe("此项新人有礼活动,登录赠送积分为:" + activeNewlywedsDTO.getPoints() +
"积分,赠送成长值为:" + activeNewlywedsDTO.getGrowthValue() + "成长值,赠送券为:" +
(ObjectUtil.isNotEmpty(card) ? card : "") + "");
activeAppletService.save(activeApplet);
//新增兑换物品
List<ActiveNewlywedsChild> list = activeNewlywedsDTO.getActiveNewlywedsChildList();
list.stream().map(s ->{
list.stream().map(s -> {
s.setActiveNewlywedsId(activeNewlyweds.getId());
return s;
}).collect(Collectors.toList());
@ -132,6 +131,7 @@ public class ActiveNewlywedsServiceImpl extends ServiceImpl<ActiveNewlywedsMappe
/**
* 修改数据
*
* @param activeNewlywedsDTO
* @return
*/
@ -140,15 +140,15 @@ public class ActiveNewlywedsServiceImpl extends ServiceImpl<ActiveNewlywedsMappe
public Boolean updateOneById(ActiveNewlywedsDTO activeNewlywedsDTO) {
boolean update = false;
LambdaQueryWrapper<ActiveApplet> queryWrapper1 = new LambdaQueryWrapper<>();
queryWrapper1.eq(ActiveApplet::getStoreId,TokenUtil.getNowAccountInfo().getStoreId());
queryWrapper1.eq(ActiveApplet::getType,"6");
queryWrapper1.eq(ActiveApplet::getActiveId,activeNewlywedsDTO.getId());
queryWrapper1.eq(ActiveApplet::getStoreId, TokenUtil.getNowAccountInfo().getStoreId());
queryWrapper1.eq(ActiveApplet::getType, "6");
queryWrapper1.eq(ActiveApplet::getActiveId, activeNewlywedsDTO.getId());
ActiveApplet activeApplet = activeAppletService.getOne(queryWrapper1);
SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy.MM.dd");
String formatSt = dateFormat.format(activeNewlywedsDTO.getActiveStartTime());
String formatEd = dateFormat.format(activeNewlywedsDTO.getActiveEndTime());
activeApplet.setTime(formatSt+"-" + formatEd+"");
activeApplet.setTime(formatSt + "-" + formatEd + "");
activeApplet.setPoints(activeNewlywedsDTO.getPoints());
activeApplet.setGrowaValue(activeNewlywedsDTO.getGrowthValue());
@ -160,29 +160,29 @@ public class ActiveNewlywedsServiceImpl extends ServiceImpl<ActiveNewlywedsMappe
card += activeNewlywedsChild.getGiftCardDetail() + "的券,";
}
}
activeApplet.setDiscountActiveDescribe("此项新人有礼活动,登录赠送积分为:"+activeNewlywedsDTO.getPoints()+"积分,赠送成长值为:"+activeNewlywedsDTO.getGrowthValue()+"成长值,赠送券为:"+card+"");
activeApplet.setDiscountActiveDescribe("此项新人有礼活动,登录赠送积分为:" + activeNewlywedsDTO.getPoints() + "积分,赠送成长值为:" + activeNewlywedsDTO.getGrowthValue() + "成长值,赠送券为:" + card + "");
activeAppletService.updateById(activeApplet);
//更新新人有礼活动
ActiveNewlyweds activeNewlyweds = new ActiveNewlyweds();
BeanUtils.copyProperties(activeNewlywedsDTO,activeNewlyweds);
BeanUtils.copyProperties(activeNewlywedsDTO, activeNewlyweds);
TAccount accountInfoById = accountService.getAccountInfoById(TokenUtil.getNowAccountInfo().getId());
if (ObjectUtil.isNotEmpty(accountInfoById)) activeNewlyweds.setCreateBy(accountInfoById.getRealName());
//奖励类型
activeNewlyweds.setCourtesyReward(arrayToString(activeNewlywedsDTO.getCourtesyReward()));
if (activeNewlywedsDTO.getIsonline().equals("1")){
if (activeNewlywedsDTO.getIsonline().equals("1")) {
activeNewlyweds.setStatus("2");
}
update = updateById(activeNewlyweds);
//更新子表数据
LambdaQueryWrapper<ActiveNewlywedsChild> queryWrapper = new LambdaQueryWrapper<>();
queryWrapper.eq(ActiveNewlywedsChild::getActiveNewlywedsId,activeNewlywedsDTO.getId());
queryWrapper.eq(ActiveNewlywedsChild::getActiveNewlywedsId, activeNewlywedsDTO.getId());
activeNewlywedsChildService.remove(queryWrapper);
//新增兑换物品
List<ActiveNewlywedsChild> activeNewlywedsChildList = activeNewlywedsDTO.getActiveNewlywedsChildList();
if (CollectionUtils.isNotEmpty(activeNewlywedsChildList)){
activeNewlywedsChildList.stream().map(s ->{
if (CollectionUtils.isNotEmpty(activeNewlywedsChildList)) {
activeNewlywedsChildList.stream().map(s -> {
s.setActiveNewlywedsId(activeNewlyweds.getId());
return s;
}).collect(Collectors.toList());
@ -192,9 +192,9 @@ public class ActiveNewlywedsServiceImpl extends ServiceImpl<ActiveNewlywedsMappe
}
/**
* 分页查询所有数据
*
* @param page
* @param activeNewlywedss
* @return
@ -203,191 +203,193 @@ public class ActiveNewlywedsServiceImpl extends ServiceImpl<ActiveNewlywedsMappe
public IPage select(Page page, ActiveNewlyweds activeNewlywedss) {
//构建查询条件
ArrayList<ActiveNewlywedsVO> activeNewlywedsVOS = new ArrayList<>();
//获取新人有礼活动信息
LambdaQueryWrapper<ActiveNewlyweds> lambdaQueryWrapper = new LambdaQueryWrapper<>();
lambdaQueryWrapper.eq(ActiveNewlyweds::getStoreId,TokenUtil.getNowAccountInfo().getStoreId());
if (ObjectUtil.isNotEmpty(activeNewlywedss.getName()))
lambdaQueryWrapper.like(ActiveNewlyweds::getName,activeNewlywedss.getName());
if (ObjectUtil.isNotEmpty(activeNewlywedss.getIsonline()))
lambdaQueryWrapper.eq(ActiveNewlyweds::getIsonline,activeNewlywedss.getIsonline());
//ActiveNewlyweds activeNewlyweds = getOne(lambdaQueryWrapper);
IPage page1 = page(page, lambdaQueryWrapper);
List<ActiveNewlyweds> list = page1.getRecords();
//List<ActiveNewlyweds> list = list(lambdaQueryWrapper);
//获取兑换物品信息
if (CollectionUtils.isNotEmpty(list)){
for (ActiveNewlyweds activeNewlyweds : list) {
int youhuiTed = 0;
int duihuanTed = 0;
ActiveNewlywedsVO activeNewlywedsVO = new ActiveNewlywedsVO();
activeNewlywedsVO.setCourtesyReward(new String[0]);
if (ObjectUtils.isNotEmpty(activeNewlyweds)){
LambdaQueryWrapper<ActiveNewlywedsChild> queryWrapper = new LambdaQueryWrapper<>();
queryWrapper.eq(ActiveNewlywedsChild::getActiveNewlywedsId,activeNewlyweds.getId());
queryWrapper.orderByDesc(ActiveNewlywedsChild::getCreateTime);
List<ActiveNewlywedsChild> activeNewlywedsChildList = activeNewlywedsChildService.list(queryWrapper);
for (ActiveNewlywedsChild activeNewlywedsChild : activeNewlywedsChildList) {
//优惠券
if (activeNewlywedsChild.getActiveGift().equals("1")){
LambdaQueryWrapper<CardFavorableRecord> queryWrappers = new LambdaQueryWrapper<>();
queryWrappers.eq(CardFavorableRecord::getActiveId,activeNewlywedsChild.getActiveNewlywedsId());
queryWrappers.eq(CardFavorableRecord::getCardFavorableId,activeNewlywedsChild.getVouchersId());
List<CardFavorableRecord> lists = cardFavorableRecordService.list(queryWrappers);
activeNewlywedsVO.setYouhuiTotal(list.size());
for (CardFavorableRecord cardFavorableRecord : lists) {
if (cardFavorableRecord.getStatus().equals("1")){
youhuiTed+=1;
}
}
}
//兑换券
if (activeNewlywedsChild.getActiveGift().equals("2")){
LambdaQueryWrapper<CardExchangeRecord> queryWrapperss = new LambdaQueryWrapper<>();
queryWrapperss.eq(CardExchangeRecord::getActiveId,activeNewlywedsChild.getActiveNewlywedsId());
queryWrapperss.eq(CardExchangeRecord::getCardExchangeId,activeNewlywedsChild.getVouchersId());
List<CardExchangeRecord> lisst = cardExchangeRecordService.list(queryWrapperss);
activeNewlywedsVO.setDuihuanTotal(list.size());
for (CardExchangeRecord cardExchangeRecord : lisst) {
if (cardExchangeRecord.getStatus().equals("1")){
duihuanTed+=1;
}
//获取新人有礼活动信息
LambdaQueryWrapper<ActiveNewlyweds> lambdaQueryWrapper = new LambdaQueryWrapper<>();
lambdaQueryWrapper.eq(ActiveNewlyweds::getStoreId, TokenUtil.getNowAccountInfo().getStoreId());
if (ObjectUtil.isNotEmpty(activeNewlywedss.getName()))
lambdaQueryWrapper.like(ActiveNewlyweds::getName, activeNewlywedss.getName());
if (ObjectUtil.isNotEmpty(activeNewlywedss.getIsonline()))
lambdaQueryWrapper.eq(ActiveNewlyweds::getIsonline, activeNewlywedss.getIsonline());
//ActiveNewlyweds activeNewlyweds = getOne(lambdaQueryWrapper);
IPage page1 = page(page, lambdaQueryWrapper);
List<ActiveNewlyweds> list = page1.getRecords();
//List<ActiveNewlyweds> list = list(lambdaQueryWrapper);
//获取兑换物品信息
if (CollectionUtils.isNotEmpty(list)) {
for (ActiveNewlyweds activeNewlyweds : list) {
int youhuiTed = 0;
int duihuanTed = 0;
ActiveNewlywedsVO activeNewlywedsVO = new ActiveNewlywedsVO();
activeNewlywedsVO.setCourtesyReward(new String[0]);
if (ObjectUtils.isNotEmpty(activeNewlyweds)) {
LambdaQueryWrapper<ActiveNewlywedsChild> queryWrapper = new LambdaQueryWrapper<>();
queryWrapper.eq(ActiveNewlywedsChild::getActiveNewlywedsId, activeNewlyweds.getId());
queryWrapper.orderByDesc(ActiveNewlywedsChild::getCreateTime);
List<ActiveNewlywedsChild> activeNewlywedsChildList = activeNewlywedsChildService.list(queryWrapper);
for (ActiveNewlywedsChild activeNewlywedsChild : activeNewlywedsChildList) {
//优惠券
if (activeNewlywedsChild.getActiveGift().equals("1")) {
LambdaQueryWrapper<CardFavorableRecord> queryWrappers = new LambdaQueryWrapper<>();
queryWrappers.eq(CardFavorableRecord::getActiveId, activeNewlywedsChild.getActiveNewlywedsId());
queryWrappers.eq(CardFavorableRecord::getCardFavorableId, activeNewlywedsChild.getVouchersId());
List<CardFavorableRecord> lists = cardFavorableRecordService.list(queryWrappers);
activeNewlywedsVO.setYouhuiTotal(list.size());
for (CardFavorableRecord cardFavorableRecord : lists) {
if (cardFavorableRecord.getStatus().equals("1")) {
youhuiTed += 1;
}
}
}
BeanUtils.copyProperties(activeNewlyweds,activeNewlywedsVO);
//封装VO返回
activeNewlywedsVO.setCourtesyReward(activeNewlyweds.getCourtesyReward().split(","));
activeNewlywedsVO.setYouhuiTotaled(youhuiTed);
activeNewlywedsVO.setDuihuanTotaled(duihuanTed);
if (CollectionUtils.isNotEmpty(activeNewlywedsChildList)){
activeNewlywedsVO.setActiveNewlywedsChildList(activeNewlywedsChildList);
activeNewlywedsVOS.add(activeNewlywedsVO);
}else {
ArrayList<ActiveNewlywedsChild> activeNewlywedsChildLists = new ArrayList<>();
activeNewlywedsVO.setActiveNewlywedsChildList(activeNewlywedsChildLists);
activeNewlywedsVOS.add(activeNewlywedsVO);
//兑换券
if (activeNewlywedsChild.getActiveGift().equals("2")) {
LambdaQueryWrapper<CardExchangeRecord> queryWrapperss = new LambdaQueryWrapper<>();
queryWrapperss.eq(CardExchangeRecord::getActiveId, activeNewlywedsChild.getActiveNewlywedsId());
queryWrapperss.eq(CardExchangeRecord::getCardExchangeId, activeNewlywedsChild.getVouchersId());
List<CardExchangeRecord> lisst = cardExchangeRecordService.list(queryWrapperss);
activeNewlywedsVO.setDuihuanTotal(list.size());
for (CardExchangeRecord cardExchangeRecord : lisst) {
if (cardExchangeRecord.getStatus().equals("1")) {
duihuanTed += 1;
}
}
}
}else {
ArrayList<ActiveNewlywedsChild> activeNewlywedsChildList = new ArrayList<>();
}
BeanUtils.copyProperties(activeNewlyweds, activeNewlywedsVO);
//封装VO返回
activeNewlywedsVO.setCourtesyReward(activeNewlyweds.getCourtesyReward().split(","));
activeNewlywedsVO.setYouhuiTotaled(youhuiTed);
activeNewlywedsVO.setDuihuanTotaled(duihuanTed);
if (CollectionUtils.isNotEmpty(activeNewlywedsChildList)) {
activeNewlywedsVO.setActiveNewlywedsChildList(activeNewlywedsChildList);
activeNewlywedsVO.setDuihuanTotaled(youhuiTed);
activeNewlywedsVO.setDuihuanTotaled(duihuanTed);
activeNewlywedsVO.setDuihuanTotal(0);
activeNewlywedsVO.setDuihuanTotal(0);
activeNewlywedsVOS.add(activeNewlywedsVO);
} else {
ArrayList<ActiveNewlywedsChild> activeNewlywedsChildLists = new ArrayList<>();
activeNewlywedsVO.setActiveNewlywedsChildList(activeNewlywedsChildLists);
activeNewlywedsVOS.add(activeNewlywedsVO);
}
} else {
ArrayList<ActiveNewlywedsChild> activeNewlywedsChildList = new ArrayList<>();
activeNewlywedsVO.setActiveNewlywedsChildList(activeNewlywedsChildList);
activeNewlywedsVO.setDuihuanTotaled(youhuiTed);
activeNewlywedsVO.setDuihuanTotaled(duihuanTed);
activeNewlywedsVO.setDuihuanTotal(0);
activeNewlywedsVO.setDuihuanTotal(0);
activeNewlywedsVOS.add(activeNewlywedsVO);
}
}
page1.setRecords(list);
return page1;
}
page1.setRecords(list);
return page1;
//return activeNewlywedsVOS;
}
/**
* 通过店铺查询单条数据
*
* @param id
* @return
*/
@Override
public ActiveNewlywedsVO getOneById(Serializable id) {
Integer storeId = TokenUtil.getNowAccountInfo().getStoreId();
//获取新人有礼活动信息
LambdaQueryWrapper<ActiveNewlyweds> lambdaQueryWrapper = new LambdaQueryWrapper<>();
lambdaQueryWrapper.eq(ActiveNewlyweds::getStoreId,TokenUtil.getNowAccountInfo().getStoreId());
lambdaQueryWrapper.eq(ActiveNewlyweds::getId,id);
ActiveNewlyweds activeNewlyweds = getOne(lambdaQueryWrapper);
//List<ActiveNewlyweds> list = list(lambdaQueryWrapper);
//获取兑换物品信息
int youhuiTed = 0;
int duihuanTed = 0;
ActiveNewlywedsVO activeNewlywedsVO = new ActiveNewlywedsVO();
activeNewlywedsVO.setCourtesyReward(new String[0]);
if (ObjectUtils.isNotEmpty(activeNewlyweds)){
LambdaQueryWrapper<ActiveNewlywedsChild> queryWrapper = new LambdaQueryWrapper<>();
queryWrapper.eq(ActiveNewlywedsChild::getActiveNewlywedsId,activeNewlyweds.getId());
queryWrapper.orderByDesc(ActiveNewlywedsChild::getCreateTime);
List<ActiveNewlywedsChild> activeNewlywedsChildList = activeNewlywedsChildService.list(queryWrapper);
for (ActiveNewlywedsChild activeNewlywedsChild : activeNewlywedsChildList) {
//优惠券
if (activeNewlywedsChild.getActiveGift().equals("1")){
CardFavorable cardFavorable = cardFavorableMapper.selectById(activeNewlywedsChild.getVouchersId());
if (ObjectUtils.isNotEmpty(cardFavorable)){
activeNewlywedsChild.setGiftCardName(cardFavorable.getName());
activeNewlywedsChild.setGiftCardDetail(cardFavorable.getCardDetail());
if (ObjectUtils.isNotEmpty(cardFavorable.getValidityZero())){
activeNewlywedsChild.setValidityZero(cardFavorable.getValidityZero());
}
if (ObjectUtils.isNotEmpty(cardFavorable.getValidityOne())){
activeNewlywedsChild.setValidityOne(cardFavorable.getValidityOne());
}
if (ObjectUtils.isNotEmpty(cardFavorable.getValidityTwo())){
activeNewlywedsChild.setValidityTwo(cardFavorable.getValidityTwo());
}
activeNewlywedsChild.setInstruction(cardFavorable.getInstruction());
activeNewlywedsChildService.updateById(activeNewlywedsChild);
}
LambdaQueryWrapper<CardFavorableRecord> queryWrappers = new LambdaQueryWrapper<>();
queryWrappers.eq(CardFavorableRecord::getActiveId,activeNewlywedsChild.getActiveNewlywedsId());
queryWrappers.eq(CardFavorableRecord::getCardFavorableId,activeNewlywedsChild.getVouchersId());
List<CardFavorableRecord> lists = cardFavorableRecordService.list(queryWrappers);
activeNewlywedsVO.setYouhuiTotal(lists.size());
for (CardFavorableRecord cardFavorableRecord : lists) {
if (cardFavorableRecord.getStatus().equals("1")){
youhuiTed+=1;
}
}
}
//兑换券
if (activeNewlywedsChild.getActiveGift().equals("2")){
//兑换券
CardExchange cardExchange = cardExchangeMapper.selectById(activeNewlywedsChild.getVouchersId());
if (ObjectUtils.isNotEmpty(cardExchange)) {
activeNewlywedsChild.setGiftCardName(cardExchange.getName());
activeNewlywedsChild.setGiftCardDetail(cardExchange.getCardDetail());
activeNewlywedsChild.setGiftCardTime(cardExchange.getValidity());
activeNewlywedsChild.setInstruction(cardExchange.getUseInstructions());
activeNewlywedsChildService.updateById(activeNewlywedsChild);
}
LambdaQueryWrapper<CardExchangeRecord> queryWrapperss = new LambdaQueryWrapper<>();
queryWrapperss.eq(CardExchangeRecord::getActiveId,activeNewlywedsChild.getActiveNewlywedsId());
queryWrapperss.eq(CardExchangeRecord::getCardExchangeId,activeNewlywedsChild.getVouchersId());
List<CardExchangeRecord> lisst = cardExchangeRecordService.list(queryWrapperss);
activeNewlywedsVO.setDuihuanTotal(lisst.size());
for (CardExchangeRecord cardExchangeRecord : lisst) {
if (cardExchangeRecord.getStatus().equals("1")){
duihuanTed+=1;
}
}
}
//获取新人有礼活动信息
LambdaQueryWrapper<ActiveNewlyweds> lambdaQueryWrapper = new LambdaQueryWrapper<>();
lambdaQueryWrapper.eq(ActiveNewlyweds::getStoreId, TokenUtil.getNowAccountInfo().getStoreId());
lambdaQueryWrapper.eq(ActiveNewlyweds::getId, id);
ActiveNewlyweds activeNewlyweds = getOne(lambdaQueryWrapper);
//List<ActiveNewlyweds> list = list(lambdaQueryWrapper);
//获取兑换物品信息
int youhuiTed = 0;
int duihuanTed = 0;
ActiveNewlywedsVO activeNewlywedsVO = new ActiveNewlywedsVO();
activeNewlywedsVO.setCourtesyReward(new String[0]);
if (ObjectUtils.isNotEmpty(activeNewlyweds)) {
LambdaQueryWrapper<ActiveNewlywedsChild> queryWrapper = new LambdaQueryWrapper<>();
queryWrapper.eq(ActiveNewlywedsChild::getActiveNewlywedsId, activeNewlyweds.getId());
queryWrapper.orderByDesc(ActiveNewlywedsChild::getCreateTime);
List<ActiveNewlywedsChild> activeNewlywedsChildList = activeNewlywedsChildService.list(queryWrapper);
for (ActiveNewlywedsChild activeNewlywedsChild : activeNewlywedsChildList) {
//优惠券
if (activeNewlywedsChild.getActiveGift().equals("1")) {
CardFavorable cardFavorable = cardFavorableMapper.selectById(activeNewlywedsChild.getVouchersId());
if (ObjectUtils.isNotEmpty(cardFavorable)) {
activeNewlywedsChild.setGiftCardName(cardFavorable.getName());
activeNewlywedsChild.setGiftCardDetail(cardFavorable.getCardDetail());
if (ObjectUtils.isNotEmpty(cardFavorable.getValidityZero())) {
activeNewlywedsChild.setValidityZero(cardFavorable.getValidityZero());
}
BeanUtils.copyProperties(activeNewlyweds,activeNewlywedsVO);
//封装VO返回
activeNewlywedsVO.setCourtesyReward(activeNewlyweds.getCourtesyReward().split(","));
activeNewlywedsVO.setYouhuiTotaled(youhuiTed);
activeNewlywedsVO.setDuihuanTotaled(duihuanTed);
if (CollectionUtils.isNotEmpty(activeNewlywedsChildList)){
activeNewlywedsVO.setActiveNewlywedsChildList(activeNewlywedsChildList);
//activeNewlywedsVOS.add(activeNewlywedsVO);
}else {
ArrayList<ActiveNewlywedsChild> activeNewlywedsChildLists = new ArrayList<>();
activeNewlywedsVO.setActiveNewlywedsChildList(activeNewlywedsChildLists);
//activeNewlywedsVOS.add(activeNewlywedsVO);
if (ObjectUtils.isNotEmpty(cardFavorable.getValidityOne())) {
activeNewlywedsChild.setValidityOne(cardFavorable.getValidityOne());
}
}else {
ArrayList<ActiveNewlywedsChild> activeNewlywedsChildList = new ArrayList<>();
activeNewlywedsVO.setActiveNewlywedsChildList(activeNewlywedsChildList);
activeNewlywedsVO.setDuihuanTotaled(youhuiTed);
activeNewlywedsVO.setDuihuanTotaled(duihuanTed);
activeNewlywedsVO.setDuihuanTotal(0);
activeNewlywedsVO.setDuihuanTotal(0);
//activeNewlywedsVOS.add(activeNewlywedsVO);
if (ObjectUtils.isNotEmpty(cardFavorable.getValidityTwo())) {
activeNewlywedsChild.setValidityTwo(cardFavorable.getValidityTwo());
}
activeNewlywedsChild.setInstruction(cardFavorable.getInstruction());
activeNewlywedsChildService.updateById(activeNewlywedsChild);
}
LambdaQueryWrapper<CardFavorableRecord> queryWrappers = new LambdaQueryWrapper<>();
queryWrappers.eq(CardFavorableRecord::getActiveId, activeNewlywedsChild.getActiveNewlywedsId());
queryWrappers.eq(CardFavorableRecord::getCardFavorableId, activeNewlywedsChild.getVouchersId());
List<CardFavorableRecord> lists = cardFavorableRecordService.list(queryWrappers);
activeNewlywedsVO.setYouhuiTotal(lists.size());
for (CardFavorableRecord cardFavorableRecord : lists) {
if (cardFavorableRecord.getStatus().equals("1")) {
youhuiTed += 1;
}
}
}
//兑换券
if (activeNewlywedsChild.getActiveGift().equals("2")) {
//兑换券
CardExchange cardExchange = cardExchangeMapper.selectById(activeNewlywedsChild.getVouchersId());
if (ObjectUtils.isNotEmpty(cardExchange)) {
activeNewlywedsChild.setGiftCardName(cardExchange.getName());
activeNewlywedsChild.setGiftCardDetail(cardExchange.getCardDetail());
activeNewlywedsChild.setGiftCardTime(cardExchange.getValidity());
activeNewlywedsChild.setInstruction(cardExchange.getUseInstructions());
activeNewlywedsChildService.updateById(activeNewlywedsChild);
}
LambdaQueryWrapper<CardExchangeRecord> queryWrapperss = new LambdaQueryWrapper<>();
queryWrapperss.eq(CardExchangeRecord::getActiveId, activeNewlywedsChild.getActiveNewlywedsId());
queryWrapperss.eq(CardExchangeRecord::getCardExchangeId, activeNewlywedsChild.getVouchersId());
List<CardExchangeRecord> lisst = cardExchangeRecordService.list(queryWrapperss);
activeNewlywedsVO.setDuihuanTotal(lisst.size());
for (CardExchangeRecord cardExchangeRecord : lisst) {
if (cardExchangeRecord.getStatus().equals("1")) {
duihuanTed += 1;
}
}
}
}
BeanUtils.copyProperties(activeNewlyweds, activeNewlywedsVO);
//封装VO返回
activeNewlywedsVO.setCourtesyReward(activeNewlyweds.getCourtesyReward().split(","));
activeNewlywedsVO.setYouhuiTotaled(youhuiTed);
activeNewlywedsVO.setDuihuanTotaled(duihuanTed);
if (CollectionUtils.isNotEmpty(activeNewlywedsChildList)) {
activeNewlywedsVO.setActiveNewlywedsChildList(activeNewlywedsChildList);
//activeNewlywedsVOS.add(activeNewlywedsVO);
} else {
ArrayList<ActiveNewlywedsChild> activeNewlywedsChildLists = new ArrayList<>();
activeNewlywedsVO.setActiveNewlywedsChildList(activeNewlywedsChildLists);
//activeNewlywedsVOS.add(activeNewlywedsVO);
}
} else {
ArrayList<ActiveNewlywedsChild> activeNewlywedsChildList = new ArrayList<>();
activeNewlywedsVO.setActiveNewlywedsChildList(activeNewlywedsChildList);
activeNewlywedsVO.setDuihuanTotaled(youhuiTed);
activeNewlywedsVO.setDuihuanTotaled(duihuanTed);
activeNewlywedsVO.setDuihuanTotal(0);
activeNewlywedsVO.setDuihuanTotal(0);
//activeNewlywedsVOS.add(activeNewlywedsVO);
}
return activeNewlywedsVO;
}
/**
* 通过店铺查询单条数据
*
* @param id
* @return
*/
@ -395,31 +397,31 @@ public class ActiveNewlywedsServiceImpl extends ServiceImpl<ActiveNewlywedsMappe
public List<ActiveNewlywedsVO> getOneByStoreId(Serializable id) {
ArrayList<ActiveNewlywedsVO> arrayList = new ArrayList<>();
if (ObjectUtils.isNotEmpty(id)){
if (ObjectUtils.isNotEmpty(id)) {
//获取新人有礼活动信息
LambdaQueryWrapper<ActiveNewlyweds> lambdaQueryWrapper = new LambdaQueryWrapper<>();
lambdaQueryWrapper.eq(ActiveNewlyweds::getStoreId,id).eq(ActiveNewlyweds::getIsonline,0);
lambdaQueryWrapper.eq(ActiveNewlyweds::getStoreId, id).eq(ActiveNewlyweds::getIsonline, 0);
//ActiveNewlyweds activeNewlyweds = getOne(lambdaQueryWrapper);
List<ActiveNewlyweds> newlywedsList = list(lambdaQueryWrapper);
for (ActiveNewlyweds activeNewlyweds : newlywedsList) {
ActiveNewlywedsVO activeNewlywedsVO = new ActiveNewlywedsVO();
activeNewlywedsVO.setCourtesyReward(new String[0]);
//获取兑换物品信息
if (ObjectUtils.isNotEmpty(activeNewlyweds)){
if (ObjectUtils.isNotEmpty(activeNewlyweds)) {
LambdaQueryWrapper<ActiveNewlywedsChild> queryWrapper = new LambdaQueryWrapper<>();
queryWrapper.eq(ActiveNewlywedsChild::getActiveNewlywedsId,activeNewlyweds.getId());
queryWrapper.eq(ActiveNewlywedsChild::getActiveNewlywedsId, activeNewlyweds.getId());
queryWrapper.orderByDesc(ActiveNewlywedsChild::getCreateTime);
List<ActiveNewlywedsChild> activeNewlywedsChildList = activeNewlywedsChildService.list(queryWrapper);
BeanUtils.copyProperties(activeNewlyweds,activeNewlywedsVO);
BeanUtils.copyProperties(activeNewlyweds, activeNewlywedsVO);
//封装VO返回
activeNewlywedsVO.setCourtesyReward(activeNewlyweds.getCourtesyReward().split(","));
if (CollectionUtils.isNotEmpty(activeNewlywedsChildList)){
if (CollectionUtils.isNotEmpty(activeNewlywedsChildList)) {
activeNewlywedsVO.setActiveNewlywedsChildList(activeNewlywedsChildList);
}else {
} else {
ArrayList<ActiveNewlywedsChild> activeNewlywedsChildLists = new ArrayList<>();
activeNewlywedsVO.setActiveNewlywedsChildList(activeNewlywedsChildLists);
}
}else {
} else {
ArrayList<ActiveNewlywedsChild> activeNewlywedsChildList = new ArrayList<>();
activeNewlywedsVO.setActiveNewlywedsChildList(activeNewlywedsChildList);
}
@ -431,6 +433,7 @@ public class ActiveNewlywedsServiceImpl extends ServiceImpl<ActiveNewlywedsMappe
/**
* 通过店铺查询单条数据(小程序端)
*
* @param activeConsumption
* @return
*/
@ -438,35 +441,35 @@ public class ActiveNewlywedsServiceImpl extends ServiceImpl<ActiveNewlywedsMappe
public List<ActiveNewlywedsVO> getOneByIdApplet(ActiveConsumption activeConsumption) {
Integer storeId = activeConsumption.getStoreId();
ArrayList<ActiveNewlywedsVO> arrayList = new ArrayList<>();
if (ObjectUtils.isNotEmpty(storeId)){
if (ObjectUtils.isNotEmpty(storeId)) {
//获取新人有礼活动信息
LambdaQueryWrapper<ActiveNewlyweds> lambdaQueryWrapper = new LambdaQueryWrapper<>();
lambdaQueryWrapper.eq(ActiveNewlyweds::getStoreId,storeId);
lambdaQueryWrapper.eq(ActiveNewlyweds::getStoreId, storeId);
List<ActiveNewlyweds> list = list(lambdaQueryWrapper);
//ActiveNewlyweds activeNewlyweds = getOne(lambdaQueryWrapper);
//获取兑换物品信息
if (ObjectUtils.isNotEmpty(list)){
if (ObjectUtils.isNotEmpty(list)) {
for (ActiveNewlyweds activeNewlyweds : list) {
ActiveNewlywedsVO activeNewlywedsVO = new ActiveNewlywedsVO();
activeNewlywedsVO.setCourtesyReward(new String[0]);
LambdaQueryWrapper<ActiveNewlywedsChild> queryWrapper = new LambdaQueryWrapper<>();
queryWrapper.eq(ActiveNewlywedsChild::getActiveNewlywedsId,activeNewlyweds.getId());
queryWrapper.eq(ActiveNewlywedsChild::getActiveNewlywedsId, activeNewlyweds.getId());
queryWrapper.orderByDesc(ActiveNewlywedsChild::getCreateTime);
List<ActiveNewlywedsChild> activeNewlywedsChildList = activeNewlywedsChildService.list(queryWrapper);
BeanUtils.copyProperties(activeNewlyweds,activeNewlywedsVO);
BeanUtils.copyProperties(activeNewlyweds, activeNewlywedsVO);
//封装VO返回
activeNewlywedsVO.setCourtesyReward(activeNewlyweds.getCourtesyReward().split(","));
if (CollectionUtils.isNotEmpty(activeNewlywedsChildList)){
if (CollectionUtils.isNotEmpty(activeNewlywedsChildList)) {
activeNewlywedsVO.setActiveNewlywedsChildList(activeNewlywedsChildList);
}else {
} else {
ArrayList<ActiveNewlywedsChild> activeNewlywedsChildLists = new ArrayList<>();
activeNewlywedsVO.setActiveNewlywedsChildList(activeNewlywedsChildLists);
}
arrayList.add(activeNewlywedsVO);
}
}else {
} else {
ActiveNewlywedsVO activeNewlywedsVO = new ActiveNewlywedsVO();
activeNewlywedsVO.setCourtesyReward(new String[0]);
ArrayList<ActiveNewlywedsChild> activeNewlywedsChildList = new ArrayList<>();
@ -478,7 +481,6 @@ public class ActiveNewlywedsServiceImpl extends ServiceImpl<ActiveNewlywedsMappe
}
@Override
public Boolean updateIsonline(Integer id, String isonline) {
int row = 0;
@ -493,7 +495,7 @@ public class ActiveNewlywedsServiceImpl extends ServiceImpl<ActiveNewlywedsMappe
queryWrapper.eq(ActiveNewlyweds::getStoreId, TokenUtil.getNowAccountInfo().getStoreId());
List<ActiveNewlyweds> activeNewlywedsList = list(queryWrapper);
for (ActiveNewlyweds newlyweds : activeNewlywedsList) {
if (newlyweds.getId().equals(id)){
if (newlyweds.getId().equals(id)) {
ActiveNewlyweds activeNewlyweds = baseMapper.selectById(id);
if (isonline.equals("0")) activeNewlyweds.setStatus("0");
if (isonline.equals("1")) activeNewlyweds.setStatus("1");
@ -502,20 +504,20 @@ public class ActiveNewlywedsServiceImpl extends ServiceImpl<ActiveNewlywedsMappe
LambdaQueryWrapper<ActiveApplet> queryWrapper1 = new LambdaQueryWrapper<>();
queryWrapper1.eq(ActiveApplet::getStoreId, TokenUtil.getNowAccountInfo().getStoreId());
queryWrapper1.eq(ActiveApplet::getActiveId,id);
queryWrapper1.eq(ActiveApplet::getType,"6");
queryWrapper1.eq(ActiveApplet::getActiveId, id);
queryWrapper1.eq(ActiveApplet::getType, "6");
ActiveApplet activeApplet = activeAppletService.getOne(queryWrapper1);
activeApplet.setIsonline(isonline);
activeAppletService.updateById(activeApplet);
}else {
} else {
newlyweds.setStatus("1");
newlyweds.setIsonline("1");
row = baseMapper.updateById(newlyweds);
LambdaQueryWrapper<ActiveApplet> queryWrapper1 = new LambdaQueryWrapper<>();
queryWrapper1.eq(ActiveApplet::getStoreId, TokenUtil.getNowAccountInfo().getStoreId());
queryWrapper1.eq(ActiveApplet::getActiveId,newlyweds.getId());
queryWrapper1.eq(ActiveApplet::getType,"6");
queryWrapper1.eq(ActiveApplet::getActiveId, newlyweds.getId());
queryWrapper1.eq(ActiveApplet::getType, "6");
ActiveApplet activeApplet = activeAppletService.getOne(queryWrapper1);
activeApplet.setIsonline(isonline);
activeAppletService.updateById(activeApplet);
@ -529,36 +531,36 @@ public class ActiveNewlywedsServiceImpl extends ServiceImpl<ActiveNewlywedsMappe
ArrayList<ActiveNewlywedsAppletVO> arrayList = new ArrayList<>();
//获取本店铺的推荐有礼活动
List<ActiveNewlywedsVO> oneByIdApplet = getOneByIdApplet(activeConsumption);
if (ObjectUtils.isNotEmpty(oneByIdApplet)){
if (ObjectUtils.isNotEmpty(oneByIdApplet)) {
for (ActiveNewlywedsVO activeNewlywedsVO : oneByIdApplet) {
ActiveNewlywedsAppletVO activeNewlywedsAppletVO = new ActiveNewlywedsAppletVO();
if (ObjectUtils.isNotEmpty(activeNewlywedsVO.getId())){
if (ObjectUtils.isNotEmpty(activeNewlywedsVO.getId())) {
//活动时间
SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy.MM.dd");
String formatSt = dateFormat.format(activeNewlywedsVO.getActiveStartTime());
String formatEd = dateFormat.format(activeNewlywedsVO.getActiveEndTime());
activeNewlywedsAppletVO.setTime(formatSt+"-" + formatEd+"");
activeNewlywedsAppletVO.setTime(formatSt + "-" + formatEd + "");
//邀请人获得
if (ObjectUtils.isNotEmpty(activeNewlywedsVO) && ObjectUtils.isNotEmpty(activeNewlywedsVO.getPoints())){
if (ObjectUtils.isNotEmpty(activeNewlywedsVO) && ObjectUtils.isNotEmpty(activeNewlywedsVO.getPoints())) {
//积分
activeNewlywedsAppletVO.setPoint(activeNewlywedsVO.getPoints().toString());
}
if (ObjectUtils.isNotEmpty(activeNewlywedsVO) && ObjectUtils.isNotEmpty(activeNewlywedsVO.getGrowthValue())){
if (ObjectUtils.isNotEmpty(activeNewlywedsVO) && ObjectUtils.isNotEmpty(activeNewlywedsVO.getGrowthValue())) {
//成长值
activeNewlywedsAppletVO.setGrowValue(activeNewlywedsVO.getGrowthValue().toString());
}
//邀请人赠送优惠券兑换券
String cardi1 = "";
String cardo1 = "";
if (CollectionUtils.isNotEmpty(activeNewlywedsVO.getActiveNewlywedsChildList())){
if (CollectionUtils.isNotEmpty(activeNewlywedsVO.getActiveNewlywedsChildList())) {
for (ActiveNewlywedsChild activeNewlywedsChild : activeNewlywedsVO.getActiveNewlywedsChildList()) {
if (activeNewlywedsChild.getActiveGift().equals("1")){
if (activeNewlywedsChild.getActiveGift().equals("1")) {
//优惠券
cardi1 += activeNewlywedsChild.getGiftCardName()+"的券("+activeNewlywedsChild.getGiftCardDetail()+");";
cardi1 += activeNewlywedsChild.getGiftCardName() + "的券(" + activeNewlywedsChild.getGiftCardDetail() + ");";
}
if (activeNewlywedsChild.getActiveGift().equals("2")){
if (activeNewlywedsChild.getActiveGift().equals("2")) {
//兑换券
cardo1 += activeNewlywedsChild.getGiftCardName()+"的券;";
cardo1 += activeNewlywedsChild.getGiftCardName() + "的券;";
}
}
}
@ -567,7 +569,7 @@ public class ActiveNewlywedsServiceImpl extends ServiceImpl<ActiveNewlywedsMappe
activeNewlywedsAppletVO.setPoint(activeNewlywedsVO.getPoints().toString());
//成长值
activeNewlywedsAppletVO.setGrowValue(activeNewlywedsVO.getGrowthValue().toString());
activeNewlywedsAppletVO.setNewlywedsActiveDescribe("欢迎各位亲朋好友参加本店的新人有礼活动,我们有丰厚的奖励哦,参加即送优惠券:"+cardi1+"兑换券:"+cardo1);
activeNewlywedsAppletVO.setNewlywedsActiveDescribe("欢迎各位亲朋好友参加本店的新人有礼活动,我们有丰厚的奖励哦,参加即送优惠券:" + cardi1 + "兑换券:" + cardo1);
arrayList.add(activeNewlywedsAppletVO);
//return activeNewlywedsAppletVO;
}
@ -580,45 +582,58 @@ public class ActiveNewlywedsServiceImpl extends ServiceImpl<ActiveNewlywedsMappe
@Override
public ActiveNewlyweds selectByStoreId() {
QueryWrapper queryWrapper = new QueryWrapper<>();
queryWrapper.eq("store_id",TokenUtil.getNowAccountInfo().getStoreId());
List<ActiveNewlyweds> list = baseMapper.selectList(queryWrapper);
ActiveNewlyweds activeNewlyweds = null;
// 查看活动是否在进行中
for (ActiveNewlyweds newlyweds : list) {
if (newlyweds.getActiveTimeType().equals("0")){
activeNewlyweds = newlyweds;
}else {
Date date = new Date();
if (newlyweds.getActiveStartTime().before(date) && newlyweds.getActiveEndTime().after(date)){
activeNewlyweds = newlyweds;
}
}
}
if (ObjectUtil.isNotEmpty(activeNewlyweds)) {
List<ActiveNewlywedsChild> activeNewlywedsChildren = activeNewlywedsChildService.selectByActiveId(activeNewlyweds.getId());
activeNewlyweds.setCouponList(activeNewlywedsChildren);
}
return activeNewlyweds;
queryWrapper.eq("store_id", TokenUtil.getNowAccountInfo().getStoreId());
queryWrapper.eq("isonline", "0");
return baseMapper.selectOne(queryWrapper);
}
@Override
public int insertActiveNewlyweds(ActiveNewlyweds activeNewlyweds) {
public boolean insertActiveNewlyweds(ActiveNewlyweds activeNewlyweds) {
// 查看是否存在活动存在则返回
ActiveNewlyweds activeNewlyweds1 = selectByStoreId();
if (ObjectUtil.isNotEmpty(activeNewlyweds1)) return 0;
if (ObjectUtil.isNotEmpty(activeNewlyweds1)) {
activeNewlyweds.setIsonline("1");
}else {
activeNewlyweds.setIsonline("0");
}
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
activeNewlyweds.setChainStoreId(nowAccountInfo.getChainStoreId());
activeNewlyweds.setStoreId(nowAccountInfo.getStoreId());
int row = baseMapper.insert(activeNewlyweds);
activeNewlyweds1 = selectByStoreId();
if (ObjectUtil.isNotEmpty(activeNewlyweds.getCouponList())){
boolean row = this.saveOrUpdate(activeNewlyweds);
if (ObjectUtil.isNotEmpty(activeNewlyweds.getCouponList())) {
// 往关联子表插入信息
for (ActiveNewlywedsChild activeNewlywedsChild : activeNewlyweds.getCouponList()) {
activeNewlywedsChild.setActiveNewlywedsId(activeNewlyweds1.getId());
activeNewlywedsChildService.save(activeNewlywedsChild);
}
}
// 往总表插入信息
ActiveApplet activeApplet = new ActiveApplet();
String discountActiveDescribe = "";
if (activeNewlyweds.getCourtesyReward().contains("0")) {
discountActiveDescribe += "赠送优惠券,";
}
if (activeNewlyweds.getCourtesyReward().contains("2")) {
discountActiveDescribe += "赠送成长值,";
}
if (activeNewlyweds.getCourtesyReward().contains("3")) {
discountActiveDescribe += "赠送积分,";
}
activeApplet.setDiscountActiveDescribe(discountActiveDescribe);
activeApplet.setGrowaValue(activeNewlyweds.getGrowthValue());
activeApplet.setPoints(activeNewlyweds.getPoints());
activeApplet.setTime(activeNewlyweds.getActiveTimeType());
activeApplet.setActiveStartTime(activeNewlyweds.getActiveStartTime());
activeApplet.setActiveEndTime(activeNewlyweds.getActiveEndTime());
activeApplet.setType("6");
activeApplet.setActiveId(activeNewlyweds.getId());
activeApplet.setName(activeNewlyweds.getName());
activeApplet.setIsonline(activeNewlyweds.getIsonline());
activeApplet.setActiveStatus(activeNewlyweds.getIsonline().equals("0") ? "1":"2");
activeAppletService.insertActiveApplet(activeApplet);
return row;
}
@ -627,7 +642,7 @@ public class ActiveNewlywedsServiceImpl extends ServiceImpl<ActiveNewlywedsMappe
int row = baseMapper.updateById(activeNewlyweds);
activeNewlywedsChildService.deleteByActiveId(activeNewlyweds.getId());
if (ObjectUtil.isNotEmpty(activeNewlyweds.getCouponList())){
if (ObjectUtil.isNotEmpty(activeNewlyweds.getCouponList())) {
for (ActiveNewlywedsChild activeNewlywedsChild : activeNewlyweds.getCouponList()) {
activeNewlywedsChild.setActiveNewlywedsId(activeNewlyweds.getId());
activeNewlywedsChildService.save(activeNewlywedsChild);
@ -638,10 +653,11 @@ public class ActiveNewlywedsServiceImpl extends ServiceImpl<ActiveNewlywedsMappe
/**
* 数组转字符串
*
* @param array
* @return
*/
public static String arrayToString(String[] array){
public static String arrayToString(String[] array) {
String result = "";
for (String s : array) {
result += s + ",";

View File

@ -93,6 +93,10 @@ public class ActivePopUp extends BaseEntity implements Serializable {
* 总参与次数
*/
private Integer assembleNum;
/**
* 是否在线 0在线 1 下线
*/
private String isonline;
/**
* 创建者
*/

View File

@ -3,6 +3,8 @@ package com.fuint.business.marketingActivity.activePopUp.service.impl;
import cn.hutool.core.util.ObjectUtil;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.fuint.business.marketingActivity.activeApplet.entity.ActiveApplet;
import com.fuint.business.marketingActivity.activeApplet.service.ActiveAppletService;
import com.fuint.business.marketingActivity.activePopUp.entity.ActivePopUp;
import com.fuint.business.marketingActivity.activePopUp.entity.ActivePopUpChild;
import com.fuint.business.marketingActivity.activePopUp.mapper.ActivePopUpMapper;
@ -27,6 +29,8 @@ public class ActivePopUpServiceImpl extends ServiceImpl<ActivePopUpMapper,Active
@Autowired
private ActivePopUpChildService activePopUpChildService;
@Autowired
private ActiveAppletService activeAppletService;
/**
* 通过ID查询单条数据
@ -47,20 +51,42 @@ public class ActivePopUpServiceImpl extends ServiceImpl<ActivePopUpMapper,Active
*/
@Override
public int insert(ActivePopUp activePopUp) {
ActivePopUp activePopUp1 = this.selectByStoreId();
if (ObjectUtil.isNotEmpty(activePopUp1)) return 0;
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
activePopUp.setChainStoreId(nowAccountInfo.getChainStoreId());
activePopUp.setStoreId(nowAccountInfo.getStoreId());
activePopUp.setIsonline("0");
int row = baseMapper.insert(activePopUp);
activePopUp1 = this.selectByStoreId();
if (ObjectUtil.isNotEmpty(activePopUp1) && ObjectUtil.isNotEmpty(activePopUp.getCouponList())){
// 往子表插入信息
if (ObjectUtil.isNotEmpty(activePopUp.getCouponList())){
for (ActivePopUpChild activePopUpChild : activePopUp.getCouponList()) {
activePopUpChild.setActivePopUpId(activePopUp1.getId());
activePopUpChild.setActivePopUpId(activePopUp.getId());
activePopUpChildService.insert(activePopUpChild);
}
}
// 往总表插入信息
ActiveApplet activeApplet = new ActiveApplet();
String discountActiveDescribe = "";
if (activePopUp.getCourtesyReward().contains("0")) {
discountActiveDescribe += "赠送优惠券,";
}
if (activePopUp.getCourtesyReward().contains("2")) {
discountActiveDescribe += "赠送成长值,";
}
if (activePopUp.getCourtesyReward().contains("3")) {
discountActiveDescribe += "赠送积分,";
}
activeApplet.setDiscountActiveDescribe(discountActiveDescribe);
activeApplet.setTime(activePopUp.getActiveTimeType());
activeApplet.setActiveStartTime(activePopUp.getActiveStartTime());
activeApplet.setActiveEndTime(activePopUp.getActiveEndTime());
activeApplet.setType("10");
activeApplet.setAdaptUserType(activePopUp.getUserGradeIds());
activeApplet.setActiveId(activePopUp.getId());
activeApplet.setName(activePopUp.getName());
activeApplet.setIsonline(activePopUp.getIsonline());
activeApplet.setActiveStatus(activePopUp.getIsonline().equals("0") ? "1":"2");
activeAppletService.insertActiveApplet(activeApplet);
return row;
}

View File

@ -68,6 +68,10 @@ public class ActiveSubPrice extends Model<ActiveSubPrice> {
private Integer monthLimitNum ;
/** 每人累计参与限制次数 */
private Integer limitNum ;
/**
* 是否在线 0在线 1 下线
*/
private String isonline;
/** 创建人 */
private String createBy ;
/** 创建时间 */

View File

@ -3,6 +3,8 @@ package com.fuint.business.marketingActivity.activePrice.service.impl;
import cn.hutool.core.util.ObjectUtil;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.fuint.business.marketingActivity.activeApplet.entity.ActiveApplet;
import com.fuint.business.marketingActivity.activeApplet.service.ActiveAppletService;
import com.fuint.business.marketingActivity.activePrice.entity.ActiveSubPrice;
import com.fuint.business.marketingActivity.activePrice.entity.ActiveSubPriceRule;
import com.fuint.business.marketingActivity.activePrice.mapper.ActiveSubPriceMapper;
@ -14,6 +16,7 @@ import com.fuint.business.marketingActivity.activePrice.vo.ActiveSubPriceSaveVO;
import com.fuint.common.dto.AccountInfo;
import com.fuint.common.util.TokenUtil;
import com.fuint.quartz.util.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.util.Date;
@ -34,6 +37,8 @@ public class ActiveSubPriceServiceImpl extends ServiceImpl<ActiveSubPriceMapper,
private ActiveSubPriceRuleService activeSubPriceRuleService;
@Resource
private ActPriceUtil actPriceUtil;
@Autowired
private ActiveAppletService activeAppletService;
/**
* 根据立减优惠活动id查询详细内容
@ -80,6 +85,30 @@ public class ActiveSubPriceServiceImpl extends ServiceImpl<ActiveSubPriceMapper,
//保存子表信息
activeSubPriceRuleService.saveActiveSubPriceRule(activeSubPrice.getId(),saveVO.getOrderList());
activeSubPriceRuleService.saveActiveSubPriceRule(activeSubPrice.getId(),saveVO.getRefuelList());
if (isAdd){
// 往总表插入信息
ActiveApplet activeApplet = new ActiveApplet();
String discountActiveDescribe = "";
if (activeSubPrice.getOfferType().contains("0")) {
discountActiveDescribe += "立减优惠,";
}
if (activeSubPrice.getOfferType().contains("1")) {
discountActiveDescribe += "活动优惠,";
}
activeApplet.setDiscountActiveDescribe(discountActiveDescribe);
activeApplet.setTime(activeSubPrice.getActiveTimeType());
activeApplet.setActiveStartTime(activeSubPrice.getActiveStartTime());
activeApplet.setActiveEndTime(activeSubPrice.getActiveEndTime());
activeApplet.setType("3");
activeApplet.setAdaptUserType(activeSubPrice.getLevelId());
activeApplet.setActiveId(activeSubPrice.getId());
activeApplet.setName(activeSubPrice.getActiveName());
activeApplet.setIsonline(activeSubPrice.getIsonline());
activeApplet.setActiveStatus(activeSubPrice.getIsonline().equals("0") ? "1":"2");
activeAppletService.insertActiveApplet(activeApplet);
}
//转换日志保存内容
String content = actPriceUtil.transActLogContent(isAdd ? LOG_OPERATE_ADD : LOG_OPERATE_UPDATE,
LOG_SYSTEM_MODULE_LJYH,

View File

@ -83,10 +83,6 @@ public class ActiveRecommendServiceImpl extends ServiceImpl<ActiveRecommendMappe
@Override
@Transactional
public Boolean add(ActiveRecommendDTO activeRecommendDTO) {
ActiveRecommend activeRecommend1 = this.selectByStoreId();
if (ObjectUtil.isNotEmpty(activeRecommend1)){
return false;
}
boolean save = false;
ActiveApplet activeApplet = new ActiveApplet();
@ -583,42 +579,53 @@ public class ActiveRecommendServiceImpl extends ServiceImpl<ActiveRecommendMappe
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
QueryWrapper queryWrapper = new QueryWrapper();
queryWrapper.eq("store_id", nowAccountInfo.getStoreId());
List<ActiveRecommend> list = baseMapper.selectList(queryWrapper);
ActiveRecommend activeRecommend = null;
for (ActiveRecommend activeRecommend1 : list) {
if (activeRecommend1.getActiveTimeType().equals("0")){
activeRecommend = activeRecommend1;
}else {
Date date = new Date();
if (activeRecommend1.getActiveStartTime().before(date) && activeRecommend1.getActiveEndTime().after(date)){
activeRecommend = activeRecommend1;
}
}
}
if (ObjectUtil.isNotEmpty(activeRecommend)){
List<ActiveRecommendChild> activeRecommendChildren = activeRecommendChildService.selectList(activeRecommend.getId());
activeRecommend.setCouponList(activeRecommendChildren);
}
return activeRecommend;
queryWrapper.eq("isonline", "0");
return baseMapper.selectOne(queryWrapper);
}
@Override
public int insertActiveRecommend(ActiveRecommend activeRecommend) {
ActiveRecommend activeRecommend1 = this.selectByStoreId();
if (ObjectUtil.isNotEmpty(activeRecommend1)){
return 0;
activeRecommend.setIsonline("1");
}else {
activeRecommend.setIsonline("0");
}
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
activeRecommend.setChainStoreId(nowAccountInfo.getChainStoreId());
activeRecommend.setStoreId(nowAccountInfo.getStoreId());
int row = baseMapper.insert(activeRecommend);
activeRecommend1 = this.selectByStoreId();
// 往子表插入信息
if (ObjectUtil.isNotEmpty(activeRecommend.getCouponList())){
for (ActiveRecommendChild activeRecommendChild : activeRecommend.getCouponList()) {
activeRecommendChild.setActiveRecommendId(activeRecommend1.getId());
activeRecommendChild.setActiveRecommendId(activeRecommend.getId());
activeRecommendChildService.save(activeRecommendChild);
}
}
// 往总表插入信息
ActiveApplet activeApplet = new ActiveApplet();
String discountActiveDescribe = "";
if (activeRecommend.getRewardDisplay().contains("0")) {
discountActiveDescribe += "赠送优惠券,";
}
if (activeRecommend.getRewardDisplay().contains("2")) {
discountActiveDescribe += "赠送成长值,";
}
if (activeRecommend.getRewardDisplay().contains("3")) {
discountActiveDescribe += "赠送积分,";
}
activeApplet.setDiscountActiveDescribe(discountActiveDescribe);
activeApplet.setTime(activeRecommend.getActiveTimeType());
activeApplet.setActiveStartTime(activeRecommend.getActiveStartTime());
activeApplet.setActiveEndTime(activeRecommend.getActiveEndTime());
activeApplet.setType("7");
activeApplet.setActiveId(activeRecommend.getId());
activeApplet.setName(activeRecommend.getActiveName());
activeApplet.setIsonline(activeRecommend.getIsonline());
activeApplet.setActiveStatus(activeRecommend.getIsonline().equals("0") ? "1":"2");
activeAppletService.insertActiveApplet(activeApplet);
return row;
}

View File

@ -86,6 +86,10 @@ public class ActiveUserConsume extends BaseEntity implements Serializable {
* 赠送成长值
*/
private Integer growthValue;
/**
* 是否在线 0在线 1 下线
*/
private String isonline;
/**
* 创建者
*/

View File

@ -3,6 +3,8 @@ package com.fuint.business.marketingActivity.activeUserConsume.service.impl;
import cn.hutool.core.util.ObjectUtil;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.fuint.business.marketingActivity.activeApplet.entity.ActiveApplet;
import com.fuint.business.marketingActivity.activeApplet.service.ActiveAppletService;
import com.fuint.business.marketingActivity.activeUserConsume.entity.ActiveUserConsume;
import com.fuint.business.marketingActivity.activeUserConsume.entity.ActiveUserConsumeChild;
import com.fuint.business.marketingActivity.activeUserConsume.mapper.ActiveUserConsumeMapper;
@ -27,6 +29,8 @@ public class ActiveUserConsumeServiceImpl extends ServiceImpl<ActiveUserConsumeM
@Autowired
private ActiveUserConsumeChildService activeUserConsumeChildService;
@Autowired
private ActiveAppletService activeAppletService;
/**
* 通过ID查询单条数据
@ -47,20 +51,42 @@ public class ActiveUserConsumeServiceImpl extends ServiceImpl<ActiveUserConsumeM
*/
@Override
public int insert(ActiveUserConsume activeUserConsume) {
ActiveUserConsume activeUserConsume1 = this.selectByStoreId();
if (ObjectUtil.isNotEmpty(activeUserConsume1)) return 0;
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
activeUserConsume.setChainStoreId(nowAccountInfo.getChainStoreId());
activeUserConsume.setStoreId(nowAccountInfo.getStoreId());
activeUserConsume.setIsonline("0");
int row = baseMapper.insert(activeUserConsume);
activeUserConsume1 = this.selectByStoreId();
if (ObjectUtil.isNotEmpty(activeUserConsume1) && ObjectUtil.isNotEmpty(activeUserConsume.getCouponList())) {
// 往子表插入信息
if (ObjectUtil.isNotEmpty(activeUserConsume.getCouponList())) {
for (ActiveUserConsumeChild activeUserConsumeChild : activeUserConsume.getCouponList()) {
activeUserConsumeChild.setActiveUserConsumeId(activeUserConsume1.getId());
activeUserConsumeChild.setActiveUserConsumeId(activeUserConsume.getId());
activeUserConsumeChildService.insert(activeUserConsumeChild);
}
}
// 往总表插入信息
ActiveApplet activeApplet = new ActiveApplet();
String discountActiveDescribe = "";
if (activeUserConsume.getCourtesyReward().contains("0")) {
discountActiveDescribe += "赠送优惠券,";
}
if (activeUserConsume.getCourtesyReward().contains("2")) {
discountActiveDescribe += "赠送成长值,";
}
if (activeUserConsume.getCourtesyReward().contains("3")) {
discountActiveDescribe += "赠送积分,";
}
activeApplet.setDiscountActiveDescribe(discountActiveDescribe);
activeApplet.setTime(activeUserConsume.getActiveTimeType());
activeApplet.setActiveStartTime(activeUserConsume.getActiveStartTime());
activeApplet.setActiveEndTime(activeUserConsume.getActiveEndTime());
activeApplet.setType("9");
activeApplet.setAdaptUserType(activeUserConsume.getUserGradeIds());
activeApplet.setActiveId(activeUserConsume.getId());
activeApplet.setName(activeUserConsume.getName());
activeApplet.setIsonline(activeUserConsume.getIsonline());
activeApplet.setActiveStatus(activeUserConsume.getIsonline().equals("0") ? "1":"2");
activeAppletService.insertActiveApplet(activeApplet);
return row;
}

View File

@ -78,6 +78,10 @@ public class ActiveUserRecharge extends BaseEntity implements Serializable {
* 赠送成长值
*/
private Integer growthValue;
/**
* 是否在线 0在线 1 下线
*/
private String isonline;
/**
* 创建者
*/

View File

@ -3,6 +3,8 @@ package com.fuint.business.marketingActivity.activeUserRecharge.service.impl;
import cn.hutool.core.util.ObjectUtil;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.fuint.business.marketingActivity.activeApplet.entity.ActiveApplet;
import com.fuint.business.marketingActivity.activeApplet.service.ActiveAppletService;
import com.fuint.business.marketingActivity.activeUserRecharge.entity.ActiveUserRecharge;
import com.fuint.business.marketingActivity.activeUserRecharge.entity.ActiveUserRechargeChild;
import com.fuint.business.marketingActivity.activeUserRecharge.mapper.ActiveUserRechargeMapper;
@ -27,6 +29,8 @@ public class ActiveUserRechargeServiceImpl extends ServiceImpl<ActiveUserRecharg
@Autowired
private ActiveUserRechargeChildService activeUserRechargeChildService;
@Autowired
private ActiveAppletService activeAppletService;
/**
* 通过ID查询单条数据
@ -47,20 +51,44 @@ public class ActiveUserRechargeServiceImpl extends ServiceImpl<ActiveUserRecharg
*/
@Override
public int insert(ActiveUserRecharge activeUserRecharge) {
ActiveUserRecharge activeUserRecharge1 = this.selectByStoreId();
if (ObjectUtil.isNotEmpty(activeUserRecharge1)) return 0;
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
activeUserRecharge.setChainStoreId(nowAccountInfo.getChainStoreId());
activeUserRecharge.setStoreId(nowAccountInfo.getStoreId());
activeUserRecharge.setIsonline("0");
int row = baseMapper.insert(activeUserRecharge);
activeUserRecharge1 = this.selectByStoreId();
if (ObjectUtil.isNotEmpty(activeUserRecharge1) && ObjectUtil.isNotEmpty(activeUserRecharge.getCouponList())) {
// 往子表插入信息
if (ObjectUtil.isNotEmpty(activeUserRecharge.getCouponList())) {
for (ActiveUserRechargeChild activeUserRechargeChild : activeUserRecharge.getCouponList()) {
activeUserRechargeChild.setActiveUserRechargeId(activeUserRecharge1.getId());
activeUserRechargeChild.setActiveUserRechargeId(activeUserRecharge.getId());
activeUserRechargeChildService.insert(activeUserRechargeChild);
}
}
// 往总表插入信息
ActiveApplet activeApplet = new ActiveApplet();
String discountActiveDescribe = "";
if (activeUserRecharge.getCourtesyReward().contains("0")) {
discountActiveDescribe += "赠送优惠券,";
}
if (activeUserRecharge.getCourtesyReward().contains("2")) {
discountActiveDescribe += "赠送成长值,";
}
if (activeUserRecharge.getCourtesyReward().contains("3")) {
discountActiveDescribe += "赠送积分,";
}
activeApplet.setDiscountActiveDescribe(discountActiveDescribe);
activeApplet.setTime(activeUserRecharge.getActiveTimeType());
activeApplet.setActiveStartTime(activeUserRecharge.getActiveStartTime());
activeApplet.setActiveEndTime(activeUserRecharge.getActiveEndTime());
activeApplet.setType("8");
activeApplet.setAdaptUserType(activeUserRecharge.getUserGradeIds());
activeApplet.setActiveId(activeUserRecharge.getId());
activeApplet.setName(activeUserRecharge.getName());
activeApplet.setIsonline(activeUserRecharge.getIsonline());
activeApplet.setActiveStatus(activeUserRecharge.getIsonline().equals("0") ? "1":"2");
activeAppletService.insertActiveApplet(activeApplet);
return row;
}