This commit is contained in:
cun-nan 2024-09-02 17:45:07 +08:00
parent a313676211
commit 8b3f12f51d
16 changed files with 863 additions and 1104 deletions

View File

@ -3,6 +3,193 @@
<component name="EasyCodeTableSetting">
<option name="tableInfoMap">
<map>
<entry key="oilsystem.active_birthday">
<value>
<TableInfoDTO>
<option name="comment" value="生日有礼表" />
<option name="fullColumn">
<list>
<ColumnInfoDTO>
<option name="comment" value="主键" />
<option name="custom" value="false" />
<option name="ext" value="{}" />
<option name="name" value="id" />
<option name="type" value="java.lang.Integer" />
</ColumnInfoDTO>
<ColumnInfoDTO>
<option name="comment" value="活动名称" />
<option name="custom" value="false" />
<option name="ext" value="{}" />
<option name="name" value="name" />
<option name="type" value="java.lang.String" />
</ColumnInfoDTO>
<ColumnInfoDTO>
<option name="comment" value="活动时间类型0永久有效1自定义" />
<option name="custom" value="false" />
<option name="ext" value="{}" />
<option name="name" value="activeTimeType" />
<option name="type" value="java.lang.String" />
</ColumnInfoDTO>
<ColumnInfoDTO>
<option name="comment" value="活动开始时间" />
<option name="custom" value="false" />
<option name="ext" value="{}" />
<option name="name" value="activeStartTime" />
<option name="type" value="java.util.Date" />
</ColumnInfoDTO>
<ColumnInfoDTO>
<option name="comment" value="活动结束时间" />
<option name="custom" value="false" />
<option name="ext" value="{}" />
<option name="name" value="activeEndTime" />
<option name="type" value="java.util.Date" />
</ColumnInfoDTO>
<ColumnInfoDTO>
<option name="comment" value="通知内容" />
<option name="custom" value="false" />
<option name="ext" value="{}" />
<option name="name" value="noticeContent" />
<option name="type" value="java.lang.String" />
</ColumnInfoDTO>
<ColumnInfoDTO>
<option name="comment" value="活动详情" />
<option name="custom" value="false" />
<option name="ext" value="{}" />
<option name="name" value="activityDetails" />
<option name="type" value="java.lang.String" />
</ColumnInfoDTO>
<ColumnInfoDTO>
<option name="comment" value="活动奖品 0优惠券 2成长值 3积分" />
<option name="custom" value="false" />
<option name="ext" value="{}" />
<option name="name" value="courtesyReward" />
<option name="type" value="java.lang.String" />
</ColumnInfoDTO>
<ColumnInfoDTO>
<option name="comment" value="赠送积分" />
<option name="custom" value="false" />
<option name="ext" value="{}" />
<option name="name" value="points" />
<option name="type" value="java.lang.Integer" />
</ColumnInfoDTO>
<ColumnInfoDTO>
<option name="comment" value="赠送成长值" />
<option name="custom" value="false" />
<option name="ext" value="{}" />
<option name="name" value="growthValue" />
<option name="type" value="java.lang.Integer" />
</ColumnInfoDTO>
<ColumnInfoDTO>
<option name="comment" value="创建者" />
<option name="custom" value="false" />
<option name="ext" value="{}" />
<option name="name" value="createBy" />
<option name="type" value="java.lang.String" />
</ColumnInfoDTO>
<ColumnInfoDTO>
<option name="comment" value="创建时间" />
<option name="custom" value="false" />
<option name="ext" value="{}" />
<option name="name" value="createTime" />
<option name="type" value="java.util.Date" />
</ColumnInfoDTO>
<ColumnInfoDTO>
<option name="comment" value="更新者" />
<option name="custom" value="false" />
<option name="ext" value="{}" />
<option name="name" value="updateBy" />
<option name="type" value="java.lang.String" />
</ColumnInfoDTO>
<ColumnInfoDTO>
<option name="comment" value="更新时间" />
<option name="custom" value="false" />
<option name="ext" value="{}" />
<option name="name" value="updateTime" />
<option name="type" value="java.util.Date" />
</ColumnInfoDTO>
</list>
</option>
<option name="name" value="ActiveBirthday" />
<option name="preName" value="" />
<option name="saveModelName" value="fuint-application" />
<option name="savePackageName" value="com.fuint.business.marketingActivity.activeBirthday" />
<option name="savePath" value="./fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/activeBirthday" />
<option name="templateGroupName" value="Default" />
</TableInfoDTO>
</value>
</entry>
<entry key="oilsystem.active_birthday_child">
<value>
<TableInfoDTO>
<option name="fullColumn">
<list>
<ColumnInfoDTO>
<option name="comment" value="主键" />
<option name="custom" value="false" />
<option name="ext" value="{}" />
<option name="name" value="id" />
<option name="type" value="java.lang.Integer" />
</ColumnInfoDTO>
<ColumnInfoDTO>
<option name="comment" value="生日活动id" />
<option name="custom" value="false" />
<option name="ext" value="{}" />
<option name="name" value="activeBirthdayId" />
<option name="type" value="java.lang.Integer" />
</ColumnInfoDTO>
<ColumnInfoDTO>
<option name="comment" value="券id" />
<option name="custom" value="false" />
<option name="ext" value="{}" />
<option name="name" value="vouchersId" />
<option name="type" value="java.lang.Integer" />
</ColumnInfoDTO>
<ColumnInfoDTO>
<option name="comment" value="券数量" />
<option name="custom" value="false" />
<option name="ext" value="{}" />
<option name="name" value="giftCardTotal" />
<option name="type" value="java.lang.Integer" />
</ColumnInfoDTO>
<ColumnInfoDTO>
<option name="comment" value="创建者" />
<option name="custom" value="false" />
<option name="ext" value="{}" />
<option name="name" value="createBy" />
<option name="type" value="java.lang.String" />
</ColumnInfoDTO>
<ColumnInfoDTO>
<option name="comment" value="创建时间" />
<option name="custom" value="false" />
<option name="ext" value="{}" />
<option name="name" value="createTime" />
<option name="type" value="java.util.Date" />
</ColumnInfoDTO>
<ColumnInfoDTO>
<option name="comment" value="更新者" />
<option name="custom" value="false" />
<option name="ext" value="{}" />
<option name="name" value="updateBy" />
<option name="type" value="java.lang.String" />
</ColumnInfoDTO>
<ColumnInfoDTO>
<option name="comment" value="更新时间" />
<option name="custom" value="false" />
<option name="ext" value="{}" />
<option name="name" value="updateTime" />
<option name="type" value="java.util.Date" />
</ColumnInfoDTO>
</list>
</option>
<option name="name" value="ActiveBirthdayChild" />
<option name="preName" value="" />
<option name="saveModelName" value="fuint-application" />
<option name="savePackageName" value="com.fuint.business.marketingActivity.activeBirthday" />
<option name="savePath" value="./fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/activeBirthday" />
<option name="templateGroupName" value="Default" />
</TableInfoDTO>
</value>
</entry>
<entry key="oilsystem.open_card_gift">
<value>
<TableInfoDTO>

