bug
This commit is contained in:
parent
8e5e3827c9
commit
c3102bcb16
@ -44,6 +44,14 @@ export function getOilNameList() {
|
||||
})
|
||||
}
|
||||
|
||||
// 查询所有油号
|
||||
export function oilNumberList() {
|
||||
return request({
|
||||
url: '/business/petrolStationManagement/oilNumber/getList',
|
||||
method: 'get',
|
||||
// data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 查询所有油号
|
||||
export function oilNumbers() {
|
||||
|
37
fuintAdmin/src/api/setting/message.js
Normal file
37
fuintAdmin/src/api/setting/message.js
Normal 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
|
||||
})
|
||||
}
|
||||
|
||||
|
@ -84,3 +84,11 @@ export function exportUsers() {
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
//注销用户
|
||||
export function logOffUsers(id) {
|
||||
return request({
|
||||
url: '/business/userManager/userbalance/'+id,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
BIN
fuintAdmin/src/assets/images/wenhao.png
Normal file
BIN
fuintAdmin/src/assets/images/wenhao.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 704 B |
@ -64,7 +64,7 @@
|
||||
<!-- <el-card class="box-card" style="min-height: 500px;" shadow="never">-->
|
||||
<div class="table-box">
|
||||
<el-table
|
||||
:data="orderList"
|
||||
:data="orderList" border
|
||||
style="width: 100%">
|
||||
<el-table-column type="index" width="50" align="center" label="序号"/>
|
||||
<el-table-column prop="fleetName" align="center" label="车队名称"></el-table-column>
|
||||
|
@ -69,7 +69,7 @@
|
||||
<!-- <el-card class="box-card" style="min-height: 500px;" shadow="never">-->
|
||||
<div class="table-box">
|
||||
<el-table
|
||||
:data="orderList"
|
||||
:data="orderList" border
|
||||
style="width: 100%">
|
||||
<el-table-column type="index" width="50" align="center" label="序号"/>
|
||||
<el-table-column prop="fleetName" align="center" label="车队名称"></el-table-column>
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -50,9 +50,21 @@
|
||||
style="width: 100%">
|
||||
<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="remark" label="备注" width="180"></el-table-column>
|
||||
<el-table-column prop="address" label="会员数量"></el-table-column>
|
||||
<el-table-column prop="address" label="会员占比"></el-table-column>
|
||||
<el-table-column prop="remark" label="备注" width="180">
|
||||
<template slot-scope="scope">
|
||||
<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="状态">
|
||||
<template slot-scope="scope">
|
||||
<el-switch
|
||||
@ -64,7 +76,11 @@
|
||||
</el-switch>
|
||||
</template>
|
||||
</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="updateTime" label="更新时间"></el-table-column>
|
||||
<el-table-column align="center" label="操作" width="120">
|
||||
@ -97,9 +113,9 @@
|
||||
<div>
|
||||
<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
|
||||
v-model="queryParams1.groupName"
|
||||
v-model="queryParams1.name"
|
||||
placeholder="请输入活动名称"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
@ -121,9 +137,9 @@
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item style="float: right">
|
||||
<el-button type="primary" icon="el-icon-search" @click="handleQuery">搜索</el-button>
|
||||
<el-button icon="el-icon-refresh" @click="resetQuery">重置</el-button>
|
||||
<el-button type="primary" @click="handleAdd">新增定时群发</el-button>
|
||||
<el-button type="primary" icon="el-icon-search" @click="handleQuery1">搜索</el-button>
|
||||
<el-button icon="el-icon-refresh" @click="resetQuery1">重置</el-button>
|
||||
<el-button type="primary" @click="handleAdd1">新增定时群发</el-button>
|
||||
</el-form-item>
|
||||
|
||||
</el-form>
|
||||
@ -136,11 +152,31 @@
|
||||
style="width: 100%">
|
||||
<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="activityTime" label="活动时间" width="180"></el-table-column>
|
||||
<el-table-column prop="sendFrequency" label="发送频次"></el-table-column>
|
||||
<el-table-column prop="address" label="群发会员"></el-table-column>
|
||||
<el-table-column prop="activityTimeType" label="活动时间" width="190">
|
||||
<template slot-scope="scope">
|
||||
<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="活动状态">
|
||||
<template slot-scope="scope">
|
||||
<div v-if="scope.row.status == 0" style="color: #FF7E00">未开始</div>
|
||||
@ -156,13 +192,13 @@
|
||||
size="mini"
|
||||
type="text"
|
||||
v-if="scope.row.status == 0"
|
||||
@click="handleUpdate(scope.row)"
|
||||
@click="handleUpdate1(scope.row)"
|
||||
>修改
|
||||
</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
@click="handleDelete(scope.row)"
|
||||
@click="handleDelete1(scope.row)"
|
||||
>删除
|
||||
</el-button>
|
||||
</template>
|
||||
@ -178,7 +214,7 @@
|
||||
/>
|
||||
</div>
|
||||
<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-item label="" prop="groupName" style="width: 180px">
|
||||
@ -216,20 +252,49 @@
|
||||
border
|
||||
style="width: 100%">
|
||||
<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="sendGift" label="群发礼品" width="180"> </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="activityName" 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="massContent" label="群发内容" width="220"></el-table-column>
|
||||
|
||||
<el-table-column prop="userNum" label="群发会员数量"> </el-table-column>
|
||||
<el-table-column prop="successNum" label="成功数量"> </el-table-column>
|
||||
<el-table-column prop="failNum" label="失败数量"> </el-table-column>
|
||||
<el-table-column prop="status" label="状态"> </el-table-column>
|
||||
<el-table-column prop="address" label="已领取数量"> </el-table-column>
|
||||
<el-table-column prop="address" label="已核销数量"> </el-table-column>
|
||||
<el-table-column prop="address" label="未核销数量"> </el-table-column>
|
||||
<el-table-column prop="accountName" label="操作人员"> </el-table-column>
|
||||
<el-table-column prop="createTime" label="群发时间"> </el-table-column>
|
||||
<el-table-column prop="userNum" label="群发会员数量">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ scope.row.userNum || 0 }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="successNum" label="成功数量">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ scope.row.successNum || 0 }}</span>
|
||||
</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">
|
||||
<template slot-scope="scope">
|
||||
<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-item label="分组名称" prop="labelName">
|
||||
<el-input v-model="form.labelName" placeholder="请输入分组名称" maxlength="30"/>
|
||||
<el-form-item label="分组名称" prop="groupName">
|
||||
<el-input v-model="form.groupName" placeholder="请输入分组名称" maxlength="30"/>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="会员等级" prop="paymentType">
|
||||
<el-select v-model="form.paymentType" placeholder="请选择会员等级" style="width: 100%">
|
||||
<el-option label="现金" value="CASH"></el-option>
|
||||
<el-form-item label="会员等级" prop="gradeId">
|
||||
<el-select v-model="form.gradeId" placeholder="请选择会员等级" style="width: 100%">
|
||||
<el-option v-for="(item,index) in userGradeList" :key="index" :label="item.name"
|
||||
:value="item.id"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="会员标签" prop="paymentType">
|
||||
<el-select v-model="form.paymentType" placeholder="请选择会员标签(多选)" style="width: 100%">
|
||||
<el-option label="现金" value="CASH"></el-option>
|
||||
<el-form-item label="会员标签" prop="userLabelId">
|
||||
<el-select v-model="form.userLabelId" multiple placeholder="请选择会员标签(多选)" style="width: 100%">
|
||||
<el-option v-for="(item,index) in userLabelList" :key="index" :label="item.labelName"
|
||||
:value="item.id+''"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="会员性别" prop="paymentType">
|
||||
<!-- <el-select v-model="form.paymentType" placeholder="请选择会员标签(多选)" style="width: 100%">-->
|
||||
<!-- <el-option label="现金" value="CASH"></el-option>-->
|
||||
<!-- </el-select>-->
|
||||
<div class="d-s">
|
||||
<div class="icon-type" v-for="(item,index) in paymentTypelist" :key="index" :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 label="会员性别" prop="userSex">
|
||||
<el-checkbox-group v-model="form.userSex">
|
||||
<el-checkbox type="name" label="男"></el-checkbox>
|
||||
<el-checkbox type="name" label="女"></el-checkbox>
|
||||
<el-checkbox type="name" label="不详"></el-checkbox>
|
||||
</el-checkbox-group>
|
||||
</el-form-item>
|
||||
<el-form-item label="会员年龄" prop="paymentType">
|
||||
<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>
|
||||
<el-input placeholder="请输入年龄" v-model="input" style="width: 190px"></el-input>
|
||||
<el-input placeholder="请输入年龄" v-model="form.userAgeAfter" style="width: 190px"></el-input>
|
||||
</div>
|
||||
</el-form-item>
|
||||
<el-form-item label="会员余额" prop="paymentType">
|
||||
<el-input placeholder="请输入内容" v-model="form.age">
|
||||
<template slot="append">.com</template>
|
||||
</el-input>
|
||||
<div class="d-s">
|
||||
<el-input placeholder="请输入余额" v-model="form.userBalanceFront" style="width: 190px"></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 label="会员积分" prop="paymentType">
|
||||
<el-input placeholder="请输入内容" v-model="form.age">
|
||||
<template slot="append">.com</template>
|
||||
</el-input>
|
||||
<div class="d-s">
|
||||
<el-input placeholder="请输入积分" v-model="form.userPointFront" style="width: 190px"></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 label="充值次数" prop="paymentType">
|
||||
<el-input placeholder="请输入内容" v-model="form.age">
|
||||
<template slot="append">.com</template>
|
||||
</el-input>
|
||||
<div class="d-s">
|
||||
<el-input placeholder="请输入充值次数" v-model="form.rechargeNumFront" style="width: 190px"></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 label="充值金额" prop="paymentType">
|
||||
<el-input placeholder="请输入内容" v-model="form.age">
|
||||
<template slot="append">.com</template>
|
||||
</el-input>
|
||||
<div class="d-s">
|
||||
<el-input placeholder="请输入充值金额" v-model="form.rechargeAmountFront" style="width: 190px"></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 label="消费周期" prop="paymentType">
|
||||
<el-select v-model="form.paymentType" placeholder="请选择会员标签(多选)" style="width: 100%">
|
||||
<el-option label="现金" value="CASH"></el-option>
|
||||
</el-select>
|
||||
<el-form-item label="消费周期" prop="consumeCycle">
|
||||
<div class="d-s">
|
||||
<div class="icon-type" v-for="(item,index) in paymentTypelist" :key="index"
|
||||
: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 label="消费油品" prop="paymentType">
|
||||
<el-select v-model="form.paymentType" placeholder="请选择会员标签(多选)" style="width: 100%">
|
||||
<el-option label="现金" value="CASH"></el-option>
|
||||
<el-form-item label="消费油品" prop="consumeOil">
|
||||
<el-select v-model="form.consumeOil" multiple placeholder="请选择油品(多选)" style="width: 100%">
|
||||
<el-option v-for="(item,index) in oilNumberList" :key="index"
|
||||
:label="getOilNamess(oilNameList,item.oilName)" :value="item.oilName"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="消费次数" prop="paymentType">
|
||||
<el-input placeholder="请输入内容" v-model="form.age">
|
||||
<template slot="append">.com</template>
|
||||
</el-input>
|
||||
<div class="d-s">
|
||||
<el-input placeholder="请输入消费次数" v-model="form.consumeNumFront" style="width: 190px"></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 label="消费金额" prop="paymentType">
|
||||
<el-input placeholder="请输入内容" v-model="form.age">
|
||||
<template slot="append">.com</template>
|
||||
</el-input>
|
||||
<div class="d-s">
|
||||
<el-input placeholder="请输入消费金额" v-model="form.consumeAmountFront" style="width: 190px"></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 label="平均消费" prop="paymentType">
|
||||
<el-input placeholder="请输入内容" v-model="form.age">
|
||||
<template slot="append">.com</template>
|
||||
</el-input>
|
||||
<div class="d-s">
|
||||
<el-input placeholder="请输入平均消费金额" v-model="form.averageConsumeFront"
|
||||
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 label="状态" prop="status">
|
||||
@ -344,7 +429,7 @@
|
||||
</el-switch>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="备注" >
|
||||
<el-form-item label="备注">
|
||||
<el-input v-model="form.remark" placeholder="请输入备注" type="textarea"/>
|
||||
</el-form-item>
|
||||
|
||||
@ -355,21 +440,153 @@
|
||||
</div>
|
||||
</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>
|
||||
</template>
|
||||
<script>
|
||||
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 {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 {
|
||||
data() {
|
||||
return {
|
||||
tabindex: 0,
|
||||
tindex: 0,
|
||||
paymentTypelist:[
|
||||
"全部", "男", "女","不详",
|
||||
tindex: 0,
|
||||
tindex1: 0,
|
||||
tindex2: 0,
|
||||
tindex3: 0,
|
||||
paymentTypelist: [
|
||||
"不限制", "7天", "15天", "30天", "60天", "90天", "180天",
|
||||
],
|
||||
activityTimeTypeList: [
|
||||
"永久有效", "自定义"
|
||||
],
|
||||
sendFrequencyList: [
|
||||
"每天一次", "周固定时间", "月固定时间", "法定节日时间"
|
||||
],
|
||||
jumpLinkList: [
|
||||
"小程序链接", "常用链接"
|
||||
],
|
||||
weekList: ["周一", "周二", "周三", "周四", "周五", "周六", "周日"],
|
||||
weekDay: [],
|
||||
monthDay: [],
|
||||
tableData: [{
|
||||
status: 0,
|
||||
date: '2016-05-02',
|
||||
@ -404,6 +621,7 @@ export default {
|
||||
name: "群发记录",
|
||||
}
|
||||
],
|
||||
|
||||
total: 0,
|
||||
queryParams: {
|
||||
page: 1,
|
||||
@ -412,6 +630,7 @@ export default {
|
||||
beginTime: "",
|
||||
endTime: "",
|
||||
userGroupList: [],
|
||||
|
||||
total1: 0,
|
||||
queryParams1: {
|
||||
page: 1,
|
||||
@ -420,6 +639,7 @@ export default {
|
||||
beginTime1: "",
|
||||
endTime1: "",
|
||||
massSendList: [],
|
||||
|
||||
total2: 0,
|
||||
queryParams2: {
|
||||
page: 1,
|
||||
@ -428,24 +648,138 @@ export default {
|
||||
beginTime2: "",
|
||||
endTime2: "",
|
||||
massSendRecordList: [],
|
||||
title:'',
|
||||
open:false,
|
||||
form:{},
|
||||
|
||||
title: '',
|
||||
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: {
|
||||
labelName: [
|
||||
{required: true, message: "标签名称不能为空", trigger: "blur"},
|
||||
groupName: [
|
||||
{required: true, message: "分组名称不能为空", trigger: "blur"},
|
||||
],
|
||||
status: [
|
||||
{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() {
|
||||
this.getList()
|
||||
this.getUserLabelList()
|
||||
},
|
||||
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() {
|
||||
this.open = false;
|
||||
@ -455,6 +789,9 @@ export default {
|
||||
submitForm: function () {
|
||||
this.$refs["form"].validate(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) {
|
||||
addUserGroup(this.form).then(res => {
|
||||
this.$message.success("添加成功")
|
||||
@ -473,8 +810,21 @@ export default {
|
||||
}
|
||||
});
|
||||
},
|
||||
Typeindex(index){
|
||||
Typeindex(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() {
|
||||
let dateRange = []
|
||||
@ -515,7 +865,35 @@ export default {
|
||||
getUserGroup(row.id).then(res => {
|
||||
this.open = true;
|
||||
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(() => {
|
||||
});
|
||||
},
|
||||
// 删除按钮操作
|
||||
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() {
|
||||
this.tindex = 0
|
||||
this.reset();
|
||||
this.form = {
|
||||
status: "qy"
|
||||
status: "qy",
|
||||
userSex: [],
|
||||
consumeCycle: this.tindex
|
||||
}
|
||||
this.open = true;
|
||||
this.title = "新增会员标签";
|
||||
},
|
||||
// 搜索按钮操作
|
||||
handleQuery1() {
|
||||
this.queryParams1.page = 1;
|
||||
this.getList1();
|
||||
},
|
||||
// 重置按钮操作
|
||||
resetQuery1() {
|
||||
this.queryParams1 = {
|
||||
page: 1,
|
||||
pageSize: 10,
|
||||
}
|
||||
this.beginTime1 = ''
|
||||
this.endTime1 = ''
|
||||
this.handleQuery1();
|
||||
},
|
||||
// 搜索按钮操作
|
||||
handleQuery() {
|
||||
this.queryParams.page = 1;
|
||||
this.getList();
|
||||
@ -561,11 +986,13 @@ export default {
|
||||
},
|
||||
getindex(index) {
|
||||
this.tabindex = index
|
||||
if (index==0){
|
||||
if (index == 0) {
|
||||
this.getList()
|
||||
}else if (index==1){
|
||||
this.getUserLabelList()
|
||||
} else if (index == 1) {
|
||||
this.getList1()
|
||||
}else if (index==2){
|
||||
this.getMessageList()
|
||||
} else if (index == 2) {
|
||||
this.getList2()
|
||||
}
|
||||
}
|
||||
@ -629,7 +1056,8 @@ export default {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
.icon-type{
|
||||
|
||||
.icon-type {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
font-weight: 400;
|
||||
@ -638,7 +1066,8 @@ export default {
|
||||
margin-right: 20px;
|
||||
cursor: pointer;
|
||||
}
|
||||
.acvtive{
|
||||
|
||||
.acvtive {
|
||||
color: #FF770F !important;
|
||||
}
|
||||
</style>
|
||||
|
@ -9,6 +9,10 @@ import com.fuint.framework.web.ResponseObject;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.time.LocalDate;
|
||||
import java.time.format.DateTimeFormatter;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 油机汽机配置(UserMassSend)表控制层
|
||||
@ -84,5 +88,26 @@ public class UserMassSendController extends BaseController {
|
||||
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 "元旦,春节,清明节,劳动节,端午节,中秋节,国庆节";
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -3,6 +3,7 @@ package com.fuint.business.userGroup.entity;
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.fuint.framework.entity.BaseEntity;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
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、法定节日时间
|
||||
*/
|
||||
|
@ -3,9 +3,10 @@
|
||||
<mapper namespace="com.fuint.business.userGroup.mapper.UserMassSendRecordMapper">
|
||||
|
||||
<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
|
||||
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
|
||||
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 message_template mt on ums.message_id = mt.id
|
||||
LEFT JOIN t_account ta on umsr.create_by = ta.acct_id
|
||||
<where>
|
||||
<if test="entity.chainStoreId != null and entity.chainStoreId != ''">
|
||||
and umsr.chain_store_id = #{entity.chainStoreId}
|
||||
|
@ -7,6 +7,8 @@ import com.fuint.business.userGroup.entity.UserGroup;
|
||||
import com.fuint.business.userGroup.mapper.UserGroupMapper;
|
||||
import com.fuint.business.userGroup.service.UserGroupService;
|
||||
import com.fuint.business.userGroup.vo.UserGroupVo;
|
||||
import com.fuint.common.dto.AccountInfo;
|
||||
import com.fuint.common.util.TokenUtil;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
/**
|
||||
@ -20,6 +22,8 @@ public class UserGroupServiceImpl extends ServiceImpl<UserGroupMapper,UserGroup>
|
||||
|
||||
@Override
|
||||
public IPage<UserGroupVo> queryPage(Page page, UserGroupVo userGroup) {
|
||||
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
|
||||
userGroup.setStoreId(nowAccountInfo.getStoreId());
|
||||
return baseMapper.queryPage(page,userGroup);
|
||||
}
|
||||
|
||||
@ -42,6 +46,9 @@ public class UserGroupServiceImpl extends ServiceImpl<UserGroupMapper,UserGroup>
|
||||
*/
|
||||
@Override
|
||||
public int insert(UserGroup userGroup) {
|
||||
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
|
||||
userGroup.setStoreId(nowAccountInfo.getStoreId());
|
||||
userGroup.setChainStoreId(nowAccountInfo.getChainStoreId());
|
||||
return baseMapper.insert(userGroup);
|
||||
}
|
||||
|
||||
|
@ -7,6 +7,8 @@ import com.fuint.business.userGroup.entity.UserMassSendRecord;
|
||||
import com.fuint.business.userGroup.mapper.UserMassSendRecordMapper;
|
||||
import com.fuint.business.userGroup.service.UserMassSendRecordService;
|
||||
import com.fuint.business.userGroup.vo.UserMassSendRecordVo;
|
||||
import com.fuint.common.dto.AccountInfo;
|
||||
import com.fuint.common.util.TokenUtil;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
/**
|
||||
@ -21,6 +23,8 @@ public class UserMassSendRecordServiceImpl extends ServiceImpl<UserMassSendRecor
|
||||
|
||||
@Override
|
||||
public IPage<UserMassSendRecordVo> queryPage(Page page, UserMassSendRecordVo userMassSendRecordVo) {
|
||||
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
|
||||
userMassSendRecordVo.setStoreId(nowAccountInfo.getStoreId());
|
||||
return baseMapper.queryPage(page,userMassSendRecordVo);
|
||||
}
|
||||
|
||||
@ -43,6 +47,9 @@ public class UserMassSendRecordServiceImpl extends ServiceImpl<UserMassSendRecor
|
||||
*/
|
||||
@Override
|
||||
public int insert(UserMassSendRecord userMassSendRecord) {
|
||||
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
|
||||
nowAccountInfo.setStoreId(nowAccountInfo.getStoreId());
|
||||
nowAccountInfo.setChainStoreId(nowAccountInfo.getChainStoreId());
|
||||
return baseMapper.insert(userMassSendRecord);
|
||||
}
|
||||
|
||||
|
@ -4,11 +4,18 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
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.service.UserMassSendRecordService;
|
||||
import com.fuint.business.userGroup.service.UserMassSendService;
|
||||
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 java.util.Date;
|
||||
|
||||
/**
|
||||
* 会员群发(UserMassSend)表服务实现类
|
||||
*
|
||||
@ -18,8 +25,13 @@ import org.springframework.stereotype.Service;
|
||||
@Service("userMassSendService")
|
||||
public class UserMassSendServiceImpl extends ServiceImpl<UserMassSendMapper,UserMassSend> implements UserMassSendService {
|
||||
|
||||
@Autowired
|
||||
private UserMassSendRecordService userMassSendRecordService;
|
||||
|
||||
@Override
|
||||
public IPage<UserMassSendVo> queryPage(Page page, UserMassSendVo userGroup) {
|
||||
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
|
||||
userGroup.setStoreId(nowAccountInfo.getStoreId());
|
||||
return baseMapper.queryPage(page,userGroup);
|
||||
}
|
||||
|
||||
@ -42,7 +54,35 @@ public class UserMassSendServiceImpl extends ServiceImpl<UserMassSendMapper,User
|
||||
*/
|
||||
@Override
|
||||
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;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -1,5 +1,6 @@
|
||||
package com.fuint.business.userGroup.vo;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.fuint.business.userGroup.entity.UserGroup;
|
||||
import lombok.Data;
|
||||
|
||||
@ -9,4 +10,14 @@ public class UserGroupVo extends UserGroup {
|
||||
* 创建人
|
||||
*/
|
||||
private String accountName;
|
||||
/**
|
||||
* 会员数量
|
||||
*/
|
||||
@TableField(exist = false)
|
||||
private Integer userNum;
|
||||
/**
|
||||
* 会员占比
|
||||
*/
|
||||
@TableField(exist = false)
|
||||
private Double userProportion;
|
||||
}
|
||||
|
@ -13,4 +13,8 @@ public class UserMassSendRecordVo extends UserMassSendRecord {
|
||||
* 创建人
|
||||
*/
|
||||
private String accountName;
|
||||
/**
|
||||
* 群发内容
|
||||
*/
|
||||
private String massContent;
|
||||
}
|
||||
|
@ -8,10 +8,7 @@ import com.fuint.business.userManager.vo.UserBalanceVo;
|
||||
import com.fuint.framework.web.BaseController;
|
||||
import com.fuint.framework.web.ResponseObject;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
@RestController
|
||||
@RequestMapping("/business/userManager/userbalance")
|
||||
@ -31,5 +28,8 @@ public class UserBalanceController extends BaseController {
|
||||
return getSuccessResult(userBalanceService.getDataByZt(user));
|
||||
}
|
||||
|
||||
|
||||
@GetMapping("{id}")
|
||||
public ResponseObject logOffBalance(@PathVariable Integer id){
|
||||
return getSuccessResult(userBalanceService.logOffBalance(id));
|
||||
}
|
||||
}
|
||||
|
@ -76,6 +76,10 @@ public class UserBalance extends BaseEntity implements Serializable {
|
||||
* 会员标签id
|
||||
*/
|
||||
private Integer userLabelId;
|
||||
/**
|
||||
* 会员注销状态:0、使用中;1、已注销
|
||||
*/
|
||||
private String userStatus;
|
||||
|
||||
}
|
||||
|
||||
|
@ -10,7 +10,7 @@
|
||||
</sql>
|
||||
<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,
|
||||
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
|
||||
LEFT JOIN mt_user_balance mub ON mu.id = mub.mt_user_id
|
||||
</sql>
|
||||
|
@ -76,4 +76,11 @@ public interface UserBalanceService extends IService<UserBalance> {
|
||||
int addUserBalance(Integer userId, Integer chainStoreId, Double changeBalance);
|
||||
|
||||
Double selectAllBalance(Integer storeId);
|
||||
|
||||
/**
|
||||
* 用户注销
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
int logOffBalance(Integer id);
|
||||
}
|
||||
|
@ -222,6 +222,15 @@ public class UserBalanceServiceImpl extends ServiceImpl<UserBalanceMapper, UserB
|
||||
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
|
||||
RedisLock redisLock;
|
||||
|
||||
|
@ -133,4 +133,8 @@ public class LJUserVo extends BaseEntity {
|
||||
* 会员标签id
|
||||
*/
|
||||
private Integer userLabelId;
|
||||
/**
|
||||
* 会员注销状态:0、使用中;1、已注销
|
||||
*/
|
||||
private Integer userStatus;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user