This commit is contained in:
cun-nan 2024-08-13 16:21:40 +08:00
parent 8e5e3827c9
commit c3102bcb16
22 changed files with 1374 additions and 592 deletions

View File

@ -44,6 +44,14 @@ export function getOilNameList() {
}) })
} }
// 查询所有油号
export function oilNumberList() {
return request({
url: '/business/petrolStationManagement/oilNumber/getList',
method: 'get',
// data: data
})
}
// 查询所有油号 // 查询所有油号
export function oilNumbers() { export function oilNumbers() {

View File

@ -0,0 +1,37 @@
import request from '@/utils/request'
// 分页查询所有的订单信息
export function getListApi(query) {
return request({
url: 'messageTemplate',
method: 'get',
params: query
})
}
//
export function deleteApi(ids) {
return request({
url: 'messageTemplate?idList=' + ids,
method: 'delete'
})
}
//
export function saveApi(data) {
return request({
url: 'messageTemplate',
method: 'post',
data: data
})
}
// 保存修改信息
export function updateApi(data) {
return request({
url: 'messageTemplate',
method: 'put',
data: data
})
}

View File

@ -84,3 +84,11 @@ export function exportUsers() {
method: 'get' method: 'get'
}) })
} }
//注销用户
export function logOffUsers(id) {
return request({
url: '/business/userManager/userbalance/'+id,
method: 'get'
})
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 704 B

View File

@ -64,7 +64,7 @@
<!-- <el-card class="box-card" style="min-height: 500px;" shadow="never">--> <!-- <el-card class="box-card" style="min-height: 500px;" shadow="never">-->
<div class="table-box"> <div class="table-box">
<el-table <el-table
:data="orderList" :data="orderList" border
style="width: 100%"> style="width: 100%">
<el-table-column type="index" width="50" align="center" label="序号"/> <el-table-column type="index" width="50" align="center" label="序号"/>
<el-table-column prop="fleetName" align="center" label="车队名称"></el-table-column> <el-table-column prop="fleetName" align="center" label="车队名称"></el-table-column>

View File

@ -69,7 +69,7 @@
<!-- <el-card class="box-card" style="min-height: 500px;" shadow="never">--> <!-- <el-card class="box-card" style="min-height: 500px;" shadow="never">-->
<div class="table-box"> <div class="table-box">
<el-table <el-table
:data="orderList" :data="orderList" border
style="width: 100%"> style="width: 100%">
<el-table-column type="index" width="50" align="center" label="序号"/> <el-table-column type="index" width="50" align="center" label="序号"/>
<el-table-column prop="fleetName" align="center" label="车队名称"></el-table-column> <el-table-column prop="fleetName" align="center" label="车队名称"></el-table-column>

File diff suppressed because it is too large Load Diff

View File

@ -50,9 +50,21 @@
style="width: 100%"> style="width: 100%">
<el-table-column type="index" width="50" align="center" label="序号"/> <el-table-column type="index" width="50" align="center" label="序号"/>
<el-table-column prop="groupName" label="分组名称" width="180"></el-table-column> <el-table-column prop="groupName" label="分组名称" width="180"></el-table-column>
<el-table-column prop="remark" label="备注" width="180"></el-table-column> <el-table-column prop="remark" label="备注" width="180">
<el-table-column prop="address" label="会员数量"></el-table-column> <template slot-scope="scope">
<el-table-column prop="address" label="会员占比"></el-table-column> <span>{{ scope.row.remark || "--" }}</span>
</template>
</el-table-column>
<el-table-column prop="address" label="会员数量">
<template slot-scope="scope">
<span>{{ scope.row.remark || 0 }}</span>
</template>
</el-table-column>
<el-table-column prop="address" label="会员占比">
<template slot-scope="scope">
<span>{{ scope.row.remark || 0 }}</span>
</template>
</el-table-column>
<el-table-column align="center" prop="status" label="状态"> <el-table-column align="center" prop="status" label="状态">
<template slot-scope="scope"> <template slot-scope="scope">
<el-switch <el-switch
@ -64,7 +76,11 @@
</el-switch> </el-switch>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="accountName" label="创建人"></el-table-column> <el-table-column prop="accountName" label="创建人">
<template slot-scope="scope">
<span>{{ scope.row.accountName || "--" }}</span>
</template>
</el-table-column>
<el-table-column prop="createTime" label="创建时间"></el-table-column> <el-table-column prop="createTime" label="创建时间"></el-table-column>
<el-table-column prop="updateTime" label="更新时间"></el-table-column> <el-table-column prop="updateTime" label="更新时间"></el-table-column>
<el-table-column align="center" label="操作" width="120"> <el-table-column align="center" label="操作" width="120">
@ -97,9 +113,9 @@
<div> <div>
<el-form :model="queryParams1" ref="queryForm" size="small" :inline="true" label-width="120px"> <el-form :model="queryParams1" ref="queryForm" size="small" :inline="true" label-width="120px">
<el-form-item label="" prop="groupName" style="width: 180px"> <el-form-item label="" prop="name" style="width: 180px">
<el-input <el-input
v-model="queryParams1.groupName" v-model="queryParams1.name"
placeholder="请输入活动名称" placeholder="请输入活动名称"
clearable clearable
@keyup.enter.native="handleQuery" @keyup.enter.native="handleQuery"
@ -121,9 +137,9 @@
</el-date-picker> </el-date-picker>
</el-form-item> </el-form-item>
<el-form-item style="float: right"> <el-form-item style="float: right">
<el-button type="primary" icon="el-icon-search" @click="handleQuery">搜索</el-button> <el-button type="primary" icon="el-icon-search" @click="handleQuery1">搜索</el-button>
<el-button icon="el-icon-refresh" @click="resetQuery">重置</el-button> <el-button icon="el-icon-refresh" @click="resetQuery1">重置</el-button>
<el-button type="primary" @click="handleAdd">新增定时群发</el-button> <el-button type="primary" @click="handleAdd1">新增定时群发</el-button>
</el-form-item> </el-form-item>
</el-form> </el-form>
@ -136,11 +152,31 @@
style="width: 100%"> style="width: 100%">
<el-table-column type="index" width="50" align="center" label="序号"/> <el-table-column type="index" width="50" align="center" label="序号"/>
<el-table-column prop="name" label="活动名称" width="180"></el-table-column> <el-table-column prop="name" label="活动名称" width="180"></el-table-column>
<el-table-column prop="activityTime" label="活动时间" width="180"></el-table-column> <el-table-column prop="activityTimeType" label="活动时间" width="190">
<el-table-column prop="sendFrequency" label="发送频次"></el-table-column> <template slot-scope="scope">
<el-table-column prop="address" label="群发会员"></el-table-column> <span v-if="scope.row.activityTimeType==0">永久有效</span>
<span v-else>{{ scope.row.activityTimeFront }} ~ {{ scope.row.activityTimeAfter }}</span>
</template>
</el-table-column>
<el-table-column prop="sendFrequency" label="发送频次">
<template slot-scope="scope">
<span v-if="scope.row.sendFrequency==0">每天一次</span>
<span v-if="scope.row.sendFrequency==1">周固定时间</span>
<span v-if="scope.row.sendFrequency==2">月固定时间</span>
<span v-if="scope.row.sendFrequency==3">法定节日时间</span>
</template>
</el-table-column>
<el-table-column prop="sendUserNum" label="群发会员">
<template slot-scope="scope">
<span>{{ scope.row.sendUserNum || 0 }}</span>
</template>
</el-table-column>
<el-table-column prop="senfGift" label="群发礼品"></el-table-column> <el-table-column prop="senfGift" label="群发礼品">
<template slot-scope="scope">
<span>{{ scope.row.senfGift || "--" }}</span>
</template>
</el-table-column>
<el-table-column prop="status" label="活动状态"> <el-table-column prop="status" label="活动状态">
<template slot-scope="scope"> <template slot-scope="scope">
<div v-if="scope.row.status == 0" style="color: #FF7E00">未开始</div> <div v-if="scope.row.status == 0" style="color: #FF7E00">未开始</div>
@ -156,13 +192,13 @@
size="mini" size="mini"
type="text" type="text"
v-if="scope.row.status == 0" v-if="scope.row.status == 0"
@click="handleUpdate(scope.row)" @click="handleUpdate1(scope.row)"
>修改 >修改
</el-button> </el-button>
<el-button <el-button
size="mini" size="mini"
type="text" type="text"
@click="handleDelete(scope.row)" @click="handleDelete1(scope.row)"
>删除 >删除
</el-button> </el-button>
</template> </template>
@ -178,7 +214,7 @@
/> />
</div> </div>
<div class="cot-box" v-if="tabindex==2"> <div class="cot-box" v-if="tabindex==2">
<div > <div>
<el-form :model="queryParams2" ref="queryForm" size="small" :inline="true" label-width="120px"> <el-form :model="queryParams2" ref="queryForm" size="small" :inline="true" label-width="120px">
<el-form-item label="" prop="groupName" style="width: 180px"> <el-form-item label="" prop="groupName" style="width: 180px">
@ -216,20 +252,49 @@
border border
style="width: 100%"> style="width: 100%">
<el-table-column type="index" width="50" align="center" label="序号"/> <el-table-column type="index" width="50" align="center" label="序号"/>
<el-table-column prop="activityName" label="活动名称" width="180"> </el-table-column> <el-table-column prop="activityName" label="活动名称" width="180"></el-table-column>
<el-table-column prop="sendGift" label="群发礼品" width="180"> </el-table-column> <el-table-column prop="sendGift" label="群发礼品"></el-table-column>
<el-table-column prop="sendWay" label="群发方式"> </el-table-column> <el-table-column prop="sendWay" label="群发方式"></el-table-column>
<el-table-column prop="address" label="群发内容"> </el-table-column> <el-table-column prop="massContent" label="群发内容" width="220"></el-table-column>
<el-table-column prop="userNum" label="群发会员数量"> </el-table-column> <el-table-column prop="userNum" label="群发会员数量">
<el-table-column prop="successNum" label="成功数量"> </el-table-column> <template slot-scope="scope">
<el-table-column prop="failNum" label="失败数量"> </el-table-column> <span>{{ scope.row.userNum || 0 }}</span>
<el-table-column prop="status" label="状态"> </el-table-column> </template>
<el-table-column prop="address" label="已领取数量"> </el-table-column> </el-table-column>
<el-table-column prop="address" label="已核销数量"> </el-table-column> <el-table-column prop="successNum" label="成功数量">
<el-table-column prop="address" label="未核销数量"> </el-table-column> <template slot-scope="scope">
<el-table-column prop="accountName" label="操作人员"> </el-table-column> <span>{{ scope.row.successNum || 0 }}</span>
<el-table-column prop="createTime" label="群发时间"> </el-table-column> </template>
</el-table-column>
<el-table-column prop="failNum" label="失败数量">
<template slot-scope="scope">
<span>{{ scope.row.failNum || 0 }}</span>
</template>
</el-table-column>
<el-table-column prop="status" label="状态">
<template slot-scope="scope">
<div v-if="scope.row.status == 0" style="color: #0DC291">已发送</div>
<div v-if="scope.row.status == 1" style="color: #F44522">发送失败</div>
</template>
</el-table-column>
<el-table-column prop="address" label="已领取数量">
<template slot-scope="scope">
<span>{{ scope.row.userNum || 0 }}</span>
</template>
</el-table-column>
<el-table-column prop="address" label="已核销数量">
<template slot-scope="scope">
<span>{{ scope.row.userNum || 0 }}</span>
</template>
</el-table-column>
<el-table-column prop="address" label="未核销数量">
<template slot-scope="scope">
<span>{{ scope.row.userNum || 0 }}</span>
</template>
</el-table-column>
<el-table-column prop="accountName" label="操作人员"></el-table-column>
<el-table-column prop="createTime" label="群发时间" width="160"></el-table-column>
<el-table-column align="center" label="操作" width="120"> <el-table-column align="center" label="操作" width="120">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button <el-button
@ -253,85 +318,105 @@
<!-- 添加或修改对话框 --> <!-- 添加或修改对话框 -->
<el-dialog :title="title" :visible.sync="open" width="30%" append-to-body> <el-dialog :title="title" :visible.sync="open" width="35%" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="80px"> <el-form ref="form" :model="form" :rules="rules" label-width="80px">
<el-form-item label="分组名称" prop="labelName"> <el-form-item label="分组名称" prop="groupName">
<el-input v-model="form.labelName" placeholder="请输入分组名称" maxlength="30"/> <el-input v-model="form.groupName" placeholder="请输入分组名称" maxlength="30"/>
</el-form-item> </el-form-item>
<el-form-item label="会员等级" prop="paymentType"> <el-form-item label="会员等级" prop="gradeId">
<el-select v-model="form.paymentType" placeholder="请选择会员等级" style="width: 100%"> <el-select v-model="form.gradeId" placeholder="请选择会员等级" style="width: 100%">
<el-option label="现金" value="CASH"></el-option> <el-option v-for="(item,index) in userGradeList" :key="index" :label="item.name"
:value="item.id"></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="会员标签" prop="paymentType"> <el-form-item label="会员标签" prop="userLabelId">
<el-select v-model="form.paymentType" placeholder="请选择会员标签(多选)" style="width: 100%"> <el-select v-model="form.userLabelId" multiple placeholder="请选择会员标签(多选)" style="width: 100%">
<el-option label="现金" value="CASH"></el-option> <el-option v-for="(item,index) in userLabelList" :key="index" :label="item.labelName"
:value="item.id+''"></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="会员性别" prop="paymentType"> <el-form-item label="会员性别" prop="userSex">
<!-- <el-select v-model="form.paymentType" placeholder="请选择会员标签(多选)" style="width: 100%">--> <el-checkbox-group v-model="form.userSex">
<!-- <el-option label="现金" value="CASH"></el-option>--> <el-checkbox type="name" label="男"></el-checkbox>
<!-- </el-select>--> <el-checkbox type="name" label="女"></el-checkbox>
<div class="d-s"> <el-checkbox type="name" label="不详"></el-checkbox>
<div class="icon-type" v-for="(item,index) in paymentTypelist" :key="index" :class="{ 'acvtive' : index === tindex }" @click="Typeindex(index)" > </el-checkbox-group>
<img src="../../assets/images/wx.png" style="width: 20px;height: 20px" v-if="index != tindex" >
<img src="../../assets/images/xz.png" style="width: 20px;height: 20px" v-if="index == tindex" >
{{item}}</div>
</div>
</el-form-item> </el-form-item>
<el-form-item label="会员年龄" prop="paymentType"> <el-form-item label="会员年龄" prop="paymentType">
<div class="d-s"> <div class="d-s">
<el-input placeholder="请输入年龄" v-model="input" style="width: 190px"></el-input> <el-input placeholder="请输入年龄" v-model="form.userAgeFront" style="width: 190px"></el-input>
<div style="margin: 0 15px"></div> <div style="margin: 0 15px"></div>
<el-input placeholder="请输入年龄" v-model="input" style="width: 190px"></el-input> <el-input placeholder="请输入年龄" v-model="form.userAgeAfter" style="width: 190px"></el-input>
</div> </div>
</el-form-item> </el-form-item>
<el-form-item label="会员余额" prop="paymentType"> <el-form-item label="会员余额" prop="paymentType">
<el-input placeholder="请输入内容" v-model="form.age"> <div class="d-s">
<template slot="append">.com</template> <el-input placeholder="请输入余额" v-model="form.userBalanceFront" style="width: 190px"></el-input>
</el-input> <div style="margin: 0 15px"></div>
<el-input placeholder="请输入余额" v-model="form.userBalanceAfter" style="width: 190px"></el-input>
</div>
</el-form-item> </el-form-item>
<el-form-item label="会员积分" prop="paymentType"> <el-form-item label="会员积分" prop="paymentType">
<el-input placeholder="请输入内容" v-model="form.age"> <div class="d-s">
<template slot="append">.com</template> <el-input placeholder="请输入积分" v-model="form.userPointFront" style="width: 190px"></el-input>
</el-input> <div style="margin: 0 15px"></div>
<el-input placeholder="请输入积分" v-model="form.userPointAfter" style="width: 190px"></el-input>
</div>
</el-form-item> </el-form-item>
<el-form-item label="充值次数" prop="paymentType"> <el-form-item label="充值次数" prop="paymentType">
<el-input placeholder="请输入内容" v-model="form.age"> <div class="d-s">
<template slot="append">.com</template> <el-input placeholder="请输入充值次数" v-model="form.rechargeNumFront" style="width: 190px"></el-input>
</el-input> <div style="margin: 0 15px"></div>
<el-input placeholder="请输入充值次数" v-model="form.rechargeNumAfter" style="width: 190px"></el-input>
</div>
</el-form-item> </el-form-item>
<el-form-item label="充值金额" prop="paymentType"> <el-form-item label="充值金额" prop="paymentType">
<el-input placeholder="请输入内容" v-model="form.age"> <div class="d-s">
<template slot="append">.com</template> <el-input placeholder="请输入充值金额" v-model="form.rechargeAmountFront" style="width: 190px"></el-input>
</el-input> <div style="margin: 0 15px"></div>
<el-input placeholder="请输入充值金额" v-model="form.rechargeAmountAfter" style="width: 190px"></el-input>
</div>
</el-form-item> </el-form-item>
<el-form-item label="消费周期" prop="paymentType"> <el-form-item label="消费周期" prop="consumeCycle">
<el-select v-model="form.paymentType" placeholder="请选择会员标签(多选)" style="width: 100%"> <div class="d-s">
<el-option label="现金" value="CASH"></el-option> <div class="icon-type" v-for="(item,index) in paymentTypelist" :key="index"
</el-select> :class="{ 'acvtive' : index === tindex }" @click="Typeindex(index)">
<img src="../../assets/images/wx.png" style="width: 20px;height: 20px" v-if="index != tindex">
<img src="../../assets/images/xz.png" style="width: 20px;height: 20px" v-if="index == tindex">
{{ item }}
</div>
</div>
</el-form-item> </el-form-item>
<el-form-item label="消费油品" prop="paymentType"> <el-form-item label="消费油品" prop="consumeOil">
<el-select v-model="form.paymentType" placeholder="请选择会员标签(多选)" style="width: 100%"> <el-select v-model="form.consumeOil" multiple placeholder="请选择油品(多选)" style="width: 100%">
<el-option label="现金" value="CASH"></el-option> <el-option v-for="(item,index) in oilNumberList" :key="index"
:label="getOilNamess(oilNameList,item.oilName)" :value="item.oilName"></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="消费次数" prop="paymentType"> <el-form-item label="消费次数" prop="paymentType">
<el-input placeholder="请输入内容" v-model="form.age"> <div class="d-s">
<template slot="append">.com</template> <el-input placeholder="请输入消费次数" v-model="form.consumeNumFront" style="width: 190px"></el-input>
</el-input> <div style="margin: 0 15px"></div>
<el-input placeholder="请输入消费次数" v-model="form.consumeNumAfter" style="width: 190px"></el-input>
</div>
</el-form-item> </el-form-item>
<el-form-item label="消费金额" prop="paymentType"> <el-form-item label="消费金额" prop="paymentType">
<el-input placeholder="请输入内容" v-model="form.age"> <div class="d-s">
<template slot="append">.com</template> <el-input placeholder="请输入消费金额" v-model="form.consumeAmountFront" style="width: 190px"></el-input>
</el-input> <div style="margin: 0 15px"></div>
<el-input placeholder="请输入消费金额" v-model="form.consumeAmountAfter" style="width: 190px"></el-input>
</div>
</el-form-item> </el-form-item>
<el-form-item label="平均消费" prop="paymentType"> <el-form-item label="平均消费" prop="paymentType">
<el-input placeholder="请输入内容" v-model="form.age"> <div class="d-s">
<template slot="append">.com</template> <el-input placeholder="请输入平均消费金额" v-model="form.averageConsumeFront"
</el-input> style="width: 190px"></el-input>
<div style="margin: 0 15px"></div>
<el-input placeholder="请输入平均消费金额" v-model="form.averageConsumeAfter"
style="width: 190px"></el-input>
</div>
</el-form-item> </el-form-item>
<el-form-item label="状态" prop="status"> <el-form-item label="状态" prop="status">
@ -344,7 +429,7 @@
</el-switch> </el-switch>
</el-form-item> </el-form-item>
<el-form-item label="备注" > <el-form-item label="备注">
<el-input v-model="form.remark" placeholder="请输入备注" type="textarea"/> <el-input v-model="form.remark" placeholder="请输入备注" type="textarea"/>
</el-form-item> </el-form-item>
@ -355,21 +440,153 @@
</div> </div>
</el-dialog> </el-dialog>
<!-- 添加或修改对话框 -->
<el-dialog :title="title" :visible.sync="open1" width="35%" append-to-body>
<el-form ref="form1" :model="form1" :rules="rules" label-width="80px">
<el-form-item label="活动名称" prop="name">
<el-input v-model="form1.name" placeholder="请输入活动名称" maxlength="30"/>
</el-form-item>
<el-form-item label="群发会员" prop="userGroupId">
<el-select v-model="form1.userGroupId" placeholder="请选择群发会员" style="width: 100%">
<el-option v-for="(item,index) in groupList" :key="index" :label="item.groupName" :value="item.id"></el-option>
</el-select>
</el-form-item>
<el-form-item label="活动时间" prop="activityTimeType">
<div class="d-s">
<div class="icon-type" v-for="(item,index) in activityTimeTypeList" :key="index"
:class="{ 'acvtive' : index === tindex1 }" @click="Typeindex1(index)">
<img src="../../assets/images/wx.png" style="width: 20px;height: 20px" v-if="index != tindex1">
<img src="../../assets/images/xz.png" style="width: 20px;height: 20px" v-if="index == tindex1">
{{ item }}
</div>
<el-date-picker
v-model="form1.activityTimeFront"
style="width: 160px"
type="date"
placeholder="开始日期">
</el-date-picker>
<el-date-picker
v-model="form1.activityTimeAfter"
style="width: 160px"
type="date"
placeholder="结束日期">
</el-date-picker>
</div>
</el-form-item>
<el-form-item label="发送频次" prop="sendFrequency">
<div class="d-s">
<div class="icon-type" v-for="(item,index) in sendFrequencyList" :key="index"
:class="{ 'acvtive' : index === tindex2 }" @click="Typeindex2(index)">
<img src="../../assets/images/wx.png" style="width: 20px;height: 20px" v-if="index != tindex2">
<img src="../../assets/images/xz.png" style="width: 20px;height: 20px" v-if="index == tindex2">
{{ item }}
</div>
</div>
<div>
<el-checkbox-group v-model="weekDay" v-if="form1.sendFrequency==1">
<el-checkbox v-for="(item,index) in weekList" :key="index" :label="item"></el-checkbox>
</el-checkbox-group>
<el-checkbox-group v-model="monthDay" v-if="form1.sendFrequency==2">
<el-checkbox v-for="item in 31" :key="item" :label="item+''">{{ item }}</el-checkbox>
</el-checkbox-group>
<el-time-picker
v-model="form1.sendTime"
format="HH:mm"
placeholder="请选择发送时间点">
</el-time-picker>
</div>
</el-form-item>
<el-form-item label="群发方式" prop="sendWay">
<div style="display: flex">
<el-checkbox-group v-model="form1.sendWay">
<el-checkbox label="短信消息"></el-checkbox>
</el-checkbox-group>
<el-tooltip class="item" effect="light" content="仅对有手机号的会员进行群发" placement="right">
<img style="width: 16px;height: 16px;margin-top: 9px;margin-left: 10px" src="@/assets/images/wenhao.png">
</el-tooltip>
</div>
</el-form-item>
<el-form-item label="群发礼品" prop="senfGift">
<el-checkbox-group v-model="form1.senfGift">
<el-checkbox label="积分"></el-checkbox>
<el-checkbox label="优惠券"></el-checkbox>
<el-checkbox label="成长值"></el-checkbox>
</el-checkbox-group>
</el-form-item>
<el-form-item label="短信模板" prop="messageId">
<el-select v-model="form1.messageId" placeholder="请选择短信模板名称" style="width: 100%">
<el-option v-for="(item,index) in messageList" :key="index" :label="item.name" :value="item.id"></el-option>
</el-select>
</el-form-item>
<el-form-item label="跳转链接" prop="jumpLink">
<div class="d-s">
<div class="icon-type" v-for="(item,index) in jumpLinkList" :key="index"
:class="{ 'acvtive' : index === tindex3 }" @click="Typeindex3(index)">
<img src="../../assets/images/wx.png" style="width: 20px;height: 20px" v-if="index != tindex3">
<img src="../../assets/images/xz.png" style="width: 20px;height: 20px" v-if="index == tindex3">
{{ item }}
</div>
</div>
<el-select v-if="form1.jumpLink==0" v-model="form1.appletJumpPage" placeholder="请选择跳转页面"
style="width: 100%">
<el-option v-for="(item,index) in jumpPageList" :key="index" :label="item.name"
:value="item.id"></el-option>
</el-select>
</el-form-item>
<el-form-item label="会员数量">
{{ form1.sendUserNum }}
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitForm1"> </el-button>
<el-button @click="cancel1"> </el-button>
</div>
</el-dialog>
</div> </div>
</template> </template>
<script> <script>
import {addUserGroup, deleteUserGroup, editUserGroup, getUserGroup, listUserGroup} from "@/api/userGroup/usergroup"; import {addUserGroup, deleteUserGroup, editUserGroup, getUserGroup, listUserGroup} from "@/api/userGroup/usergroup";
import {listUserMassSend} from "@/api/userGroup/userMassSend"; import {
addUserMassSend,
deleteUserMassSend,
editUserMassSend,
getUserMassSend,
listUserMassSend
} from "@/api/userGroup/userMassSend";
import {listUserMassSendRecord} from "@/api/userGroup/userMassSendRecord"; import {listUserMassSendRecord} from "@/api/userGroup/userMassSendRecord";
import {listUserLabel} from "@/api/staff/user/userlabel";
import {listUserGrade} from "@/api/staff/user/usergrade";
import {getOilNameList, oilNumberList} from "@/api/order/oilnumgun";
import {getListApi} from "@/api/setting/message";
export default { export default {
data() { data() {
return { return {
tabindex: 0, tabindex: 0,
tindex: 0, tindex: 0,
paymentTypelist:[ tindex1: 0,
"全部", "男", "女","不详", tindex2: 0,
tindex3: 0,
paymentTypelist: [
"不限制", "7天", "15天", "30天", "60天", "90天", "180天",
], ],
activityTimeTypeList: [
"永久有效", "自定义"
],
sendFrequencyList: [
"每天一次", "周固定时间", "月固定时间", "法定节日时间"
],
jumpLinkList: [
"小程序链接", "常用链接"
],
weekList: ["周一", "周二", "周三", "周四", "周五", "周六", "周日"],
weekDay: [],
monthDay: [],
tableData: [{ tableData: [{
status: 0, status: 0,
date: '2016-05-02', date: '2016-05-02',
@ -404,6 +621,7 @@ export default {
name: "群发记录", name: "群发记录",
} }
], ],
total: 0, total: 0,
queryParams: { queryParams: {
page: 1, page: 1,
@ -412,6 +630,7 @@ export default {
beginTime: "", beginTime: "",
endTime: "", endTime: "",
userGroupList: [], userGroupList: [],
total1: 0, total1: 0,
queryParams1: { queryParams1: {
page: 1, page: 1,
@ -420,6 +639,7 @@ export default {
beginTime1: "", beginTime1: "",
endTime1: "", endTime1: "",
massSendList: [], massSendList: [],
total2: 0, total2: 0,
queryParams2: { queryParams2: {
page: 1, page: 1,
@ -428,24 +648,138 @@ export default {
beginTime2: "", beginTime2: "",
endTime2: "", endTime2: "",
massSendRecordList: [], massSendRecordList: [],
title:'',
open:false, title: '',
form:{}, open: false,
form: {userSex: []},
userLabelList: [],
userGradeList: [],
oilNameList: [],
//
oilNumberList: [],
open1: false,
form1: {userSex: []},
messageList: [],
jumpPageList: [
{id: 0, name: "首页"},
{id: 1, name: "一键加油"},
{id: 2, name: "储值卡充值"},
{id: 3, name: "囤油卡充值"},
{id: 4, name: "礼品卡兑换"},
{id: 5, name: "消费有礼"},
{id: 6, name: "折扣营销"},
{id: 7, name: "满减营销"},
{id: 8, name: "积分商城"},
{id: 9, name: "邀请有礼"},
],
groupList:[],
// //
rules: { rules: {
labelName: [ groupName: [
{required: true, message: "标签名称不能为空", trigger: "blur"}, {required: true, message: "分组名称不能为空", trigger: "blur"},
], ],
status: [ status: [
{required: true, message: "状态不能为空", trigger: "blur"} {required: true, message: "状态不能为空", trigger: "blur"}
] ],
name: [
{required: true, message: "活动名称不能为空", trigger: "blur"}
],
userGroupId: [
{required: true, message: "群发会员不能为空", trigger: "blur"}
],
activityTimeType: [
{required: true, message: "活动时间不能为空", trigger: "blur"}
],
sendFrequency: [
{required: true, message: "发送频次不能为空", trigger: "blur"}
],
sendWay: [
{required: true, message: "群发方式不能为空", trigger: "blur"}
],
senfGift: [
{required: true, message: "群发礼品不能为空", trigger: "blur"}
],
messageId: [
{required: true, message: "短信模板不能为空", trigger: "blur"}
],
} }
}; };
}, },
created() { created() {
this.getList() this.getList()
this.getUserLabelList()
}, },
methods: { methods: {
getUserLabelList() {
listUserLabel({page: 1, pageSize: 10, status: 'qy'}).then(res => {
this.userLabelList = res.data.records
})
listUserGrade({page: 1, pageSize: 20}).then(response => {
this.userGradeList = response.data.records;
});
getOilNameList().then(response => {
this.oilNameList = response.data;
})
oilNumberList().then(response => {
this.oilNumberList = response.data.records;
})
},
getMessageList() {
getListApi({page: 1, pageSize: 10000, status: '1'}).then(res => {
this.messageList = res.data.records;
})
listUserGroup({page: 1, pageSize: 10000, status: 'qy'}).then(res => {
this.groupList = res.data.records
})
},
getOilNamess(list, id) {
let name = ""
if (list != null && list != "") {
list.forEach(item => {
if (item.id == id) {
name = item.oilName;
}
})
}
return name;
},
//
cancel1() {
this.open1 = false;
this.reset();
},
//
submitForm1: function () {
this.$refs["form1"].validate(valid => {
if (valid) {
this.form1.sendWay = this.form1.sendWay.toString()
this.form1.senfGift = this.form1.senfGift.toString()
if (this.form1.sendFrequency==1){
if (this.weekDay.length>0) this.form1.sendDate = this.weekDay.toString()
}else if (this.form1.sendFrequency==2){
if (this.monthDay.length>0) this.form1.sendDate = this.monthDay.toString()
}
if (!this.form1.id) {
addUserMassSend(this.form1).then(res => {
this.$message.success("添加成功")
this.open1 = false
this.queryParams1.page = 1;
this.getList1()
})
} else {
editUserMassSend(this.form1).then(res => {
this.$message.success("修改成功")
this.open1 = false
this.queryParams1.page = 1;
this.getList1()
})
}
}
});
},
// //
cancel() { cancel() {
this.open = false; this.open = false;
@ -455,6 +789,9 @@ export default {
submitForm: function () { submitForm: function () {
this.$refs["form"].validate(valid => { this.$refs["form"].validate(valid => {
if (valid) { if (valid) {
if (this.form.userSex) this.form.userSex = this.form.userSex.toString()
if (this.form.userLabelId) this.form.userLabelId = this.form.userLabelId.toString()
if (this.form.consumeOil) this.form.consumeOil = this.form.consumeOil.toString()
if (!this.form.id) { if (!this.form.id) {
addUserGroup(this.form).then(res => { addUserGroup(this.form).then(res => {
this.$message.success("添加成功") this.$message.success("添加成功")
@ -473,8 +810,21 @@ export default {
} }
}); });
}, },
Typeindex(index){ Typeindex(index) {
this.tindex = index this.tindex = index
this.form.consumeCycle = index
},
Typeindex1(index) {
this.tindex1 = index
this.form1.activityTimeType = index
},
Typeindex2(index) {
this.tindex2 = index
this.form1.sendFrequency = index
},
Typeindex3(index) {
this.tindex3 = index
this.form1.jumpLink = index
}, },
getList() { getList() {
let dateRange = [] let dateRange = []
@ -515,7 +865,35 @@ export default {
getUserGroup(row.id).then(res => { getUserGroup(row.id).then(res => {
this.open = true; this.open = true;
this.form = res.data; this.form = res.data;
this.title = "修改会员标签" if (res.data.userSex) {
this.form.userSex = res.data.userSex.split(",")
} else {
this.form.userSex = []
}
if (res.data.userLabelId) this.form.userLabelId = res.data.userLabelId.split(",")
if (res.data.consumeOil) this.form.consumeOil = res.data.consumeOil.split(",")
if (res.data.consumeCycle) this.tindex = res.data.consumeCycle
this.title = "修改会员分组"
})
},
//
handleUpdate1(row) {
getUserMassSend(row.id).then(res => {
this.open1 = true;
this.form1 = res.data;
if (res.data.sendDate){
if (res.data.sendFrequency==1) {
this.weekDay = res.data.sendDate.split(",")
}else if (res.data.sendFrequency==2){
this.monthDay = res.data.sendDate.split(",")
}
}else {
this.monthDay = []
this.weekDay = []
}
this.form1.sendWay = res.data.sendWay.split(",")
this.form1.senfGift = res.data.senfGift.split(",")
this.title = "修改定时群发"
}) })
}, },
// //
@ -534,16 +912,63 @@ export default {
}).catch(() => { }).catch(() => {
}); });
}, },
//
handleDelete1(row) {
const name = row.labelName || this.id;
this.$modal.confirm('是否删除本条数据,删除后无法恢复!').then(function () {
return deleteUserMassSend(row.id);
}).then(() => {
this.queryParams1.page = 1
this.getList1();
this.$modal.msgSuccess("删除成功");
}).catch(() => {
});
},
//
handleAdd1() {
this.tindex1 = 0
this.tindex2 = 0
this.tindex3 = 0
this.form1 = {
sendWay: [],
senfGift: [],
activityTimeType:this.tindex1,
sendFrequency:this.tindex2,
jumpLink:this.tindex3,
}
this.monthDay = []
this.weekDay = []
this.open1 = true;
this.title = "新增定时群发";
},
// //
handleAdd() { handleAdd() {
this.tindex = 0
this.reset(); this.reset();
this.form = { this.form = {
status: "qy" status: "qy",
userSex: [],
consumeCycle: this.tindex
} }
this.open = true; this.open = true;
this.title = "新增会员标签"; this.title = "新增会员标签";
}, },
// //
handleQuery1() {
this.queryParams1.page = 1;
this.getList1();
},
//
resetQuery1() {
this.queryParams1 = {
page: 1,
pageSize: 10,
}
this.beginTime1 = ''
this.endTime1 = ''
this.handleQuery1();
},
//
handleQuery() { handleQuery() {
this.queryParams.page = 1; this.queryParams.page = 1;
this.getList(); this.getList();
@ -561,11 +986,13 @@ export default {
}, },
getindex(index) { getindex(index) {
this.tabindex = index this.tabindex = index
if (index==0){ if (index == 0) {
this.getList() this.getList()
}else if (index==1){ this.getUserLabelList()
} else if (index == 1) {
this.getList1() this.getList1()
}else if (index==2){ this.getMessageList()
} else if (index == 2) {
this.getList2() this.getList2()
} }
} }
@ -629,7 +1056,8 @@ export default {
display: flex; display: flex;
align-items: center; align-items: center;
} }
.icon-type{
.icon-type {
display: flex; display: flex;
align-items: center; align-items: center;
font-weight: 400; font-weight: 400;
@ -638,7 +1066,8 @@ export default {
margin-right: 20px; margin-right: 20px;
cursor: pointer; cursor: pointer;
} }
.acvtive{
.acvtive {
color: #FF770F !important; color: #FF770F !important;
} }
</style> </style>

View File

@ -9,6 +9,10 @@ import com.fuint.framework.web.ResponseObject;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource; import javax.annotation.Resource;
import java.time.LocalDate;
import java.time.format.DateTimeFormatter;
import java.util.Arrays;
import java.util.List;
/** /**
* 油机汽机配置(UserMassSend)表控制层 * 油机汽机配置(UserMassSend)表控制层
@ -84,5 +88,26 @@ public class UserMassSendController extends BaseController {
return getSuccessResult(userMassSendService.deleteById(id)); return getSuccessResult(userMassSendService.deleteById(id));
} }
@GetMapping("getLegalDate")
public ResponseObject getLegalDate(){
int year = 2023; // 你可以根据需要更改年份
String holidaysString = getChineseHolidaysAPI(year);
List<String> holidays = Arrays.asList(holidaysString.split(","));
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd");
for (String holiday : holidays) {
// 对于每个假日你需要决定具体日期这里我们只是打印出来
System.out.println(holiday + " - " + formatter.format(LocalDate.now()));
// 具体日期的规则可能因为假日而变化需要你根据实际情况来确定
}
return getSuccessResult(holidays);
}
// 假设的API返回节假日列表的字符串
public String getChineseHolidaysAPI(int year) {
// 这里应该是对外部API的调用例如httpClient.get("api.example.com/holidays?year=" + year)
// 现在我们使用硬编码的字符串来模拟API响应
return "元旦,春节,清明节,劳动节,端午节,中秋节,国庆节";
}
} }

View File

@ -3,6 +3,7 @@ package com.fuint.business.userGroup.entity;
import com.baomidou.mybatisplus.annotation.IdType; import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName; import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fuint.framework.entity.BaseEntity; import com.fuint.framework.entity.BaseEntity;
import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
@ -52,7 +53,13 @@ public class UserMassSend extends BaseEntity implements Serializable {
/** /**
* 活动时间 * 活动时间
*/ */
private Date activityTime; @JsonFormat(pattern = "yyyy-MM-dd" , timezone = "GMT+8")
private Date activityTimeFront;
/**
* 活动时间
*/
@JsonFormat(pattern = "yyyy-MM-dd" , timezone = "GMT+8")
private Date activityTimeAfter;
/** /**
* 发送频次0每天一次1周固定时间2月固定时间3法定节日时间 * 发送频次0每天一次1周固定时间2月固定时间3法定节日时间
*/ */

View File

@ -3,9 +3,10 @@
<mapper namespace="com.fuint.business.userGroup.mapper.UserMassSendRecordMapper"> <mapper namespace="com.fuint.business.userGroup.mapper.UserMassSendRecordMapper">
<select id="queryPage" resultType="com.fuint.business.userGroup.vo.UserMassSendRecordVo"> <select id="queryPage" resultType="com.fuint.business.userGroup.vo.UserMassSendRecordVo">
SELECT umsr.*,ums.`name` activityName,ta.real_name accountName FROM user_mass_send_record umsr SELECT umsr.*,ums.`name` activityName,ta.real_name accountName,mt.content massContent FROM user_mass_send_record umsr
LEFT JOIN user_mass_send ums on umsr.mass_send_id = ums.id LEFT JOIN user_mass_send ums on umsr.mass_send_id = ums.id
LEFT JOIN t_account ta on umsr.create_by = ta.acct_id LEFT JOIN message_template mt on ums.message_id = mt.id
LEFT JOIN t_account ta on umsr.create_by = ta.acct_id
<where> <where>
<if test="entity.chainStoreId != null and entity.chainStoreId != ''"> <if test="entity.chainStoreId != null and entity.chainStoreId != ''">
and umsr.chain_store_id = #{entity.chainStoreId} and umsr.chain_store_id = #{entity.chainStoreId}

View File

@ -7,6 +7,8 @@ import com.fuint.business.userGroup.entity.UserGroup;
import com.fuint.business.userGroup.mapper.UserGroupMapper; import com.fuint.business.userGroup.mapper.UserGroupMapper;
import com.fuint.business.userGroup.service.UserGroupService; import com.fuint.business.userGroup.service.UserGroupService;
import com.fuint.business.userGroup.vo.UserGroupVo; import com.fuint.business.userGroup.vo.UserGroupVo;
import com.fuint.common.dto.AccountInfo;
import com.fuint.common.util.TokenUtil;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
/** /**
@ -20,6 +22,8 @@ public class UserGroupServiceImpl extends ServiceImpl<UserGroupMapper,UserGroup>
@Override @Override
public IPage<UserGroupVo> queryPage(Page page, UserGroupVo userGroup) { public IPage<UserGroupVo> queryPage(Page page, UserGroupVo userGroup) {
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
userGroup.setStoreId(nowAccountInfo.getStoreId());
return baseMapper.queryPage(page,userGroup); return baseMapper.queryPage(page,userGroup);
} }
@ -42,6 +46,9 @@ public class UserGroupServiceImpl extends ServiceImpl<UserGroupMapper,UserGroup>
*/ */
@Override @Override
public int insert(UserGroup userGroup) { public int insert(UserGroup userGroup) {
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
userGroup.setStoreId(nowAccountInfo.getStoreId());
userGroup.setChainStoreId(nowAccountInfo.getChainStoreId());
return baseMapper.insert(userGroup); return baseMapper.insert(userGroup);
} }

View File

@ -7,6 +7,8 @@ import com.fuint.business.userGroup.entity.UserMassSendRecord;
import com.fuint.business.userGroup.mapper.UserMassSendRecordMapper; import com.fuint.business.userGroup.mapper.UserMassSendRecordMapper;
import com.fuint.business.userGroup.service.UserMassSendRecordService; import com.fuint.business.userGroup.service.UserMassSendRecordService;
import com.fuint.business.userGroup.vo.UserMassSendRecordVo; import com.fuint.business.userGroup.vo.UserMassSendRecordVo;
import com.fuint.common.dto.AccountInfo;
import com.fuint.common.util.TokenUtil;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
/** /**
@ -21,6 +23,8 @@ public class UserMassSendRecordServiceImpl extends ServiceImpl<UserMassSendRecor
@Override @Override
public IPage<UserMassSendRecordVo> queryPage(Page page, UserMassSendRecordVo userMassSendRecordVo) { public IPage<UserMassSendRecordVo> queryPage(Page page, UserMassSendRecordVo userMassSendRecordVo) {
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
userMassSendRecordVo.setStoreId(nowAccountInfo.getStoreId());
return baseMapper.queryPage(page,userMassSendRecordVo); return baseMapper.queryPage(page,userMassSendRecordVo);
} }
@ -43,6 +47,9 @@ public class UserMassSendRecordServiceImpl extends ServiceImpl<UserMassSendRecor
*/ */
@Override @Override
public int insert(UserMassSendRecord userMassSendRecord) { public int insert(UserMassSendRecord userMassSendRecord) {
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
nowAccountInfo.setStoreId(nowAccountInfo.getStoreId());
nowAccountInfo.setChainStoreId(nowAccountInfo.getChainStoreId());
return baseMapper.insert(userMassSendRecord); return baseMapper.insert(userMassSendRecord);
} }

View File

@ -4,11 +4,18 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.fuint.business.userGroup.entity.UserMassSend; import com.fuint.business.userGroup.entity.UserMassSend;
import com.fuint.business.userGroup.entity.UserMassSendRecord;
import com.fuint.business.userGroup.mapper.UserMassSendMapper; import com.fuint.business.userGroup.mapper.UserMassSendMapper;
import com.fuint.business.userGroup.service.UserMassSendRecordService;
import com.fuint.business.userGroup.service.UserMassSendService; import com.fuint.business.userGroup.service.UserMassSendService;
import com.fuint.business.userGroup.vo.UserMassSendVo; import com.fuint.business.userGroup.vo.UserMassSendVo;
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 org.springframework.stereotype.Service;
import java.util.Date;
/** /**
* 会员群发(UserMassSend)表服务实现类 * 会员群发(UserMassSend)表服务实现类
* *
@ -18,8 +25,13 @@ import org.springframework.stereotype.Service;
@Service("userMassSendService") @Service("userMassSendService")
public class UserMassSendServiceImpl extends ServiceImpl<UserMassSendMapper,UserMassSend> implements UserMassSendService { public class UserMassSendServiceImpl extends ServiceImpl<UserMassSendMapper,UserMassSend> implements UserMassSendService {
@Autowired
private UserMassSendRecordService userMassSendRecordService;
@Override @Override
public IPage<UserMassSendVo> queryPage(Page page, UserMassSendVo userGroup) { public IPage<UserMassSendVo> queryPage(Page page, UserMassSendVo userGroup) {
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
userGroup.setStoreId(nowAccountInfo.getStoreId());
return baseMapper.queryPage(page,userGroup); return baseMapper.queryPage(page,userGroup);
} }
@ -42,7 +54,35 @@ public class UserMassSendServiceImpl extends ServiceImpl<UserMassSendMapper,User
*/ */
@Override @Override
public int insert(UserMassSend userMassSend) { public int insert(UserMassSend userMassSend) {
return baseMapper.insert(userMassSend); AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
userMassSend.setStoreId(nowAccountInfo.getStoreId());
userMassSend.setChainStoreId(nowAccountInfo.getChainStoreId());
if (userMassSend.getActivityTimeType().equals("1")){
if (userMassSend.getActivityTimeFront().before(new Date()) && userMassSend.getActivityTimeAfter().after(new Date())){
userMassSend.setStatus("1");
}else if (userMassSend.getActivityTimeFront().before(new Date()) && userMassSend.getActivityTimeAfter().before(new Date())){
userMassSend.setStatus("2");
}else {
userMassSend.setStatus("0");
}
}else {
userMassSend.setStatus("1");
}
int row = baseMapper.insert(userMassSend);
IPage<UserMassSendVo> userMassSendVoIPage = baseMapper.queryPage(new Page<>(), new UserMassSendVo());
UserMassSendVo userMassSendVo = userMassSendVoIPage.getRecords().get(0);
UserMassSendRecord userMassSendRecord = new UserMassSendRecord();
userMassSendRecord.setStoreId(userMassSendVo.getStoreId());
userMassSendRecord.setChainStoreId(userMassSendVo.getChainStoreId());
userMassSendRecord.setMassSendId(userMassSendVo.getId());
userMassSendRecord.setSendGift(userMassSendVo.getSenfGift());
userMassSendRecord.setSendWay(userMassSendVo.getSendWay());
userMassSendRecord.setUserNum(userMassSendVo.getSendUserNum());
userMassSendRecord.setSuccessNum(userMassSendRecord.getUserNum());
userMassSendRecord.setFailNum(0);
userMassSendRecord.setStatus("0");
userMassSendRecordService.insert(userMassSendRecord);
return row;
} }
/** /**

View File

@ -1,5 +1,6 @@
package com.fuint.business.userGroup.vo; package com.fuint.business.userGroup.vo;
import com.baomidou.mybatisplus.annotation.TableField;
import com.fuint.business.userGroup.entity.UserGroup; import com.fuint.business.userGroup.entity.UserGroup;
import lombok.Data; import lombok.Data;
@ -9,4 +10,14 @@ public class UserGroupVo extends UserGroup {
* 创建人 * 创建人
*/ */
private String accountName; private String accountName;
/**
* 会员数量
*/
@TableField(exist = false)
private Integer userNum;
/**
* 会员占比
*/
@TableField(exist = false)
private Double userProportion;
} }

View File

@ -13,4 +13,8 @@ public class UserMassSendRecordVo extends UserMassSendRecord {
* 创建人 * 创建人
*/ */
private String accountName; private String accountName;
/**
* 群发内容
*/
private String massContent;
} }

View File

@ -8,10 +8,7 @@ import com.fuint.business.userManager.vo.UserBalanceVo;
import com.fuint.framework.web.BaseController; import com.fuint.framework.web.BaseController;
import com.fuint.framework.web.ResponseObject; import com.fuint.framework.web.ResponseObject;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.*;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
@RestController @RestController
@RequestMapping("/business/userManager/userbalance") @RequestMapping("/business/userManager/userbalance")
@ -31,5 +28,8 @@ public class UserBalanceController extends BaseController {
return getSuccessResult(userBalanceService.getDataByZt(user)); return getSuccessResult(userBalanceService.getDataByZt(user));
} }
@GetMapping("{id}")
public ResponseObject logOffBalance(@PathVariable Integer id){
return getSuccessResult(userBalanceService.logOffBalance(id));
}
} }

View File

@ -76,6 +76,10 @@ public class UserBalance extends BaseEntity implements Serializable {
* 会员标签id * 会员标签id
*/ */
private Integer userLabelId; private Integer userLabelId;
/**
* 会员注销状态0使用中1已注销
*/
private String userStatus;
} }

View File

@ -10,7 +10,7 @@
</sql> </sql>
<sql id="selectUserAndBalance"> <sql id="selectUserAndBalance">
select mu.*,mub.id balanceId,mub.grade_id,mub.card_balance,mub.points,mub.consume_num,mub.growth_value,mub.refuel_money, select mu.*,mub.id balanceId,mub.grade_id,mub.card_balance,mub.points,mub.consume_num,mub.growth_value,mub.refuel_money,
mub.second_card,mub.fixing_level,mub.create_time balCreateTime,mub.remark remark,mub.user_label_id userLabelId mub.second_card,mub.fixing_level,mub.create_time balCreateTime,mub.remark remark,mub.user_label_id userLabelId,mub.user_status
FROM mt_user mu FROM mt_user mu
LEFT JOIN mt_user_balance mub ON mu.id = mub.mt_user_id LEFT JOIN mt_user_balance mub ON mu.id = mub.mt_user_id
</sql> </sql>

View File

@ -76,4 +76,11 @@ public interface UserBalanceService extends IService<UserBalance> {
int addUserBalance(Integer userId, Integer chainStoreId, Double changeBalance); int addUserBalance(Integer userId, Integer chainStoreId, Double changeBalance);
Double selectAllBalance(Integer storeId); Double selectAllBalance(Integer storeId);
/**
* 用户注销
* @param id
* @return
*/
int logOffBalance(Integer id);
} }

View File

@ -222,6 +222,15 @@ public class UserBalanceServiceImpl extends ServiceImpl<UserBalanceMapper, UserB
return cardBalance; return cardBalance;
} }
@Override
public int logOffBalance(Integer id) {
UserBalance userBalance = baseMapper.selectById(id);
if (ObjectUtil.isEmpty(userBalance)) return 0;
userBalance.setUserStatus("1");
return baseMapper.updateById(userBalance);
}
@Resource @Resource
RedisLock redisLock; RedisLock redisLock;

View File

@ -133,4 +133,8 @@ public class LJUserVo extends BaseEntity {
* 会员标签id * 会员标签id
*/ */
private Integer userLabelId; private Integer userLabelId;
/**
* 会员注销状态0使用中1已注销
*/
private Integer userStatus;
} }