View File

@ -0,0 +1,28 @@
import request from '@/utils/request'
export function getActiveBirthday() {
return request({
url: 'activeBirthday/getInfo',
method: 'get',
})
}
export function addActiveBirthday(data) {
return request({
url: 'activeBirthday',
method: 'post',
data:data
})
}
export function editActiveBirthday(data) {
return request({
url: 'activeBirthday',
method: 'put',
data:data
})
}
export function deleteActiveBirthday(id) {
return request({
url: 'activeBirthday/'+id,
method: 'delete',
})
}

View File

@ -1,546 +1,8 @@
<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="120px" style="width: 70%;margin: 0 auto">
<el-form-item label="活动名称" prop="name">
<el-input v-model="ruleForm.name"></el-input>
</el-form-item>
@ -569,6 +31,11 @@
</el-date-picker>
</div>
</el-form-item>
<el-form-item label="提前赠送天数" prop="advanceGiveDay">
<el-input v-model="ruleForm.advanceGiveDay"
placeholder="请输入赠送天数"></el-input>
<span style="font-size: 12px;color: grey">设置生日有礼赠送时间:0表示会员生日当天赠送1表示提前1天赠送2表示提前2天赠送以此类推最多提前30天</span>
</el-form-item>
<el-form-item label="通知内容" prop="noticeContent">
<div>
<el-button type="text" @click="ifWrite = !ifWrite">编辑</el-button>
@ -579,6 +46,15 @@
<el-form-item label="活动详情" prop="activityDetails">
<el-input type="textarea" v-model="ruleForm.activityDetails" placeholder="请输入活动详情"></el-input>
</el-form-item>
<el-form-item label="适用会员等级" prop="userGradeId">
<el-select v-model="ruleForm.userGradeId" clearable placeholder="请选择会员等级" style="width: 100%">
<el-option
v-for="(item,index) in userGradeList"
:label="item.name"
:value="item.id.toString()"
:key="index"></el-option>
</el-select>
</el-form-item>
<el-form-item label="活动奖品" prop="courtesyReward">
<div style="display: flex">
<div style="width: 17%">
@ -661,6 +137,8 @@ import {
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";
export default {
name: "ActiveNewlyweds",
@ -747,6 +225,7 @@ export default {
couponList: [],
//
cardCouponList:[],
userGradeList: [],
//
rules: {
name: [
@ -755,12 +234,18 @@ export default {
activeTimeType: [
{required: true, message: '活动时间不能为空', trigger: 'blur'},
],
advanceGiveDay: [
{required: true, message: '提前赠送天数不能为空', trigger: 'blur'},
],
noticeContent: [
{required: true, message: '通知内容不能为空', trigger: 'blur'},
],
activityDetails: [
{required: true, message: '活动详情不能为空', trigger: 'blur'},
],
userGradeId: [
{required: true, message: '适用会员等级不能为空', trigger: 'blur'},
],
courtesyReward: [
{required: true, message: '活动奖品不能为空', trigger: 'blur'},
],
@ -771,15 +256,23 @@ export default {
// this.getList()
this.getInfo()
this.getCardCoupon()
this.listUserGrade()
},
methods: {
listUserGrade() {
listUserGrade({page:1,pageSize:1000}).then(res => {
if (res.code == 200) {
this.userGradeList = res.data.records
}
})
},
getCardCoupon(){
listCardCoupon({status:1,putType:1}).then(res => {
this.cardCouponList = res.data.records
})
},
getInfo(){
getInfoActiveNewlyweds().then(res => {
getActiveBirthday().then(res => {
if (res.data) {
this.ruleForm = res.data
if (res.data.courtesyReward) this.ruleForm.courtesyReward = res.data.courtesyReward.split(",")
@ -821,12 +314,12 @@ export default {
if (this.ruleForm.courtesyReward) this.ruleForm.courtesyReward = this.ruleForm.courtesyReward.toString()
if (this.couponList) this.ruleForm.couponList = this.couponList
if (this.ruleForm.id) {
editActiveNewlyweds1(this.ruleForm).then(response => {
editActiveBirthday(this.ruleForm).then(response => {
this.$modal.msgSuccess("修改成功");
this.getInfo()
});
}else {
insertActiveNewlyweds(this.ruleForm).then(response => {
addActiveBirthday(this.ruleForm).then(response => {
this.$modal.msgSuccess("新增成功");
this.getInfo()
});

View File

@ -1,548 +1,10 @@
<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-item label="活动名称" prop="name">
<el-input v-model="ruleForm.name"></el-input>
<el-form-item label="活动名称" prop="activeName">
<el-input v-model="ruleForm.activeName"></el-input>
</el-form-item>
<el-form-item label="活动时间" prop="activeTimeType">
<div class="d-s">
@ -579,10 +41,10 @@
<el-form-item label="活动详情" prop="activityDetails">
<el-input type="textarea" v-model="ruleForm.activityDetails" placeholder="请输入活动详情"></el-input>
</el-form-item>
<el-form-item label="活动奖品" prop="courtesyReward">
<el-form-item label="活动奖品" prop="rewardDisplay">
<div style="display: flex">
<div style="width: 17%">
<el-checkbox-group v-model="ruleForm.courtesyReward">
<el-checkbox-group v-model="ruleForm.rewardDisplay">
<div>
<el-checkbox label="3" name="type">赠送积分</el-checkbox>
</div>
@ -649,18 +111,16 @@ 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 {
getActiveRecommendInfo,
insertActiveRecommend,
updateActiveRecommend1
} from "@/api/EventMarketing/activeRecommend";
export default {
name: "ActiveNewlyweds",
@ -738,7 +198,10 @@ export default {
activeNewlywedsChildList: [],
},
ruleForm: {},
ruleForm: {
activeTimeType:0,
rewardDisplay:[]
},
ifWrite: true,
tindex1: 0,
activityTimeTypeList: [
@ -749,7 +212,7 @@ export default {
cardCouponList:[],
//
rules: {
name: [
activeName: [
{required: true, message: '活动名称不能为空', trigger: 'blur'},
],
activeTimeType: [
@ -761,7 +224,7 @@ export default {
activityDetails: [
{required: true, message: '活动详情不能为空', trigger: 'blur'},
],
courtesyReward: [
rewardDisplay: [
{required: true, message: '活动奖品不能为空', trigger: 'blur'},
],
}
@ -779,16 +242,20 @@ export default {
})
},
getInfo(){
getInfoActiveNewlyweds().then(res => {
getActiveRecommendInfo().then(res => {
if (res.data) {
this.ruleForm = res.data
if (res.data.courtesyReward) this.ruleForm.courtesyReward = res.data.courtesyReward.split(",")
if (res.data.rewardDisplay) {
this.ruleForm.rewardDisplay = res.data.rewardDisplay.split(",")
}else {
this.ruleForm.rewardDisplay = []
}
if (res.data.activeTimeType) this.tindex1 = res.data.activeTimeType
if (res.data.couponList) this.couponList = res.data.couponList
}else {
this.ruleForm = {
activeTimeType:0,
courtesyReward:[]
rewardDisplay:[]
}
this.tindex1 = 0
}
@ -818,15 +285,15 @@ export default {
}
this.$refs[formName].validate((valid) => {
if (valid) {
if (this.ruleForm.courtesyReward) this.ruleForm.courtesyReward = this.ruleForm.courtesyReward.toString()
if (this.ruleForm.rewardDisplay) this.ruleForm.rewardDisplay = this.ruleForm.rewardDisplay.toString()
if (this.couponList) this.ruleForm.couponList = this.couponList
if (this.ruleForm.id) {
editActiveNewlyweds1(this.ruleForm).then(response => {
updateActiveRecommend1(this.ruleForm).then(response => {
this.$modal.msgSuccess("修改成功");
this.getInfo()
});
}else {
insertActiveNewlyweds(this.ruleForm).then(response => {
insertActiveRecommend(this.ruleForm).then(response => {
this.$modal.msgSuccess("新增成功");
this.getInfo()
});

View File

@ -0,0 +1,81 @@
package com.fuint.business.marketingActivity.activeBirthday.controller;
import com.fuint.business.marketingActivity.activeBirthday.entity.ActiveBirthday;
import com.fuint.business.marketingActivity.activeBirthday.service.ActiveBirthdayService;
import com.fuint.framework.web.BaseController;
import com.fuint.framework.web.ResponseObject;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
/**
* 油机汽机配置(ActiveBirthday)表控制层
*
* @author makejava
* @since 2024-07-31 14:59:04
*/
@RestController
@RequestMapping("activeBirthday")
public class ActiveBirthdayController extends BaseController {
/**
* 服务对象
*/
@Resource
private ActiveBirthdayService activeBirthdayService;
/**
* 通过主键查询单条数据
*
* @param id 主键
* @return 单条数据
*/
@GetMapping("{id}")
public ResponseObject queryById(@PathVariable("id") Integer id) {
return getSuccessResult(activeBirthdayService.queryById(id));
}
/**
* 通过主键查询单条数据
*
* @return 单条数据
*/
@GetMapping("getInfo")
public ResponseObject queryByStoreId() {
return getSuccessResult(activeBirthdayService.selectByStoreId());
}
/**
* 新增数据
*
* @param activeBirthday 实体
* @return 新增结果
*/
@PostMapping
public ResponseObject add(@RequestBody ActiveBirthday activeBirthday) {
return getSuccessResult(activeBirthdayService.insert(activeBirthday));
}
/**
* 编辑数据
*
* @param activeBirthday 实体
* @return 编辑结果
*/
@PutMapping
public ResponseObject edit(@RequestBody ActiveBirthday activeBirthday) {
return getSuccessResult(activeBirthdayService.update(activeBirthday));
}
/**
* 删除数据
*
* @param id 主键
* @return 删除是否成功
*/
@DeleteMapping("{id}")
public ResponseObject deleteById(@PathVariable Integer id) {
return getSuccessResult(activeBirthdayService.deleteById(id));
}
}

View File

@ -0,0 +1,108 @@
package com.fuint.business.marketingActivity.activeBirthday.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fuint.framework.entity.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.util.Date;
import java.io.Serializable;
import java.util.List;
/**
* 生日有礼表(ActiveBirthday)实体类
*
* @author makejava
* @since 2024-09-02 15:34:04
*/
@Data
@TableName("active_birthday")
@ApiModel(value = "ActiveBirthday", description = "生日有礼表")
public class ActiveBirthday extends BaseEntity implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 主键
*/
@ApiModelProperty("自增ID")
@TableId(value = "ID", type = IdType.AUTO)
private Integer id;
/**
* 所属连锁店id
*/
private Integer chainStoreId;
/**
* 所属店铺id
*/
private Integer storeId;
/**
* 活动名称
*/
private String name;
/**
* 活动时间类型0永久有效1自定义
*/
private String activeTimeType;
/**
* 活动开始时间
*/
private Date activeStartTime;
/**
* 活动结束时间
*/
private Date activeEndTime;
/**
* 提前赠送天数
*/
private Integer advanceGiveDay;
/**
* 适用会员等级
*/
private Integer userGradeId;
/**
* 通知内容
*/
private String noticeContent;
/**
* 活动详情
*/
private String activityDetails;
/**
* 活动奖品 0优惠券 2成长值 3积分
*/
private String courtesyReward;
/**
* 赠送积分
*/
private Integer points;
/**
* 赠送成长值
*/
private Integer growthValue;
/**
* 创建者
*/
private String createBy;
/**
* 创建时间
*/
private Date createTime;
/**
* 更新者
*/
private String updateBy;
/**
* 更新时间
*/
private Date updateTime;
/**
*
*/
@TableField(exist = false)
private List<ActiveBirthdayChild> couponList;
}

View File

@ -0,0 +1,61 @@
package com.fuint.business.marketingActivity.activeBirthday.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fuint.framework.entity.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.util.Date;
import java.io.Serializable;
/**
* 生日有礼子表(ActiveBirthdayChild)实体类
*
* @author makejava
* @since 2024-09-02 15:36:42
*/
@Data
@TableName("active_birthday_child")
@ApiModel(value = "ActiveBirthdayChild", description = "生日有礼子表")
public class ActiveBirthdayChild extends BaseEntity implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 主键
*/
@ApiModelProperty("自增ID")
@TableId(value = "ID", type = IdType.AUTO)
private Integer id;
/**
* 生日活动id
*/
private Integer activeBirthdayId;
/**
* 券id
*/
private Integer vouchersId;
/**
* 券数量
*/
private Integer giftCardTotal;
/**
* 创建者
*/
private String createBy;
/**
* 创建时间
*/
private Date createTime;
/**
* 更新者
*/
private String updateBy;
/**
* 更新时间
*/
private Date updateTime;
}

View File

@ -0,0 +1,7 @@
package com.fuint.business.marketingActivity.activeBirthday.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.fuint.business.marketingActivity.activeBirthday.entity.ActiveBirthdayChild;
public interface ActiveBirthdayChildMapper extends BaseMapper<ActiveBirthdayChild> {
}

View File

@ -0,0 +1,7 @@
package com.fuint.business.marketingActivity.activeBirthday.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.fuint.business.marketingActivity.activeBirthday.entity.ActiveBirthday;
public interface ActiveBirthdayMapper extends BaseMapper<ActiveBirthday> {
}

View File

@ -0,0 +1,61 @@
package com.fuint.business.marketingActivity.activeBirthday.service;
import com.fuint.business.marketingActivity.activeBirthday.entity.ActiveBirthdayChild;
import java.util.List;
/**
* (ActiveBirthdayChild)表服务接口
*
* @author makejava
* @since 2024-09-02 15:36:42
*/
public interface ActiveBirthdayChildService {
/**
* 通过ID查询单条数据
*
* @param id 主键
* @return 实例对象
*/
ActiveBirthdayChild queryById(Integer id);
/**
* 新增数据
*
* @param activeBirthdayChild 实例对象
* @return 实例对象
*/
int insert(ActiveBirthdayChild activeBirthdayChild);
/**
* 修改数据
*
* @param activeBirthdayChild 实例对象
* @return 实例对象
*/
int update(ActiveBirthdayChild activeBirthdayChild);
/**
* 通过主键删除数据
*
* @param id 主键
* @return 是否成功
*/
int deleteById(Integer id);
/**
* 根据生日有礼id查询子表列表信息
* @param activeBirthdayId
* @return
*/
List<ActiveBirthdayChild> queryByActiveId(Integer activeBirthdayId);
/**
* 根据生日有礼id删除子表信息
* @param activeBirthdayId
* @return
*/
int deleteByActiveId(Integer activeBirthdayId);
}

View File

@ -0,0 +1,52 @@
package com.fuint.business.marketingActivity.activeBirthday.service;
import com.fuint.business.marketingActivity.activeBirthday.entity.ActiveBirthday;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.PageRequest;
/**
* 生日有礼表(ActiveBirthday)表服务接口
*
* @author makejava
* @since 2024-09-02 15:34:06
*/
public interface ActiveBirthdayService {
/**
* 通过ID查询单条数据
*
* @param id 主键
* @return 实例对象
*/
ActiveBirthday queryById(Integer id);
/**
* 根据店铺id查询生日有礼信息
* @return
*/
ActiveBirthday selectByStoreId();
/**
* 新增数据
*
* @param activeBirthday 实例对象
* @return 实例对象
*/
int insert(ActiveBirthday activeBirthday);
/**
* 修改数据
*
* @param activeBirthday 实例对象
* @return 实例对象
*/
int update(ActiveBirthday activeBirthday);
/**
* 通过主键删除数据
*
* @param id 主键
* @return 是否成功
*/
int deleteById(Integer id);
}

View File

@ -0,0 +1,78 @@
package com.fuint.business.marketingActivity.activeBirthday.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.fuint.business.marketingActivity.activeBirthday.entity.ActiveBirthdayChild;
import com.fuint.business.marketingActivity.activeBirthday.mapper.ActiveBirthdayChildMapper;
import com.fuint.business.marketingActivity.activeBirthday.service.ActiveBirthdayChildService;
import org.springframework.stereotype.Service;
import java.util.List;
/**
* (ActiveBirthdayChild)表服务实现类
*
* @author makejava
* @since 2024-09-02 15:36:42
*/
@Service("activeBirthdayChildService")
public class ActiveBirthdayChildServiceImpl extends ServiceImpl<ActiveBirthdayChildMapper,ActiveBirthdayChild> implements ActiveBirthdayChildService {
/**
* 通过ID查询单条数据
*
* @param id 主键
* @return 实例对象
*/
@Override
public ActiveBirthdayChild queryById(Integer id) {
return baseMapper.selectById(id);
}
/**
* 新增数据
*
* @param activeBirthdayChild 实例对象
* @return 实例对象
*/
@Override
public int insert(ActiveBirthdayChild activeBirthdayChild) {
return baseMapper.insert(activeBirthdayChild);
}
/**
* 修改数据
*
* @param activeBirthdayChild 实例对象
* @return 实例对象
*/
@Override
public int update(ActiveBirthdayChild activeBirthdayChild) {
return baseMapper.updateById(activeBirthdayChild);
}
/**
* 通过主键删除数据
*
* @param id 主键
* @return 是否成功
*/
@Override
public int deleteById(Integer id) {
return baseMapper.deleteById(id);
}
@Override
public List<ActiveBirthdayChild> queryByActiveId(Integer activeBirthdayId) {
QueryWrapper queryWrapper = new QueryWrapper();
queryWrapper.eq("active_birthday_id", activeBirthdayId);
return baseMapper.selectList(queryWrapper);
}
@Override
public int deleteByActiveId(Integer activeBirthdayId) {
QueryWrapper queryWrapper = new QueryWrapper();
queryWrapper.eq("active_birthday_id", activeBirthdayId);
return baseMapper.delete(queryWrapper);
}
}

View File

@ -0,0 +1,120 @@
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.activeBirthday.entity.ActiveBirthday;
import com.fuint.business.marketingActivity.activeBirthday.entity.ActiveBirthdayChild;
import com.fuint.business.marketingActivity.activeBirthday.mapper.ActiveBirthdayMapper;
import com.fuint.business.marketingActivity.activeBirthday.service.ActiveBirthdayChildService;
import com.fuint.business.marketingActivity.activeBirthday.service.ActiveBirthdayService;
import com.fuint.common.dto.AccountInfo;
import com.fuint.common.util.TokenUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.Date;
import java.util.List;
/**
* 生日有礼表(ActiveBirthday)表服务实现类
*
* @author makejava
* @since 2024-09-02 15:34:07
*/
@Service("activeBirthdayService")
public class ActiveBirthdayServiceImpl extends ServiceImpl<ActiveBirthdayMapper,ActiveBirthday> implements ActiveBirthdayService {
@Autowired
private ActiveBirthdayChildService activeBirthdayChildService;
/**
* 通过ID查询单条数据
*
* @param id 主键
* @return 实例对象
*/
@Override
public ActiveBirthday queryById(Integer id) {
return baseMapper.selectById(id);
}
@Override
public ActiveBirthday selectByStoreId() {
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
QueryWrapper queryWrapper = new QueryWrapper();
queryWrapper.eq("store_id", nowAccountInfo.getStoreId());
ActiveBirthday activeBirthday = null;
List<ActiveBirthday> list = baseMapper.selectList(queryWrapper);
for (ActiveBirthday birthday : list) {
if (birthday.getActiveTimeType().equals("0")){
activeBirthday = birthday;
}else {
Date date = new Date();
if (birthday.getActiveStartTime().before(date) && birthday.getActiveEndTime().after(date)){
activeBirthday = birthday;
}
}
}
if (ObjectUtil.isNotEmpty(activeBirthday)){
List<ActiveBirthdayChild> activeBirthdayChildren = activeBirthdayChildService.queryByActiveId(activeBirthday.getId());
activeBirthday.setCouponList(activeBirthdayChildren);
}
return activeBirthday;
}
/**
* 新增数据
*
* @param activeBirthday 实例对象
* @return 实例对象
*/
@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());
int row = baseMapper.insert(activeBirthday);
activeBirthday1 = selectByStoreId();
if (ObjectUtil.isNotEmpty(activeBirthday.getCouponList())){
for (ActiveBirthdayChild activeBirthdayChild : activeBirthday.getCouponList()) {
activeBirthdayChild.setActiveBirthdayId(activeBirthday1.getId());
activeBirthdayChildService.insert(activeBirthdayChild);
}
}
return row;
}
/**
* 修改数据
*
* @param activeBirthday 实例对象
* @return 实例对象
*/
@Override
public int update(ActiveBirthday activeBirthday) {
int row = baseMapper.updateById(activeBirthday);
activeBirthdayChildService.deleteByActiveId(activeBirthday.getId());
if (ObjectUtil.isNotEmpty(activeBirthday.getCouponList())){
for (ActiveBirthdayChild activeBirthdayChild : activeBirthday.getCouponList()) {
activeBirthdayChild.setActiveBirthdayId(activeBirthday.getId());
activeBirthdayChildService.insert(activeBirthdayChild);
}
}
return row;
}
/**
* 通过主键删除数据
*
* @param id 主键
* @return 是否成功
*/
@Override
public int deleteById(Integer id) {
return baseMapper.deleteById(id);
}
}

View File

@ -682,8 +682,10 @@ public class ActiveNewlywedsServiceImpl extends ServiceImpl<ActiveNewlywedsMappe
activeNewlyweds.setChainStoreId(nowAccountInfo.getChainStoreId());
activeNewlyweds.setStoreId(nowAccountInfo.getStoreId());
int row = baseMapper.insert(activeNewlyweds);
activeNewlyweds1 = selectByStoreId();
if (ObjectUtil.isNotEmpty(activeNewlyweds.getCouponList())){
for (ActiveNewlywedsChild activeNewlywedsChild : activeNewlyweds.getCouponList()) {
activeNewlywedsChild.setActiveNewlywedsId(activeNewlyweds1.getId());
activeNewlywedsChildService.save(activeNewlywedsChild);
}
}
@ -697,6 +699,7 @@ public class ActiveNewlywedsServiceImpl extends ServiceImpl<ActiveNewlywedsMappe
activeNewlywedsChildService.deleteByActiveId(activeNewlyweds.getId());
if (ObjectUtil.isNotEmpty(activeNewlyweds.getCouponList())){
for (ActiveNewlywedsChild activeNewlywedsChild : activeNewlyweds.getCouponList()) {
activeNewlywedsChild.setActiveNewlywedsId(activeNewlyweds.getId());
activeNewlywedsChildService.save(activeNewlywedsChild);
}
}

View File

@ -50,7 +50,7 @@ public class ActiveRecommend extends Model<ActiveRecommend> {
private String titleUrl;
//邀请二维码类型 0小程序二维码 1参数二维码
private String invitationCodeType;
//奖励显示 0优惠券 1成长值总额 2积分总额
//奖励显示 0优惠券 2成长值总额 3积分总额 活动奖品
private String rewardDisplay;
//活动规则
private String activeRule;
@ -66,10 +66,10 @@ public class ActiveRecommend extends Model<ActiveRecommend> {
// 活动时间类型0永久有效1自定义
private String activeTimeType;
// 活动开始时间
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
private Date activeStartTime;
// 活动结束时间
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
private Date activeEndTime;
//更新者
private String updateBy;

View File

@ -608,9 +608,14 @@ public class ActiveRecommendServiceImpl extends ServiceImpl<ActiveRecommendMappe
if (ObjectUtil.isNotEmpty(activeRecommend1)){
return 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());
activeRecommendChildService.save(activeRecommendChild);
}
}
@ -623,6 +628,7 @@ public class ActiveRecommendServiceImpl extends ServiceImpl<ActiveRecommendMappe
activeRecommendChildService.deleteByRecommendId(activeRecommend.getId());
if (ObjectUtil.isNotEmpty(activeRecommend.getCouponList())){
for (ActiveRecommendChild activeRecommendChild : activeRecommend.getCouponList()) {
activeRecommendChild.setActiveRecommendId(activeRecommend.getId());
activeRecommendChildService.save(activeRecommendChild);
}
}