Merge remote-tracking branch 'origin/main'
This commit is contained in:
commit
2f3d3a3e2e
@ -51,7 +51,7 @@
|
||||
<i class="el-icon-caret-bottom"/>
|
||||
</div>
|
||||
<el-dropdown-menu slot="dropdown">
|
||||
<el-dropdown-item @click.native="prsswrod">
|
||||
<el-dropdown-item @click.native="prsswrod()">
|
||||
<span>修改密码</span>
|
||||
</el-dropdown-item>
|
||||
<el-dropdown-item divided @click.native="logout">
|
||||
@ -66,15 +66,17 @@
|
||||
<el-dialog
|
||||
title="修改密码"
|
||||
:visible.sync="dialogVisible"
|
||||
width="30%" :before-close="handleClose">
|
||||
width="30%"
|
||||
:modal="false"
|
||||
:before-close="handleClose">
|
||||
<el-form :model="ruleForm" :rules="rules" ref="ruleForm" label-width="80px" class="demo-ruleForm">
|
||||
<el-form-item label="新密码" prop="password">
|
||||
<el-input v-model="ruleForm.password" show-password></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="重复密码" prop="passwords">
|
||||
<el-input show-password v-model="ruleForm.passwords"></el-input>
|
||||
<el-input show-password v-model="ruleForm.passwords"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item >
|
||||
<el-form-item>
|
||||
<el-button @click="resetForm('ruleForm')">取消</el-button>
|
||||
<el-button type="primary" @click="submitForm('ruleForm')">保存</el-button>
|
||||
</el-form-item>
|
||||
@ -155,19 +157,19 @@ export default {
|
||||
day: -1,
|
||||
storeName: "",
|
||||
isFullscreen: false,
|
||||
dialogVisible:false,
|
||||
accountId:"",
|
||||
ruleForm:{},
|
||||
dialogVisible: false,
|
||||
accountId: "",
|
||||
ruleForm: {},
|
||||
rules: {
|
||||
password: [
|
||||
{ required: true, message: '请输入新密码', trigger: 'blur' },
|
||||
{ min: 3, max: 15, message: '长度在 3 到 15 个字符', trigger: 'blur' },
|
||||
{ validator: validatePass, trigger: 'blur' }
|
||||
{required: true, message: '请输入新密码', trigger: 'blur'},
|
||||
{min: 3, max: 15, message: '长度在 3 到 15 个字符', trigger: 'blur'},
|
||||
{validator: validatePass, trigger: 'blur'}
|
||||
],
|
||||
passwords: [
|
||||
{ required: true, message: '请输入密码', trigger: 'blur' },
|
||||
{ min: 3, max: 15, message: '长度在 3 到 15 个字符', trigger: 'blur' },
|
||||
{ validator: validatePass2, trigger: 'blur' }
|
||||
{required: true, message: '请输入密码', trigger: 'blur'},
|
||||
{min: 3, max: 15, message: '长度在 3 到 15 个字符', trigger: 'blur'},
|
||||
{validator: validatePass2, trigger: 'blur'}
|
||||
],
|
||||
}
|
||||
}
|
||||
@ -216,11 +218,12 @@ export default {
|
||||
.then(_ => {
|
||||
done();
|
||||
})
|
||||
.catch(_ => {});
|
||||
.catch(_ => {
|
||||
});
|
||||
},
|
||||
prsswrod(){
|
||||
this.dialogVisible =! this.dialogVisible
|
||||
getAccountInfo().then(res=>{
|
||||
prsswrod() {
|
||||
this.dialogVisible = !this.dialogVisible
|
||||
getAccountInfo().then(res => {
|
||||
this.accountId = res.data.accountId
|
||||
})
|
||||
},
|
||||
@ -235,12 +238,12 @@ export default {
|
||||
this.$refs[formName].validate((valid) => {
|
||||
if (valid) {
|
||||
let data = {
|
||||
acctId : this.accountId,
|
||||
acctId: this.accountId,
|
||||
password: this.ruleForm.password,
|
||||
}
|
||||
resetPwd(data).then(res=>{
|
||||
resetPwd(data).then(res => {
|
||||
console.log(res)
|
||||
if(res.code == 200){
|
||||
if (res.code == 200) {
|
||||
this.dialogVisible = false
|
||||
this.$store.dispatch('LogOut').then(() => {
|
||||
location.href = '/';
|
||||
|
@ -57,7 +57,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<div style="margin-top: 20px">
|
||||
<el-form-item label="时间段" prop="suitTimeSlotFront">
|
||||
<el-form-item label="时间段" prop="suitTimeSlotFront" label-width="70px" >
|
||||
<el-time-picker
|
||||
v-model="ruleForm.suitTimeSlotFront"
|
||||
format="HH:mm"
|
||||
@ -75,7 +75,7 @@
|
||||
</div>
|
||||
</el-form-item>
|
||||
<el-form-item label="适用会员等级" prop="dieselUserLevel">
|
||||
<el-select v-model="ruleForm.dieselUserLevel" multiple clearable placeholder="请选择会员等级(多选)">
|
||||
<el-select v-model="ruleForm.dieselUserLevel" multiple clearable placeholder="请选择会员等级(多选)" style="width: 100%">
|
||||
<el-option
|
||||
v-for="(item,index) in userGradeList"
|
||||
:label="item.name"
|
||||
@ -84,7 +84,7 @@
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="会员标签" prop="userLabelIds">
|
||||
<el-select v-model="ruleForm.userLabelIds" multiple clearable placeholder="请选择会员标签(多选)">
|
||||
<el-select v-model="ruleForm.userLabelIds" multiple clearable placeholder="请选择会员标签(多选)" style="width: 100%">
|
||||
<el-option
|
||||
v-for="item in userLabelList"
|
||||
:key="item.id+''"
|
||||
@ -142,13 +142,14 @@
|
||||
@click="addPoints(pointOrderType)">
|
||||
</div>
|
||||
|
||||
<div v-for="(item,index) in pointList" :key="index" style="font-size: 14px;margin: 15px 0">
|
||||
<div v-for="(item,index) in pointList" :key="index" style="font-size: 14px;margin: 15px 0;margin-left: 11%">
|
||||
<span>消费满</span>
|
||||
<el-input placeholder="请输入消费金额" style="width: 30%;margin: 0 10px" v-model="item.consumeAmount">
|
||||
<template slot="append">元</template>
|
||||
<el-input placeholder="请输入" style="width: 39%;margin: 0 10px" v-model="item.consumeAmount">
|
||||
<template slot="append" v-if="pointOrderType==2">L</template>
|
||||
<template slot="append" v-else>元</template>
|
||||
</el-input>
|
||||
<span>送</span>
|
||||
<el-input placeholder="请输入赠送积分" style="width: 30%;margin: 0 10px" v-model="item.givePoints">
|
||||
<el-input placeholder="请输入赠送积分" style="width: 40%;margin: 0 10px" v-model="item.givePoints">
|
||||
<template slot="append">积分</template>
|
||||
</el-input>
|
||||
<img src="@/assets/images/ljt.png" style="width: 25px;height: 25px;"
|
||||
@ -169,13 +170,14 @@
|
||||
@click="addGrowthValues(growthValueOrderType)">
|
||||
</div>
|
||||
|
||||
<div v-for="(item,index) in growthValueList" :key="index" style="font-size: 14px;margin: 15px 0">
|
||||
<div v-for="(item,index) in growthValueList" :key="index" style="font-size: 14px;margin: 15px 0;margin-left: 11%">
|
||||
<span>消费满</span>
|
||||
<el-input placeholder="请输入消费金额" style="width: 30%;margin: 0 10px" v-model="item.consumeAmount">
|
||||
<template slot="append">元</template>
|
||||
<el-input placeholder="请输入" style="width: 39%;margin: 0 10px" v-model="item.consumeAmount">
|
||||
<template slot="append" v-if="growthValueOrderType==2">L</template>
|
||||
<template slot="append" v-else>元</template>
|
||||
</el-input>
|
||||
<span>送</span>
|
||||
<el-input placeholder="请输入赠送成长值" style="width: 30%;margin: 0 10px"
|
||||
<el-input placeholder="请输入赠送成长值" style="width: 40%;margin: 0 10px"
|
||||
v-model="item.giveGrowthValue">
|
||||
<template slot="append">成长值</template>
|
||||
</el-input>
|
||||
@ -197,20 +199,21 @@
|
||||
@click="addCoupons(couponOrderType)">
|
||||
</div>
|
||||
|
||||
<div v-for="(item,index) in couponList" :key="index" style="font-size: 14px;margin: 15px 0">
|
||||
<div v-for="(item,index) in couponList" :key="index" style="font-size: 14px;margin: 15px 0;margin-left: 11%">
|
||||
<span>消费满</span>
|
||||
<el-input placeholder="请输入消费金额" style="width: 30%;margin: 0 10px" v-model="item.consumeAmount">
|
||||
<template slot="append">元</template>
|
||||
<el-input placeholder="请输入" style="width: 30%;margin: 0 10px" v-model="item.consumeAmount">
|
||||
<template slot="append" v-if="couponOrderType==2">L</template>
|
||||
<template slot="append" v-else>元</template>
|
||||
</el-input>
|
||||
<span>送</span>
|
||||
<el-select v-model="item.vouchersId" style="margin-left: 10px;width: 20%" placeholder="请选择">
|
||||
<el-select v-model="item.vouchersId" style="margin-left: 10px;width: 22%" placeholder="请选择">
|
||||
<el-option
|
||||
v-for="(item1,index1) in cardCouponList"
|
||||
:key="index1"
|
||||
:label="item1.name"
|
||||
:value="item1.id"></el-option>
|
||||
</el-select>
|
||||
<el-input style="width: 20%;margin: 0 10px" v-model="item.giftCardTotal">
|
||||
<el-input style="width: 25%;margin: 0 10px" v-model="item.giftCardTotal">
|
||||
<template slot="append">张</template>
|
||||
</el-input>
|
||||
<img src="@/assets/images/ljt.png" style="width: 25px;height: 25px;"
|
||||
|
@ -44,10 +44,10 @@
|
||||
<div style="display: flex">
|
||||
<div style="width: 17%">
|
||||
<el-checkbox-group v-model="ruleForm.courtesyReward">
|
||||
<div>
|
||||
<div >
|
||||
<el-checkbox label="3" name="type">赠送积分</el-checkbox>
|
||||
</div>
|
||||
<div>
|
||||
<div style="margin: 10px 0">
|
||||
<el-checkbox label="2" name="type">赠送成长值</el-checkbox>
|
||||
</div>
|
||||
<div style="display: flex;font-size: 14px;margin: 15px 0">
|
||||
|
@ -119,7 +119,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<div style="margin-top: 20px">
|
||||
<el-form-item label="时间段" prop="timeApplyStart">
|
||||
<el-form-item label="时间段" prop="timeApplyStart" label-width="65px">
|
||||
<el-time-picker
|
||||
v-model="ruleForm.timeApplyStart"
|
||||
format="HH:mm"
|
||||
|
@ -174,7 +174,7 @@
|
||||
|
||||
<el-form-item label="优惠条件" required style="width: 45%;" v-if="ruleForm.type=='3'">
|
||||
<div class="d-s">
|
||||
<el-select v-model="ruleForm.useType" placeholder="请选择" style="width: 100px">
|
||||
<el-select v-model="ruleForm.useType" placeholder="请选择" style="width: 110px">
|
||||
<el-option label="订单金额" value="1"/>
|
||||
<el-option label="实收金额" value="2"/>
|
||||
<el-option label="兑换券" value="3"/>
|
||||
@ -182,7 +182,7 @@
|
||||
<el-option label="油品立减券" value="5"/>
|
||||
<el-option label="单品代金券" value="6"/>
|
||||
</el-select>
|
||||
<div style="margin: 0px 5px;">范围</div>
|
||||
<div style="width: 60px;text-align: center">范围</div>
|
||||
<el-input placeholder="" v-model="ruleForm.zkStartAmount" style="width: 110px">
|
||||
<template slot="append">元</template>
|
||||
</el-input>
|
||||
@ -660,7 +660,7 @@ export default {
|
||||
},
|
||||
uploading: false,
|
||||
fileList: [],
|
||||
labelPosition: 'left',
|
||||
labelPosition: 'right',
|
||||
queryParams: {
|
||||
number: '',
|
||||
remark: '',
|
||||
|
@ -325,7 +325,7 @@
|
||||
:value="dict.value"></el-checkbox>
|
||||
</el-checkbox-group>
|
||||
</el-form-item>
|
||||
<el-form-item label=" 会员标签" prop="babelIds">
|
||||
<el-form-item label=" 会员标签" >
|
||||
<el-select v-model="ruleForm1.babelIds" multiple placeholder="请选择会员标签" style="width: 100%">
|
||||
<el-option
|
||||
v-for="item in userLabelList"
|
||||
@ -557,9 +557,6 @@ export default {
|
||||
paymentType: [
|
||||
{required: true, message: '请输入支付方式', trigger: 'blur'},
|
||||
],
|
||||
babelIds: [
|
||||
{required: true, message: '请输入会员标签', trigger: 'blur'},
|
||||
],
|
||||
moneyMin: [
|
||||
{required: true, message: '请输入实收金额', trigger: 'blur'},
|
||||
],
|
||||
@ -661,6 +658,15 @@ export default {
|
||||
},
|
||||
// 提交活动规则
|
||||
submitRuleForm() {
|
||||
if (this.ruleForm1.consumeType == 1){
|
||||
if (!this.ruleForm1.literMin || !this.ruleForm1.literMax){
|
||||
this.$message.error("请填写消费条件信息")
|
||||
}
|
||||
}else {
|
||||
if (!this.ruleForm1.moneyMin || !this.ruleForm1.moneyMax){
|
||||
this.$message.error("请填写消费条件信息")
|
||||
}
|
||||
}
|
||||
this.$refs["ruleForm1"].validate((valid) => {
|
||||
if (valid) {
|
||||
if (this.ruleForm1.paymentType) this.ruleForm1.paymentType = this.ruleForm1.paymentType.toString()
|
||||
|
@ -58,12 +58,12 @@
|
||||
</el-form-item>
|
||||
<el-form-item label="活动奖品" prop="courtesyReward">
|
||||
<div style="display: flex">
|
||||
<div style="width: 17%">
|
||||
<div style="width: 15%">
|
||||
<el-checkbox-group v-model="ruleForm.courtesyReward">
|
||||
<div>
|
||||
<el-checkbox label="3" name="type">赠送积分</el-checkbox>
|
||||
</div>
|
||||
<div>
|
||||
<div style="margin: 10px 0">
|
||||
<el-checkbox label="2" name="type">赠送成长值</el-checkbox>
|
||||
</div>
|
||||
<div style="display: flex;font-size: 14px;margin: 15px 0">
|
||||
@ -74,33 +74,33 @@
|
||||
</div>
|
||||
</el-checkbox-group>
|
||||
</div>
|
||||
<div style="width: 70%">
|
||||
<div style="width: 85%">
|
||||
<div style="display: flex;font-size: 14px;">
|
||||
<div>赠送</div>
|
||||
<el-input placeholder="请输入赠送的积分数量" style="width: 70%;margin: 0 10px"
|
||||
<div style="width: 6%;">赠送</div>
|
||||
<el-input placeholder="请输入赠送的积分数量" style="width: 94%;"
|
||||
v-model="ruleForm.points">
|
||||
<template slot="append">积分</template>
|
||||
</el-input>
|
||||
</div>
|
||||
|
||||
<div style="display: flex;font-size: 14px;margin: 15px 0">
|
||||
<div>赠送</div>
|
||||
<el-input placeholder="请输入赠送的成长值数量" style="width: 70%;margin: 0 10px"
|
||||
<div style="width: 6%;">赠送</div>
|
||||
<el-input placeholder="请输入赠送的成长值数量" style="width: 94%;"
|
||||
v-model="ruleForm.growthValue">
|
||||
<template slot="append">成长值</template>
|
||||
</el-input>
|
||||
</div>
|
||||
|
||||
<div v-for="(item,index) in couponList" :key="index" style="font-size: 14px;margin: 15px 0">
|
||||
<span>赠送</span>
|
||||
<el-select v-model="item.vouchersId" style="margin-left: 10px;width: 30%" placeholder="请选择">
|
||||
<div v-for="(item,index) in couponList" :key="index" style="font-size: 14px;margin: 15px 0;display: flex">
|
||||
<div style="width: 5%;">赠送</div>
|
||||
<el-select v-model="item.vouchersId" style="margin-left: 10px;width: 45%" placeholder="请选择">
|
||||
<el-option
|
||||
v-for="(item1,index1) in cardCouponList"
|
||||
:key="index1"
|
||||
:label="item1.name"
|
||||
:value="item1.id"></el-option>
|
||||
</el-select>
|
||||
<el-input style="width: 30%;margin-left: 10px" v-model="item.giftCardTotal">
|
||||
<el-input style="width: 43%;margin-left: 10px" v-model="item.giftCardTotal">
|
||||
<template slot="append">张</template>
|
||||
</el-input>
|
||||
<img src="@/assets/images/ljt.png" style="width: 25px;height: 25px;margin-left: 10px"
|
||||
|
@ -43,12 +43,12 @@
|
||||
</el-form-item>
|
||||
<el-form-item label="活动奖品" prop="rewardDisplay">
|
||||
<div style="display: flex">
|
||||
<div style="width: 17%">
|
||||
<div style="width: 15%">
|
||||
<el-checkbox-group v-model="ruleForm.rewardDisplay">
|
||||
<div>
|
||||
<el-checkbox label="3" name="type">赠送积分</el-checkbox>
|
||||
</div>
|
||||
<div>
|
||||
<div style="margin: 10px 0">
|
||||
<el-checkbox label="2" name="type">赠送成长值</el-checkbox>
|
||||
</div>
|
||||
<div style="display: flex;font-size: 14px;margin: 15px 0">
|
||||
@ -59,33 +59,33 @@
|
||||
</div>
|
||||
</el-checkbox-group>
|
||||
</div>
|
||||
<div style="width: 70%">
|
||||
<div style="width: 85%">
|
||||
<div style="display: flex;font-size: 14px;">
|
||||
<div>赠送</div>
|
||||
<el-input placeholder="请输入赠送的积分数量" style="width: 70%;margin: 0 10px"
|
||||
<div style="width: 6%;">赠送</div>
|
||||
<el-input placeholder="请输入赠送的积分数量" style="width: 94%;"
|
||||
v-model="ruleForm.points">
|
||||
<template slot="append">积分</template>
|
||||
</el-input>
|
||||
</div>
|
||||
|
||||
<div style="display: flex;font-size: 14px;margin: 15px 0">
|
||||
<div>赠送</div>
|
||||
<el-input placeholder="请输入赠送的成长值数量" style="width: 70%;margin: 0 10px"
|
||||
<div style="width: 6%;">赠送</div>
|
||||
<el-input placeholder="请输入赠送的成长值数量" style="width: 94%;"
|
||||
v-model="ruleForm.growthValue">
|
||||
<template slot="append">成长值</template>
|
||||
</el-input>
|
||||
</div>
|
||||
|
||||
<div v-for="(item,index) in couponList" :key="index" style="font-size: 14px;margin: 15px 0">
|
||||
<span>赠送</span>
|
||||
<el-select v-model="item.vouchersId" style="margin-left: 10px;width: 30%" placeholder="请选择">
|
||||
<div v-for="(item,index) in couponList" :key="index" style="font-size: 14px;margin: 15px 0;display: flex">
|
||||
<div style="width: 5%;">赠送</div>
|
||||
<el-select v-model="item.vouchersId" style="margin-left: 10px;width: 45%" placeholder="请选择">
|
||||
<el-option
|
||||
v-for="(item1,index1) in cardCouponList"
|
||||
:key="index1"
|
||||
:label="item1.name"
|
||||
:value="item1.id"></el-option>
|
||||
</el-select>
|
||||
<el-input style="width: 30%;margin-left: 10px" v-model="item.giftCardTotal">
|
||||
<el-input style="width: 43%;margin-left: 10px" v-model="item.giftCardTotal">
|
||||
<template slot="append">张</template>
|
||||
</el-input>
|
||||
<img src="@/assets/images/ljt.png" style="width: 25px;height: 25px;margin-left: 10px"
|
||||
|
@ -56,7 +56,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<div style="margin-top: 20px">
|
||||
<el-form-item label="时间段" prop="suitTimeSlotFront">
|
||||
<el-form-item label="时间段" prop="suitTimeSlotFront" label-width="70px" >
|
||||
<el-time-picker
|
||||
v-model="ruleForm.suitTimeSlotFront"
|
||||
format="HH:mm"
|
||||
@ -84,7 +84,7 @@
|
||||
</el-form-item>
|
||||
<el-form-item label="活动奖品" prop="courtesyReward">
|
||||
<div style="display: flex">
|
||||
<div style="width: 17%">
|
||||
<div style="width: 20%">
|
||||
<el-checkbox-group v-model="ruleForm.courtesyReward">
|
||||
|
||||
<div style="display: flex;font-size: 14px;margin: 15px 0">
|
||||
@ -95,18 +95,18 @@
|
||||
</div>
|
||||
</el-checkbox-group>
|
||||
</div>
|
||||
<div style="width: 70%">
|
||||
<div style="width: 80%">
|
||||
|
||||
<div v-for="(item,index) in couponList" :key="index" style="font-size: 14px;margin: 15px 0">
|
||||
<span>赠送</span>
|
||||
<el-select v-model="item.vouchersId" style="margin-left: 10px;width: 30%" placeholder="请选择">
|
||||
<div v-for="(item,index) in couponList" :key="index" style="font-size: 14px;margin: 15px 0;display: flex">
|
||||
<div style="width: 5%">赠送</div>
|
||||
<el-select v-model="item.vouchersId" style="margin-left: 10px;width: 45%" placeholder="请选择">
|
||||
<el-option
|
||||
v-for="(item1,index1) in cardCouponList"
|
||||
:key="index1"
|
||||
:label="item1.name"
|
||||
:value="item1.id"></el-option>
|
||||
</el-select>
|
||||
<el-input style="width: 30%;margin-left: 10px" v-model="item.giftCardTotal">
|
||||
<el-input style="width: 43%;margin-left: 10px" v-model="item.giftCardTotal">
|
||||
<template slot="append">张</template>
|
||||
</el-input>
|
||||
<img src="@/assets/images/ljt.png" style="width: 25px;height: 25px;margin-left: 10px"
|
||||
|
@ -325,7 +325,7 @@
|
||||
:value="dict.value"></el-checkbox>
|
||||
</el-checkbox-group>
|
||||
</el-form-item>
|
||||
<el-form-item label=" 会员标签" prop="babelIds">
|
||||
<el-form-item label=" 会员标签">
|
||||
<el-select v-model="ruleForm1.babelIds" multiple placeholder="请选择会员标签" style="width: 100%">
|
||||
<el-option
|
||||
v-for="item in userLabelList"
|
||||
@ -554,9 +554,6 @@ export default {
|
||||
paymentType: [
|
||||
{required: true, message: '请输入支付方式', trigger: 'blur'},
|
||||
],
|
||||
babelIds: [
|
||||
{required: true, message: '请输入会员标签', trigger: 'blur'},
|
||||
],
|
||||
moneyMin: [
|
||||
{required: true, message: '请输入实收金额', trigger: 'blur'},
|
||||
],
|
||||
@ -659,6 +656,15 @@ export default {
|
||||
},
|
||||
// 提交活动规则
|
||||
submitRuleForm() {
|
||||
if (this.ruleForm1.consumeType == 1){
|
||||
if (!this.ruleForm1.literMin || !this.ruleForm1.literMax){
|
||||
this.$message.error("请填写消费条件信息")
|
||||
}
|
||||
}else {
|
||||
if (!this.ruleForm1.moneyMin || !this.ruleForm1.moneyMax){
|
||||
this.$message.error("请填写消费条件信息")
|
||||
}
|
||||
}
|
||||
this.$refs["ruleForm1"].validate((valid) => {
|
||||
if (valid) {
|
||||
if (this.ruleForm1.paymentType) this.ruleForm1.paymentType = this.ruleForm1.paymentType.toString()
|
||||
|
@ -70,12 +70,12 @@
|
||||
</el-form-item>
|
||||
<el-form-item label="活动奖品" prop="courtesyReward">
|
||||
<div style="display: flex">
|
||||
<div style="width: 17%">
|
||||
<div style="width: 15%">
|
||||
<el-checkbox-group v-model="ruleForm.courtesyReward">
|
||||
<div>
|
||||
<el-checkbox label="3" name="type">赠送积分</el-checkbox>
|
||||
</div>
|
||||
<div>
|
||||
<div style="margin: 10px 0">
|
||||
<el-checkbox label="2" name="type">赠送成长值</el-checkbox>
|
||||
</div>
|
||||
<div style="display: flex;font-size: 14px;margin: 15px 0">
|
||||
@ -86,33 +86,33 @@
|
||||
</div>
|
||||
</el-checkbox-group>
|
||||
</div>
|
||||
<div style="width: 70%">
|
||||
<div style="width: 85%">
|
||||
<div style="display: flex;font-size: 14px;">
|
||||
<div>赠送</div>
|
||||
<el-input placeholder="请输入赠送的积分数量" style="width: 70%;margin: 0 10px"
|
||||
<div style="width: 6%;">赠送</div>
|
||||
<el-input placeholder="请输入赠送的积分数量" style="width: 94%;"
|
||||
v-model="ruleForm.points">
|
||||
<template slot="append">积分</template>
|
||||
</el-input>
|
||||
</div>
|
||||
|
||||
<div style="display: flex;font-size: 14px;margin: 15px 0">
|
||||
<div>赠送</div>
|
||||
<el-input placeholder="请输入赠送的成长值数量" style="width: 70%;margin: 0 10px"
|
||||
<div style="width: 6%;">赠送</div>
|
||||
<el-input placeholder="请输入赠送的成长值数量" style="width: 94%;"
|
||||
v-model="ruleForm.growthValue">
|
||||
<template slot="append">成长值</template>
|
||||
</el-input>
|
||||
</div>
|
||||
|
||||
<div v-for="(item,index) in couponList" :key="index" style="font-size: 14px;margin: 15px 0">
|
||||
<span>赠送</span>
|
||||
<el-select v-model="item.vouchersId" style="margin-left: 10px;width: 30%" placeholder="请选择">
|
||||
<div v-for="(item,index) in couponList" :key="index" style="font-size: 14px;margin: 15px 0;display: flex">
|
||||
<div style="width: 5%;">赠送</div>
|
||||
<el-select v-model="item.vouchersId" style="margin-left: 10px;width: 45%" placeholder="请选择">
|
||||
<el-option
|
||||
v-for="(item1,index1) in cardCouponList"
|
||||
:key="index1"
|
||||
:label="item1.name"
|
||||
:value="item1.id"></el-option>
|
||||
</el-select>
|
||||
<el-input style="width: 30%;margin-left: 10px" v-model="item.giftCardTotal">
|
||||
<el-input style="width: 43%;margin-left: 10px" v-model="item.giftCardTotal">
|
||||
<template slot="append">张</template>
|
||||
</el-input>
|
||||
<img src="@/assets/images/ljt.png" style="width: 25px;height: 25px;margin-left: 10px"
|
||||
|
@ -57,12 +57,12 @@
|
||||
</el-form-item>
|
||||
<el-form-item label="活动奖品" prop="courtesyReward">
|
||||
<div style="display: flex">
|
||||
<div style="width: 17%">
|
||||
<div style="width: 15%">
|
||||
<el-checkbox-group v-model="ruleForm.courtesyReward">
|
||||
<div>
|
||||
<el-checkbox label="3" name="type">赠送积分</el-checkbox>
|
||||
</div>
|
||||
<div>
|
||||
<div style="margin: 10px 0">
|
||||
<el-checkbox label="2" name="type">赠送成长值</el-checkbox>
|
||||
</div>
|
||||
<div style="display: flex;font-size: 14px;margin: 15px 0">
|
||||
@ -73,33 +73,33 @@
|
||||
</div>
|
||||
</el-checkbox-group>
|
||||
</div>
|
||||
<div style="width: 70%">
|
||||
<div style="width: 85%">
|
||||
<div style="display: flex;font-size: 14px;">
|
||||
<div>赠送</div>
|
||||
<el-input placeholder="请输入赠送的积分数量" style="width: 70%;margin: 0 10px"
|
||||
<div style="width: 6%;">赠送</div>
|
||||
<el-input placeholder="请输入赠送的积分数量" style="width: 94%;"
|
||||
v-model="ruleForm.points">
|
||||
<template slot="append">积分</template>
|
||||
</el-input>
|
||||
</div>
|
||||
|
||||
<div style="display: flex;font-size: 14px;margin: 15px 0">
|
||||
<div>赠送</div>
|
||||
<el-input placeholder="请输入赠送的成长值数量" style="width: 70%;margin: 0 10px"
|
||||
<div style="width: 6%;">赠送</div>
|
||||
<el-input placeholder="请输入赠送的成长值数量" style="width: 94%;"
|
||||
v-model="ruleForm.growthValue">
|
||||
<template slot="append">成长值</template>
|
||||
</el-input>
|
||||
</div>
|
||||
|
||||
<div v-for="(item,index) in couponList" :key="index" style="font-size: 14px;margin: 15px 0">
|
||||
<span>赠送</span>
|
||||
<el-select v-model="item.vouchersId" style="margin-left: 10px;width: 30%" placeholder="请选择">
|
||||
<div v-for="(item,index) in couponList" :key="index" style="font-size: 14px;margin: 15px 0;display: flex">
|
||||
<div style="width: 5%;">赠送</div>
|
||||
<el-select v-model="item.vouchersId" style="margin-left: 10px;width: 45%" placeholder="请选择">
|
||||
<el-option
|
||||
v-for="(item1,index1) in cardCouponList"
|
||||
:key="index1"
|
||||
:label="item1.name"
|
||||
:value="item1.id"></el-option>
|
||||
</el-select>
|
||||
<el-input style="width: 30%;margin-left: 10px" v-model="item.giftCardTotal">
|
||||
<el-input style="width: 43%;margin-left: 10px" v-model="item.giftCardTotal">
|
||||
<template slot="append">张</template>
|
||||
</el-input>
|
||||
<img src="@/assets/images/ljt.png" style="width: 25px;height: 25px;margin-left: 10px"
|
||||
|
@ -51,7 +51,7 @@
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<!-- 短信模板列表 -->
|
||||
<div style="height: 100vh;overflow: auto;width: 100%">
|
||||
<div style="height: 72vh;overflow: auto;width: 100%">
|
||||
<el-table :data="tableData" border width="500%" :header-cell-style="{'text-align':'center'}">
|
||||
<el-table-column type="index" label="序号"></el-table-column>
|
||||
<el-table-column prop="messageId" label="短信模板ID" width="100">
|
||||
@ -69,9 +69,9 @@
|
||||
<span>{{ scope.row.content }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="roleIds" label="接收角色">
|
||||
<el-table-column prop="roleName" label="接收角色">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ scope.row.roleIds }}</span>
|
||||
<span>{{ scope.row.roleName }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="短信模板状态" align="center" prop="status">
|
||||
@ -396,7 +396,7 @@
|
||||
<!-- 接收角色 -->
|
||||
<el-form-item label="接收角色" :required="true">
|
||||
<el-select v-model="form.roleIds" multiple placeholder="请选择角色" style="width: 100%">
|
||||
<el-option v-for="item in dutyList1" :label="item.dutyName" :value="item.dutyId"></el-option>
|
||||
<el-option v-for="item in dutyList1" :label="item.dutyName" :value="item.dutyId+''"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
|
||||
@ -411,23 +411,46 @@
|
||||
|
||||
<!-- 发送条件 -->
|
||||
<el-form-item label="发送条件" style="margin-bottom: 10px" :required="true">
|
||||
<div v-for="(condition, index) in form.conditions" :key="index" class="condition-group"
|
||||
style="margin-bottom: 10px">
|
||||
<el-select v-model="condition.field" placeholder="请选择条件" style="width: 150px;margin-right: 10px"
|
||||
@change="changeField(index)">
|
||||
<el-option label="商品库存量" value="商品库存量"></el-option>
|
||||
<el-option label="剩余可挂账额度" value="剩余可挂账额度"></el-option>
|
||||
<el-option label="车队总余额" value="车队总余额"></el-option>
|
||||
<!-- <div v-for="(condition, index) in form.conditions" :key="index" class="condition-group"-->
|
||||
<!-- style="margin-bottom: 10px">-->
|
||||
<!-- <el-select v-model="condition.field" placeholder="请选择条件" style="width: 150px;margin-right: 10px"-->
|
||||
<!-- @change="changeField(index)">-->
|
||||
<!-- <el-option label="商品库存量" value="商品库存量"></el-option>-->
|
||||
<!-- <el-option label="剩余可挂账额度" value="剩余可挂账额度"></el-option>-->
|
||||
<!-- <el-option label="车队总余额" value="车队总余额"></el-option>-->
|
||||
<!-- <!– 添加其他选项 –>-->
|
||||
<!-- </el-select>-->
|
||||
<!-- <el-select v-model="condition.operator" placeholder="请选择" style="width: 100px;margin-right: 10px">-->
|
||||
<!-- <el-option label="大于" value="大于"></el-option>-->
|
||||
<!-- <el-option label="等于" value="等于"></el-option>-->
|
||||
<!-- <el-option label="小于" value="小于"></el-option>-->
|
||||
<!-- <!– 添加其他选项 –>-->
|
||||
<!-- </el-select>-->
|
||||
<!-- <el-input v-model="condition.value" placeholder="请输入" style="width: 200px;margin-right: 10px">-->
|
||||
<!-- <template slot="append">{{ condition.field != '商品库存量' ? '元' : '件' }}</template>-->
|
||||
<!-- </el-input>-->
|
||||
<!-- </div>-->
|
||||
<div class="condition-group" style="margin-bottom: 10px">
|
||||
<el-select v-model="form.sendCondition" placeholder="请选择条件" style="width: 150px;margin-right: 10px">
|
||||
<el-option label="商品库存量" value="0"></el-option>
|
||||
<el-option label="剩余可挂账额度" value="1"></el-option>
|
||||
<el-option label="车队总余额" value="2"></el-option>
|
||||
<!-- 添加其他选项 -->
|
||||
</el-select>
|
||||
<el-select v-model="condition.operator" placeholder="请选择" style="width: 100px;margin-right: 10px">
|
||||
<el-select v-model="form.meetCondition" placeholder="请选择" style="width: 100px;margin-right: 10px">
|
||||
<el-option label="大于" value="大于"></el-option>
|
||||
<el-option label="等于" value="等于"></el-option>
|
||||
<el-option label="小于" value="小于"></el-option>
|
||||
<!-- 添加其他选项 -->
|
||||
</el-select>
|
||||
<el-input v-model="condition.value" placeholder="请输入" style="width: 200px;margin-right: 10px">
|
||||
<template slot="append">{{ condition.field != '商品库存量' ? '元' : '件' }}</template>
|
||||
<el-input v-model="form.fleetAmount" v-if="form.sendCondition==2" placeholder="请输入车队的总余额" style="width: 200px;margin-right: 10px">
|
||||
<template slot="append">元</template>
|
||||
</el-input>
|
||||
<el-input v-model="form.creditAmount" v-if="form.sendCondition==1" placeholder="请输入剩余可挂账额度" style="width: 200px;margin-right: 10px">
|
||||
<template slot="append">元</template>
|
||||
</el-input>
|
||||
<el-input v-model="form.goodsStock" v-else placeholder="请输入商品库存" style="width: 200px;margin-right: 10px">
|
||||
<template slot="append">件</template>
|
||||
</el-input>
|
||||
</div>
|
||||
</el-form-item>
|
||||
@ -584,7 +607,7 @@ export default {
|
||||
],
|
||||
// tableData: [],
|
||||
form: {
|
||||
conditions: []
|
||||
conditions: [{field:'',operator:"",value:""}]
|
||||
},
|
||||
deptListSelect: [],
|
||||
systemPositionList: [{
|
||||
@ -706,8 +729,8 @@ export default {
|
||||
},
|
||||
methods: {
|
||||
// 计算短信条数
|
||||
countNum(){
|
||||
if (this.form3.amount && this.form3.unitPrice){
|
||||
countNum() {
|
||||
if (this.form3.amount && this.form3.unitPrice) {
|
||||
this.form3.messageNum = (this.form3.amount / this.form3.unitPrice).toFixed(0)
|
||||
}
|
||||
},
|
||||
@ -767,7 +790,7 @@ export default {
|
||||
// 充值
|
||||
recharge(data) {
|
||||
this.form3 = {
|
||||
deptId : data.deptId
|
||||
deptId: data.deptId
|
||||
}
|
||||
this.open3 = true;
|
||||
this.title = "充值"
|
||||
@ -1063,8 +1086,8 @@ export default {
|
||||
current: 1,
|
||||
size: 10,
|
||||
deviceName: '',
|
||||
},
|
||||
this.getList()
|
||||
}
|
||||
this.getList()
|
||||
},
|
||||
handleAdd(e) {
|
||||
this.clean()
|
||||
@ -1075,7 +1098,13 @@ export default {
|
||||
this.clean()
|
||||
this.open = true;
|
||||
this.title = "修改短信"
|
||||
console.log("1078", e)
|
||||
this.form = e
|
||||
if (e.roleIds) this.form.roleIds = e.roleIds.split(",")
|
||||
// getOneApi(e.id).then(res => {
|
||||
// this.form = res.data
|
||||
// if (res.data.roleIds) this.form.roleIds = res.data.roleIds.split(",")
|
||||
// })
|
||||
},
|
||||
del(e) {
|
||||
this.$confirm('此操作将永久删除该短信, 是否继续?', '提示', {
|
||||
@ -1111,7 +1140,7 @@ export default {
|
||||
bannerStatus: false, // Banner状态
|
||||
note: '', // 备注
|
||||
createByName: '', //
|
||||
conditions: []
|
||||
conditions: [{field:'',operator:"",value:""}]
|
||||
};
|
||||
this.selectedDat = undefined;
|
||||
},
|
||||
|
@ -254,7 +254,7 @@
|
||||
label="使用状态"
|
||||
width="100">
|
||||
<template slot-scope="scope">
|
||||
<span v-if="scope.row.isUse==1">正在使用</span>
|
||||
<span v-if="scope.row.ruleIsUse==1">正在使用</span>
|
||||
<span v-else>未使用</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
@ -283,7 +283,7 @@
|
||||
width="100"
|
||||
label="操作">
|
||||
<template slot-scope="scope">
|
||||
<div style="color: #fe8c4a;cursor: pointer" v-hasPermi="['Merchant:edit']" v-if="scope.row.isUse!=1" @click="editMerchant(scope.row)">修改</div>
|
||||
<div style="color: #fe8c4a;cursor: pointer" v-hasPermi="['Merchant:edit']" v-if="scope.row.ruleIsUse!=1" @click="editMerchant(scope.row)">修改</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
@ -541,7 +541,7 @@
|
||||
<i class="el-icon-delete" style="font-size: 28px;margin-left: 15px" @click="deleteDoxlist(index)"></i>
|
||||
</div>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<div slot="footer" class="dialog-footer" v-if="Ruletitle != '查看商户信息'">
|
||||
<el-button @click="addRule = false">取 消</el-button>
|
||||
<el-button type="primary" @click="submitAddRule">确 定</el-button>
|
||||
</div>
|
||||
|
@ -49,7 +49,7 @@
|
||||
label="使用状态"
|
||||
width="100">
|
||||
<template slot-scope="scope">
|
||||
<span v-if="scope.row.isUse==1">正在使用</span>
|
||||
<span v-if="scope.row.ruleIsUse==1">正在使用</span>
|
||||
<span v-else>未使用</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
@ -78,7 +78,7 @@
|
||||
width="100"
|
||||
label="操作">
|
||||
<template slot-scope="scope">
|
||||
<div style="color: #fe8c4a;cursor: pointer" v-hasPermi="['Merchant:edit']" v-if="scope.row.isUse!=1" @click="editMerchant(scope.row)">修改</div>
|
||||
<div style="color: #fe8c4a;cursor: pointer" v-hasPermi="['Merchant:edit']" v-if="scope.row.ruleIsUse!=1" @click="editMerchant(scope.row)">修改</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
@ -192,9 +192,10 @@
|
||||
label="操作">
|
||||
<template slot-scope="scope">
|
||||
<div style="display: flex;justify-content: center;width: 100%">
|
||||
<div style="color: #fe8c4a;cursor: pointer;margin: 0 10px" v-hasPermi="['payment:edit']" @click="editRule(scope.row)">修改</div>
|
||||
<div style="color: #fe8c4a;cursor: pointer;margin: 0 10px" v-hasPermi="['payment:delete']" @click="deleteRule(scope.row)">删除</div>
|
||||
<div style="color: #fe8c4a;cursor: pointer;margin: 0 10px" @click="EnableRule(scope.row)">启用</div>
|
||||
<div style="color: #fe8c4a;cursor: pointer;margin: 0 10px" v-hasPermi="['payment:edit']" v-if="scope.row.status!= 'qy'" @click="editRule(scope.row)">修改</div>
|
||||
<div style="color: #fe8c4a;cursor: pointer;margin: 0 10px" v-hasPermi="['payment:delete']" v-if="scope.row.status!= 'qy'" @click="deleteRule(scope.row)">删除</div>
|
||||
<div style="color: #fe8c4a;cursor: pointer;margin: 0 10px" v-if="scope.row.status!= 'qy'" @click="EnableRule(scope.row)">启用</div>
|
||||
<div style="color: #fe8c4a;cursor: pointer;margin: 0 10px" v-if="scope.row.status!= 'jy'" @click="editRule(scope.row,2)">查看</div>
|
||||
</div>
|
||||
|
||||
</template>
|
||||
@ -335,7 +336,7 @@
|
||||
<i class="el-icon-delete" style="font-size: 28px;margin-left: 15px" @click="deleteDoxlist(index)"></i>
|
||||
</div>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<div slot="footer" class="dialog-footer" v-if="Ruletitle != '查看商户信息'">
|
||||
<el-button @click="addRule = false">取 消</el-button>
|
||||
<el-button type="primary" @click="submitAddRule">确 定</el-button>
|
||||
</div>
|
||||
|
@ -148,6 +148,7 @@
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" @click="submitForm('deviceForm')">提交</el-button>
|
||||
<el-button @click="resetForm('deviceForm')">取消</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<!-- </el-form>-->
|
||||
@ -262,6 +263,11 @@ export default {
|
||||
})
|
||||
}
|
||||
},
|
||||
resetForm(formName) {
|
||||
this.$refs[formName].resetFields();
|
||||
this.clean();
|
||||
this.open=false;
|
||||
},
|
||||
changeStatus(data){
|
||||
console.log(123123123)
|
||||
updateAppApi(data).then(res=>{
|
||||
|
@ -61,6 +61,10 @@ public class MerchantConfig extends BaseEntity implements Serializable {
|
||||
* 是否使用当前账户收款:0不使用,1使用
|
||||
*/
|
||||
private String isUse;
|
||||
/**
|
||||
* 规则正在使用:0不使用,1使用
|
||||
*/
|
||||
private String ruleIsUse;
|
||||
/**
|
||||
* 是否开启规则:0不开启,1开启
|
||||
*/
|
||||
|
@ -140,4 +140,10 @@ public interface MerchantConfigService extends IService<MerchantConfig> {
|
||||
IPage<MerchantConfigVo> selectListPage(Page page, MerchantConfigVo merchantConfig);
|
||||
|
||||
MerchantConfigVo selectInfo(Integer id);
|
||||
|
||||
/**
|
||||
* 修改商户使用状态
|
||||
* @param ruleId
|
||||
*/
|
||||
void updateRuleIsUse(Integer ruleId,Integer storeId);
|
||||
}
|
||||
|
@ -84,4 +84,11 @@ public interface OilConfigService extends IService<OilConfig> {
|
||||
List<OilConfigVo> selectListByRuleConfigId(Integer ruleId);
|
||||
|
||||
void deleteOilConfigByRuleId(Integer ruleId);
|
||||
|
||||
/**
|
||||
* 根据支付规则配置id查询商户配置信息ids
|
||||
* @param ruleId
|
||||
* @return
|
||||
*/
|
||||
List<Integer> selectMerchIdsByRuleId(Integer ruleId);
|
||||
}
|
||||
|
@ -322,5 +322,27 @@ public class MerchantConfigServiceImpl extends ServiceImpl<MerchantConfigMapper,
|
||||
return baseMapper.selectInfo(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateRuleIsUse(Integer ruleId,Integer storeId) {
|
||||
List<Integer> merchIds = oilConfigService.selectMerchIdsByRuleId(ruleId);
|
||||
// 修改规则使用状态
|
||||
QueryWrapper queryWrapper = new QueryWrapper();
|
||||
queryWrapper.eq("store_id",storeId);
|
||||
List<MerchantConfig> list = baseMapper.selectList(queryWrapper);
|
||||
for (MerchantConfig merchantConfig : list) {
|
||||
boolean flag = false;
|
||||
for (Integer merchId : merchIds) {
|
||||
if (merchId.equals(merchantConfig.getId())) flag = true;
|
||||
}
|
||||
if (!flag){
|
||||
merchantConfig.setRuleIsUse("0");
|
||||
}else {
|
||||
merchantConfig.setRuleIsUse("1");
|
||||
}
|
||||
baseMapper.updateById(merchantConfig);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
@ -284,4 +284,11 @@ public class OilConfigServiceImpl extends ServiceImpl<OilConfigMapper, OilConfig
|
||||
queryWrapper.eq("rule_config_id",ruleId);
|
||||
baseMapper.delete(queryWrapper);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Integer> selectMerchIdsByRuleId(Integer ruleId) {
|
||||
QueryWrapper queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.select("merch_config_id").eq("rule_config_id",ruleId);
|
||||
return listObjs(queryWrapper);
|
||||
}
|
||||
}
|
||||
|
@ -88,6 +88,7 @@ public class PaymentRuleConfigServiceImpl extends ServiceImpl<PaymentRuleConfigM
|
||||
ruleConfig.setDeptId(Math.toIntExact(nowAccountInfo.getDeptId()));
|
||||
}
|
||||
int row = baseMapper.insert(ruleConfig);
|
||||
merchantConfigService.updateRuleIsUse(ruleConfig.getId(),ruleConfig.getStoreId());
|
||||
paymentRuleConfig = selectRuleByRuleName(ruleConfig.getRuleName(), ruleConfig.getStoreId());
|
||||
if (ObjectUtil.isNotEmpty(paymentRuleConfig)) {
|
||||
if (ObjectUtil.isNotEmpty(ruleConfig.getRuleList())){
|
||||
@ -107,6 +108,7 @@ public class PaymentRuleConfigServiceImpl extends ServiceImpl<PaymentRuleConfigM
|
||||
return 0;
|
||||
}
|
||||
int row = baseMapper.updateById(ruleConfig);
|
||||
merchantConfigService.updateRuleIsUse(ruleConfig.getId(),ruleConfig.getStoreId());
|
||||
oilConfigService.deleteOilConfigByRuleId(ruleConfig.getId());
|
||||
if (ObjectUtil.isNotEmpty(ruleConfig.getRuleList())){
|
||||
for (OilConfigVo oilConfig : ruleConfig.getRuleList()) {
|
||||
@ -137,7 +139,7 @@ public class PaymentRuleConfigServiceImpl extends ServiceImpl<PaymentRuleConfigM
|
||||
}
|
||||
int i = 1;
|
||||
if (ruleConfig.getStatus().equals("jy")){
|
||||
// 将其他使用的账户关掉
|
||||
// 将其他使用的账户关掉
|
||||
merchantConfigService.updateMerchOrter(ruleConfig.getStoreId());
|
||||
}
|
||||
if (ruleConfig.getStatus().equals("qy") && ruleConfig.getRuleType().equals("1")){
|
||||
@ -147,15 +149,31 @@ public class PaymentRuleConfigServiceImpl extends ServiceImpl<PaymentRuleConfigM
|
||||
return 0;
|
||||
}
|
||||
ruleConfig.setHandEnable("1");
|
||||
merchantConfigService.updateRuleIsUse(ruleConfig.getId(),ruleConfig.getStoreId());
|
||||
return baseMapper.updateById(ruleConfig);
|
||||
}else {
|
||||
this.changeHandEnable(ruleConfig.getStoreId());
|
||||
if (ruleConfig.getStatus().equals("qy")){
|
||||
ruleConfig.setStatus("jy");
|
||||
}
|
||||
ruleConfig.setHandEnable("1");
|
||||
return baseMapper.updateById(ruleConfig);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 将所有手动启用关掉
|
||||
*/
|
||||
private void changeHandEnable(Integer storeId){
|
||||
QueryWrapper queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.eq("store_id", storeId);
|
||||
List<PaymentRuleConfig> list = baseMapper.selectList(queryWrapper);
|
||||
for (PaymentRuleConfig paymentRuleConfig : list) {
|
||||
paymentRuleConfig.setHandEnable("0");
|
||||
baseMapper.updateById(paymentRuleConfig);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public PaymentRuleConfig selectInfoByStoreId(Integer storeId) {
|
||||
QueryWrapper queryWrapper = new QueryWrapper<>();
|
||||
@ -181,9 +199,10 @@ public class PaymentRuleConfigServiceImpl extends ServiceImpl<PaymentRuleConfigM
|
||||
PaymentRuleConfig paymentRuleConfig1 = baseMapper.selectOne(queryWrapper1);
|
||||
for (PaymentRuleConfig paymentRuleConfig : list) {
|
||||
if (ObjectUtil.isNotEmpty(paymentRuleConfig.getStartTime()) && paymentRuleConfig.getStartTime().before(new Date())
|
||||
&& ObjectUtil.isNotEmpty(paymentRuleConfig1)
|
||||
&& ObjectUtil.isNotEmpty(paymentRuleConfig1.getUpdateTime())
|
||||
&& paymentRuleConfig.getStartTime().before(paymentRuleConfig1.getUpdateTime())) {
|
||||
&& ObjectUtil.isNotEmpty(paymentRuleConfig1)) {
|
||||
// && ObjectUtil.isNotEmpty(paymentRuleConfig1.getUpdateTime())
|
||||
// && !Objects.equals(paymentRuleConfig.getId(), paymentRuleConfig1.getId())
|
||||
// && paymentRuleConfig.getStartTime().before(paymentRuleConfig1.getUpdateTime())) {
|
||||
int i = 1;
|
||||
if (paymentRuleConfig.getRuleType().equals("1")){
|
||||
i = oilConfigService.judgmentProportion1(paymentRuleConfig.getStoreId(), paymentRuleConfig.getId());
|
||||
@ -198,6 +217,7 @@ public class PaymentRuleConfigServiceImpl extends ServiceImpl<PaymentRuleConfigM
|
||||
}
|
||||
paymentRuleConfig.setStatus("qy");
|
||||
baseMapper.updateById(paymentRuleConfig);
|
||||
merchantConfigService.updateRuleIsUse(paymentRuleConfig.getId(),paymentRuleConfig.getStoreId());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -51,6 +51,9 @@ public class IntegralDetail extends BaseEntity implements Serializable {
|
||||
*/
|
||||
private Integer chainStoreId;
|
||||
|
||||
private String startTime;
|
||||
private String endTime;
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
@ -42,6 +42,9 @@
|
||||
<if test="integralDetail.userId != null">
|
||||
and id.user_id = #{integralDetail.userId}
|
||||
</if>
|
||||
<if test="integralDetail.startTime != null and integralDetail.startTime != '' and integralDetail.endTime != null and integralDetail.endTime != ''">
|
||||
and id.create_time between #{integralDetail.startTime} and #{integralDetail.endTime}
|
||||
</if>
|
||||
</where>
|
||||
|
||||
order by create_time desc
|
||||
|
@ -1,5 +1,8 @@
|
||||
package com.fuint.business.integral.service.impl;
|
||||
|
||||
import cn.hutool.core.date.DateTime;
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.fuint.business.integral.entity.IntegralDetail;
|
||||
@ -56,6 +59,11 @@ public class IntegralDetailServiceImpl implements IntegralDetailService {
|
||||
public IPage<IntegralDetail> queryByPageUni(@Param("page") Page page, IntegralDetail integralDetail) {
|
||||
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
|
||||
integralDetail.setUserId(nowAccountInfo.getId());
|
||||
if (ObjectUtil.isNotEmpty(integralDetail.getStartTime())) {
|
||||
DateTime parse = DateUtil.parse(integralDetail.getStartTime(), "yyyy-MM");
|
||||
integralDetail.setStartTime(DateUtil.beginOfMonth(parse).toString());
|
||||
integralDetail.setEndTime(DateUtil.endOfMonth(parse).toString());
|
||||
}
|
||||
return this.integralDetailMapper.queryAllByLimit(page, integralDetail);
|
||||
}
|
||||
|
||||
|
@ -21,6 +21,8 @@ import com.fuint.common.dto.AccountInfo;
|
||||
import com.fuint.common.util.TokenUtil;
|
||||
import org.apache.commons.lang3.ObjectUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.context.annotation.Lazy;
|
||||
import org.springframework.stereotype.Service;
|
||||
@ -42,6 +44,9 @@ import java.util.stream.Collectors;
|
||||
@Service("cardFavorableService")
|
||||
public class CardFavorableServiceImpl extends ServiceImpl<CardFavorableMapper, CardFavorable> implements CardFavorableService {
|
||||
|
||||
private static final Logger log = LoggerFactory.getLogger(CardFavorableServiceImpl.class);
|
||||
|
||||
|
||||
@Resource
|
||||
private StoreService storeService;
|
||||
@Resource
|
||||
@ -151,8 +156,10 @@ public class CardFavorableServiceImpl extends ServiceImpl<CardFavorableMapper, C
|
||||
carFavorbleIds.add(id);
|
||||
}
|
||||
}
|
||||
log.info("删除前的carFavorbleIds:{}",carFavorbleIds);
|
||||
//领取列表的券ids 减去 限领一张的
|
||||
carFavorbleIds.removeAll(carFavorbleRecordIds);
|
||||
log.info("删除后的carFavorbleIds:{}",carFavorbleIds);
|
||||
for (Integer carFavorbleId : carFavorbleIds) {
|
||||
CardFavorable one = getById(carFavorbleId);
|
||||
cardFavorableArrayList.add(one);
|
||||
@ -164,8 +171,10 @@ public class CardFavorableServiceImpl extends ServiceImpl<CardFavorableMapper, C
|
||||
carFavorbleIds2.add(id);
|
||||
}
|
||||
}
|
||||
log.info("删除前的carFavorbleIds2:{}",carFavorbleIds2);
|
||||
//领取列表的券ids 减去 当前查询的券ids
|
||||
carFavorbleIds2.removeAll(carFavorbleIds1);
|
||||
log.info("删除后的carFavorbleIds2:{}",carFavorbleIds2);
|
||||
for (Integer carFavorbleId : carFavorbleIds) {
|
||||
CardFavorable one = getById(carFavorbleId);
|
||||
cardFavorableArrayList.add(one);
|
||||
|
@ -11,8 +11,8 @@
|
||||
resultType="com.fuint.business.marketingActivity.cardValueOrders.entity.CardValueOrders">
|
||||
<include refid="selectOrders"></include>
|
||||
<where>
|
||||
<if test="order.userId != null and order.userId != ''">
|
||||
and user_id = #{order.userId}
|
||||
<if test="order.mtUserId != null and order.mtUserId != ''">
|
||||
and mt_user_id = #{order.mtUserId}
|
||||
</if>
|
||||
<if test="order.status != null and order.status != ''">
|
||||
and status = #{order.status}
|
||||
|
@ -106,5 +106,17 @@ public class CardValueRuleController extends BaseController {
|
||||
public ResponseObject delete(@RequestParam("idList") List<Long> idList) {
|
||||
return getSuccessResult(this.cardValueRuleService.removeByIds(idList));
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取储值卡权益说明与规则说明(小程序端)
|
||||
* @return
|
||||
*/
|
||||
@GetMapping("/getQyAndGz")
|
||||
public ResponseObject getQyDetails(Integer storeId){
|
||||
LambdaQueryWrapper<CardValueRule> queryWrapper =new LambdaQueryWrapper<CardValueRule>();
|
||||
queryWrapper.eq(CardValueRule::getStoreId, storeId);
|
||||
queryWrapper.eq(CardValueRule::getType,"0");
|
||||
return getSuccessResult(this.cardValueRuleService.getOne(queryWrapper));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -0,0 +1,14 @@
|
||||
package com.fuint.business.marketingActivity.cardValueRule.dto;
|
||||
|
||||
import cn.hutool.core.date.DateTime;
|
||||
import com.fuint.business.marketingActivity.cardValueOrders.entity.CardValueOrders;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
@Data
|
||||
public class CardValueOrdersDTO extends CardValueOrders {
|
||||
private String startTime;
|
||||
private int page;
|
||||
private int pageSize;
|
||||
}
|
@ -0,0 +1,12 @@
|
||||
package com.fuint.business.marketingActivity.cardValueRule.vo;
|
||||
|
||||
import com.fuint.business.marketingActivity.cardValueOrders.entity.CardValueOrders;
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class CardValueOrdersVo {
|
||||
private String orderNo;
|
||||
private Integer userId;
|
||||
private String afterBalance;
|
||||
private String storeName;
|
||||
}
|
@ -0,0 +1,9 @@
|
||||
package com.fuint.business.order.dto;
|
||||
|
||||
import com.fuint.business.order.entity.CardBalanceChange;
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class CardBalanceChangeDto extends CardBalanceChange {
|
||||
private String startTime;
|
||||
}
|
@ -4,6 +4,8 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.fuint.business.marketingActivity.cardValueOrders.entity.CardValueOrders;
|
||||
import com.fuint.business.marketingActivity.cardValueRule.dto.CardValueOrdersDTO;
|
||||
import com.fuint.business.marketingActivity.cardValueRule.vo.CardValueOrdersVo;
|
||||
import com.fuint.business.order.dto.AllOrderInfoDto;
|
||||
import com.fuint.business.order.entity.AllOrderInfo;
|
||||
import com.fuint.business.order.entity.CardBalanceChange;
|
||||
@ -89,4 +91,6 @@ public interface AllOrderInfoMapper extends BaseMapper<AllOrderInfo> {
|
||||
|
||||
IPage<AllOrderInfoVo> runningWaterByInstituion2(Page page,@Param("order") AllOrderInfoDto allOrderInfo);
|
||||
|
||||
IPage<CardValueOrdersVo> getBlanceANdOrder(Page page, @Param("order") CardValueOrdersDTO allOrderInfo);
|
||||
|
||||
}
|
@ -1,7 +1,6 @@
|
||||
package com.fuint.business.setting.controller;
|
||||
|
||||
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
@ -47,10 +46,11 @@ public class MessageTemplateController extends BaseController {
|
||||
|
||||
@Resource
|
||||
private DutyService dutyService;
|
||||
|
||||
/**
|
||||
* 分页查询所有数据
|
||||
*
|
||||
* @param page 分页对象
|
||||
* @param page 分页对象
|
||||
* @param messageTemplate 查询实体
|
||||
* @return 所有数据
|
||||
*/
|
||||
@ -59,21 +59,21 @@ public class MessageTemplateController extends BaseController {
|
||||
//获取当前登录用户
|
||||
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
|
||||
|
||||
LambdaQueryWrapper<MessageTemplate> queryWrapper =new LambdaQueryWrapper<>();
|
||||
if (!StringUtils.isEmpty(messageTemplate.getName())){
|
||||
queryWrapper.like(MessageTemplate::getName,messageTemplate.getName());
|
||||
LambdaQueryWrapper<MessageTemplate> queryWrapper = new LambdaQueryWrapper<>();
|
||||
if (!StringUtils.isEmpty(messageTemplate.getName())) {
|
||||
queryWrapper.like(MessageTemplate::getName, messageTemplate.getName());
|
||||
}
|
||||
if (!StringUtils.isEmpty(messageTemplate.getStatus())){
|
||||
queryWrapper.eq(MessageTemplate::getStatus,messageTemplate.getStatus());
|
||||
if (!StringUtils.isEmpty(messageTemplate.getStatus())) {
|
||||
queryWrapper.eq(MessageTemplate::getStatus, messageTemplate.getStatus());
|
||||
}
|
||||
queryWrapper.eq(MessageTemplate::getStoreId,nowAccountInfo.getStoreId());
|
||||
if (messageTemplate.getRoeleList() != null && messageTemplate.getRoeleList().size() > 0 ) {
|
||||
queryWrapper.eq(MessageTemplate::getStoreId, nowAccountInfo.getStoreId());
|
||||
if (messageTemplate.getRoeleList() != null && messageTemplate.getRoeleList().size() > 0) {
|
||||
queryWrapper.like(MessageTemplate::getRoleIds, messageTemplate.getRoeleList().get(0));
|
||||
}
|
||||
queryWrapper.orderByDesc(MessageTemplate::getCreateTime);
|
||||
IPage<MessageTemplate> page1 = this.messageTemplateService.page(page,queryWrapper);
|
||||
IPage<MessageTemplate> page1 = this.messageTemplateService.page(page, queryWrapper);
|
||||
for (MessageTemplate record : page1.getRecords()) {
|
||||
List<Integer> deptIdList =new ArrayList<>();
|
||||
List<Integer> deptIdList = new ArrayList<>();
|
||||
for (String s : record.getDeptIds().split(",")) {
|
||||
deptIdList.add(Integer.parseInt(s));
|
||||
}
|
||||
@ -82,11 +82,11 @@ public class MessageTemplateController extends BaseController {
|
||||
if (record.getRoleIds() != null && !record.getRoleIds().equals("")) {
|
||||
String roleById = "";
|
||||
for (String s : record.getRoleIds().split(",")) {
|
||||
roleById += dutyService.getRoleById(Long.parseLong(s)).getDutyName();
|
||||
roleById += dutyService.getRoleById(Long.parseLong(s)).getDutyName() + ",";
|
||||
}
|
||||
record.setRoleIds(roleById);
|
||||
}
|
||||
record.setRoleName(roleById);
|
||||
}
|
||||
}
|
||||
return getSuccessResult(page1);
|
||||
}
|
||||
|
||||
@ -111,33 +111,33 @@ public class MessageTemplateController extends BaseController {
|
||||
public ResponseObject insert(@RequestBody MessageTemplate messageTemplate) {
|
||||
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
|
||||
messageTemplate.setCreateName(nowAccountInfo.getRealName());
|
||||
SysLog sysLog =new SysLog();
|
||||
SysLog sysLog = new SysLog();
|
||||
sysLog.setSystemName("1");
|
||||
sysLog.setMoudle("短信模版");
|
||||
sysLog.setContent("新增了模版名称为"+messageTemplate.getName()+"的数据");
|
||||
sysLog.setContent("新增了模版名称为" + messageTemplate.getName() + "的数据");
|
||||
sysLogService.saveVo(sysLog);
|
||||
String tempName = "";
|
||||
String tempId = "";
|
||||
for (Integer deptId : messageTemplate.getDeptIdList()) {
|
||||
SysDept dept = deptService.getById(deptId);
|
||||
tempName+=dept.getDeptName()+",";
|
||||
tempId+=dept.getDeptId()+",";
|
||||
tempName += dept.getDeptName() + ",";
|
||||
tempId += dept.getDeptId() + ",";
|
||||
|
||||
}
|
||||
String roleIds = "";
|
||||
for (Integer integer : messageTemplate.getRoeleList()) {
|
||||
roleIds += integer + ",";
|
||||
}
|
||||
messageTemplate.setRoleIds(roleIds);
|
||||
messageTemplate.setDeptNames(tempName.substring(0,tempName.length()-1));
|
||||
messageTemplate.setDeptIds(tempId.substring(0,tempId.length()-1));
|
||||
// String roleIds = "";
|
||||
// for (Integer integer : messageTemplate.getRoeleList()) {
|
||||
// roleIds += integer + ",";
|
||||
// }
|
||||
// messageTemplate.setRoleIds(roleIds);
|
||||
messageTemplate.setDeptNames(tempName.substring(0, tempName.length() - 1));
|
||||
messageTemplate.setDeptIds(tempId.substring(0, tempId.length() - 1));
|
||||
messageTemplate.setStoreId(nowAccountInfo.getStoreId());
|
||||
|
||||
// 校验添加时名称是否存在
|
||||
int nameList = messageTemplateService.selectMessagesName(messageTemplate.getName());
|
||||
|
||||
if (nameList == 1) {
|
||||
return getFailureResult(201,"模版名称已存在");
|
||||
return getFailureResult(201, "模版名称已存在");
|
||||
}
|
||||
return getSuccessResult(this.messageTemplateService.save(messageTemplate));
|
||||
}
|
||||
@ -150,21 +150,21 @@ public class MessageTemplateController extends BaseController {
|
||||
*/
|
||||
@PutMapping
|
||||
public ResponseObject update(@RequestBody MessageTemplate messageTemplate) {
|
||||
SysLog sysLog =new SysLog();
|
||||
SysLog sysLog = new SysLog();
|
||||
sysLog.setSystemName("1");
|
||||
sysLog.setMoudle("短信模版");
|
||||
sysLog.setContent("更新了模版名称为"+messageTemplate.getName()+"的数据");
|
||||
sysLog.setContent("更新了模版名称为" + messageTemplate.getName() + "的数据");
|
||||
sysLogService.saveVo(sysLog);
|
||||
String tempName = "";
|
||||
String tempId = "";
|
||||
for (Integer deptId : messageTemplate.getDeptIdList()) {
|
||||
SysDept dept = deptService.getById(deptId);
|
||||
tempName+=dept.getDeptName()+",";
|
||||
tempId+=dept.getDeptId()+",";
|
||||
tempName += dept.getDeptName() + ",";
|
||||
tempId += dept.getDeptId() + ",";
|
||||
|
||||
}
|
||||
messageTemplate.setDeptNames(tempName.substring(0,tempName.length()-1));
|
||||
messageTemplate.setDeptIds(tempId.substring(0,tempId.length()-1));
|
||||
messageTemplate.setDeptNames(tempName.substring(0, tempName.length() - 1));
|
||||
messageTemplate.setDeptIds(tempId.substring(0, tempId.length() - 1));
|
||||
// // 校验添加时名称是否存在
|
||||
// int nameList = this.getNameList(messageTemplate.getName());
|
||||
// if (nameList == 1) {
|
||||
@ -183,10 +183,10 @@ public class MessageTemplateController extends BaseController {
|
||||
public ResponseObject delete(@RequestParam("idList") List<Long> idList) {
|
||||
for (Long aLong : idList) {
|
||||
MessageTemplate messageTemplate = messageTemplateService.getById(aLong);
|
||||
SysLog sysLog =new SysLog();
|
||||
SysLog sysLog = new SysLog();
|
||||
sysLog.setSystemName("1");
|
||||
sysLog.setMoudle("短信模版");
|
||||
sysLog.setContent("删除了模版名称为"+messageTemplate.getName()+"的数据");
|
||||
sysLog.setContent("删除了模版名称为" + messageTemplate.getName() + "的数据");
|
||||
sysLogService.saveVo(sysLog);
|
||||
}
|
||||
return getSuccessResult(this.messageTemplateService.removeByIds(idList));
|
||||
@ -194,12 +194,13 @@ public class MessageTemplateController extends BaseController {
|
||||
|
||||
/**
|
||||
* 查询消息模板名称是否存在
|
||||
*
|
||||
* @param name 模板名称
|
||||
* @return 1 , 0
|
||||
*/
|
||||
@GetMapping("/getMessageTemplate")
|
||||
public ResponseObject getMessageTemplate(String name){
|
||||
return getSuccessResult( messageTemplateService.selectMessagesName(name));
|
||||
public ResponseObject getMessageTemplate(String name) {
|
||||
return getSuccessResult(messageTemplateService.selectMessagesName(name));
|
||||
}
|
||||
|
||||
private int getNameList(String name) {
|
||||
|
@ -42,7 +42,7 @@ public class SysLogController extends BaseController {
|
||||
* @return 所有数据
|
||||
*/
|
||||
@GetMapping
|
||||
public ResponseObject selectAll(@RequestParam(value = "pageNum",defaultValue = "1") Integer pageNo,
|
||||
public ResponseObject selectAll(@RequestParam(value = "page",defaultValue = "1") Integer pageNo,
|
||||
@RequestParam(value = "pageSize",defaultValue = "10") Integer pageSize, SysLog sysLog) {
|
||||
LambdaQueryWrapper<SysLog> sysLogLambdaQueryWrapper = new LambdaQueryWrapper();
|
||||
Page page =new Page(pageNo,pageSize);
|
||||
|
@ -33,6 +33,16 @@ public class MessageTemplate extends Model<MessageTemplate> {
|
||||
private String roleIds;
|
||||
//状态0停用1启用
|
||||
private String status;
|
||||
//发送条件:0商品库存数量;1剩余可挂账额度;2车队总余额
|
||||
private String sendCondition;
|
||||
//满足条件:大于、等于、小于
|
||||
private String meetCondition;
|
||||
//商品库存
|
||||
private Integer goodsStock;
|
||||
//剩余可挂账额度
|
||||
private Double creditAmount;
|
||||
//车队总余额
|
||||
private Double fleetAmount;
|
||||
//创建者名称
|
||||
private String createName;
|
||||
//创建时间
|
||||
@ -54,5 +64,9 @@ public class MessageTemplate extends Model<MessageTemplate> {
|
||||
@TableField(exist = false)
|
||||
private List<Integer> roeleList;
|
||||
|
||||
@TableField(exist = false)
|
||||
private String roleName;
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
@ -70,6 +70,13 @@ public class SysAppController extends BaseController {
|
||||
@PostMapping
|
||||
public ResponseObject add(@RequestBody SysApp sysApp) {
|
||||
try {
|
||||
// 先判断机构名称是否重复
|
||||
SysApp s1 = new SysApp();
|
||||
s1.setOrgId(sysApp.getOrgId());
|
||||
Long aLong = sysAppService.queryCount(s1);
|
||||
if (aLong>0){
|
||||
return getFailureResult(500,"机构名称已经存在");
|
||||
}
|
||||
SysLog sysLog =new SysLog();
|
||||
sysLog.setSystemName("2");
|
||||
sysLog.setMoudle("小程序配置");
|
||||
@ -88,6 +95,13 @@ public class SysAppController extends BaseController {
|
||||
@PutMapping
|
||||
public ResponseObject edit(@RequestBody SysApp sysApp) {
|
||||
try {
|
||||
// 先判断机构名称是否重复
|
||||
SysApp s1= new SysApp();
|
||||
s1.setOrgId(sysApp.getOrgId());
|
||||
Long aLong = sysAppService.queryCount(s1);
|
||||
if (aLong>0){
|
||||
return getFailureResult(500,"机构名称已经存在");
|
||||
}
|
||||
SysLog sysLog =new SysLog();
|
||||
sysLog.setSystemName("2");
|
||||
sysLog.setMoudle("小程序配置");
|
||||
|
@ -67,6 +67,9 @@ legal_representative_id,legal_representative_contact,app_status,create_time,crea
|
||||
select count(1)
|
||||
from sys_app
|
||||
<where>
|
||||
<if test="orgId != null and orgId != ''">
|
||||
and org_id = #{orgId}
|
||||
</if>
|
||||
<if test="id != null">
|
||||
and id = #{id}
|
||||
</if>
|
||||
|
@ -30,7 +30,9 @@ public interface SysAppService {
|
||||
* @return 查询结果
|
||||
*/
|
||||
IPage<SysApp> queryByPage(@Param("page") Page page, SysApp sysApp);
|
||||
// 根据机构名称查询
|
||||
|
||||
Long queryCount(SysApp sysApp);
|
||||
/**
|
||||
* 新增数据
|
||||
*
|
||||
|
@ -50,6 +50,12 @@ public class SysAppServiceImpl implements SysAppService {
|
||||
return this.sysAppMapper.queryAllByLimit(page, sysApp);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Long queryCount(SysApp sysApp) {
|
||||
long count = sysAppMapper.count(sysApp);
|
||||
return count;
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增数据
|
||||
*
|
||||
|
@ -336,12 +336,21 @@ public class UserBalanceServiceImpl extends ServiceImpl<UserBalanceMapper, UserB
|
||||
@Override
|
||||
public UserBlanceUniVo getUserBalanceApplet(UserBalance userBalance) {
|
||||
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
|
||||
log.info("查询会员信息:"+nowAccountInfo);
|
||||
QueryWrapper queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.eq("mt_user_id",nowAccountInfo.getId());
|
||||
queryWrapper.eq("chain_store_id",userBalance.getChainStoreId());
|
||||
UserBalance balance = baseMapper.selectOne(queryWrapper);
|
||||
UserBlanceUniVo userBlanceUniVo = BeanUtil.copyProperties(balance, UserBlanceUniVo.class);
|
||||
userBlanceUniVo.setAllBalance(balance.getCardBalance()+balance.getGiveAmount());
|
||||
log.info("查询会员储值卡余额:"+balance);
|
||||
UserBlanceUniVo userBlanceUniVo = new UserBlanceUniVo();
|
||||
if (ObjectUtil.isNotEmpty(balance)) {
|
||||
userBlanceUniVo = BeanUtil.copyProperties(balance,UserBlanceUniVo.class);
|
||||
userBlanceUniVo.setAllBalance(balance.getCardBalance()+balance.getGiveAmount());
|
||||
}else {
|
||||
userBlanceUniVo.setAllBalance(0.0);
|
||||
userBlanceUniVo.setCardBalance(0.0);
|
||||
userBlanceUniVo.setGiveAmount(0.0);
|
||||
}
|
||||
return userBlanceUniVo;
|
||||
}
|
||||
/**
|
||||
|
@ -1,5 +1,23 @@
|
||||
package com.fuint.module.clientApi.controller;
|
||||
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import cn.hutool.core.date.DatePattern;
|
||||
import cn.hutool.core.date.DateTime;
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.fuint.business.marketingActivity.cardValueOrders.entity.CardValueOrders;
|
||||
import com.fuint.business.marketingActivity.cardValueOrders.mapper.CardValueOrdersMapper;
|
||||
import com.fuint.business.marketingActivity.cardValueRule.dto.CardValueOrdersDTO;
|
||||
import com.fuint.business.order.dto.CardBalanceChangeDto;
|
||||
import com.fuint.business.order.entity.CardBalanceChange;
|
||||
import com.fuint.business.order.mapper.AllOrderInfoMapper;
|
||||
import com.fuint.business.order.mapper.CardBalanceChangeMapper;
|
||||
import com.fuint.business.order.vo.CardBalanceChangeVo;
|
||||
import com.fuint.business.store.entity.MtStore;
|
||||
import com.fuint.business.store.mapper.MtStoreMapper;
|
||||
import com.fuint.common.util.Constants;
|
||||
import com.fuint.common.dto.*;
|
||||
import com.fuint.common.enums.*;
|
||||
@ -17,8 +35,15 @@ import com.fuint.repository.model.MtOrder;
|
||||
import com.fuint.repository.model.MtSetting;
|
||||
import com.fuint.repository.model.MtUser;
|
||||
import com.fuint.utils.StringUtil;
|
||||
import com.github.pagehelper.Page;
|
||||
import com.github.pagehelper.PageHelper;
|
||||
import com.github.pagehelper.PageInfo;
|
||||
import io.swagger.annotations.Api;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.data.domain.PageImpl;
|
||||
import org.springframework.data.domain.PageRequest;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import java.math.BigDecimal;
|
||||
@ -26,6 +51,7 @@ import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* 余额接口controller
|
||||
@ -38,6 +64,9 @@ import java.util.Map;
|
||||
@RequestMapping(value = "/clientApi/balance")
|
||||
public class ClientBalanceController extends BaseController {
|
||||
|
||||
private static final Logger log = LoggerFactory.getLogger(ClientBalanceController.class);
|
||||
|
||||
|
||||
/**
|
||||
* 配置服务接口
|
||||
* */
|
||||
@ -74,6 +103,15 @@ public class ClientBalanceController extends BaseController {
|
||||
@Autowired
|
||||
private MerchantService merchantService;
|
||||
|
||||
@Autowired
|
||||
private CardValueOrdersMapper cardValueOrdersMapper;
|
||||
|
||||
@Autowired
|
||||
private MtStoreMapper mtStoreMapper;
|
||||
|
||||
@Autowired
|
||||
private CardBalanceChangeMapper cardBalanceChangeMapper;
|
||||
|
||||
/**
|
||||
* 充值配置
|
||||
*
|
||||
@ -261,4 +299,83 @@ public class ClientBalanceController extends BaseController {
|
||||
|
||||
return getSuccessResult(result);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 余额明细(小程序)
|
||||
* @param
|
||||
* @param
|
||||
* @return
|
||||
*/
|
||||
// @RequestMapping(value = "/detail", method = RequestMethod.GET)
|
||||
// public ResponseObject getBalanceDetail(CardValueOrdersDTO order) {
|
||||
// Page<Object> page = PageHelper.startPage(order.getPage(), order.getPageSize());
|
||||
// AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
|
||||
// log.info("nowAccountInfo:{}", nowAccountInfo);
|
||||
// order.setMtUserId(nowAccountInfo.getId());
|
||||
// order.setStatus("paid");
|
||||
// LambdaQueryWrapper<CardValueOrders> lambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||
// if (ObjectUtil.isNotEmpty(order.getRechargeType())) {
|
||||
// lambdaQueryWrapper.eq(CardValueOrders::getRechargeType, order.getRechargeType());
|
||||
// }
|
||||
// if (ObjectUtil.isNotEmpty(order.getStartTime()) ) {
|
||||
// DateTime parse = DateUtil.parse(order.getStartTime(), DatePattern.NORM_MONTH_FORMATTER);
|
||||
// DateTime start = DateUtil.beginOfMonth(parse);
|
||||
// DateTime end = DateUtil.endOfMonth(parse);
|
||||
// lambdaQueryWrapper.between(CardValueOrders::getPayTime, start, end);
|
||||
// }
|
||||
// lambdaQueryWrapper.eq(CardValueOrders::getMtUserId,nowAccountInfo.getId());
|
||||
//// lambdaQueryWrapper.eq(CardValueOrders::getStatus, "paid");
|
||||
// List<CardValueOrders> cardValueOrders = cardValueOrdersMapper.selectList(lambdaQueryWrapper);
|
||||
// PageRequest pageRequest = PageRequest.of(order.getPage(), order.getPageSize());
|
||||
//
|
||||
// //查询商户名称
|
||||
// MtStore mtStore = mtStoreMapper.selectOne(new LambdaQueryWrapper<MtStore>()
|
||||
// .eq(MtStore::getId, order.getStoreId()));
|
||||
//
|
||||
// if (CollUtil.isNotEmpty(cardValueOrders) && ObjectUtil.isNotEmpty(mtStore)) {
|
||||
// cardValueOrders.stream().forEach(item -> item.setStoreName(mtStore.getName()));
|
||||
// }
|
||||
// PageImpl pageImpl = new PageImpl(cardValueOrders, pageRequest, page.getTotal());
|
||||
// PaginationResponse paginationResponse = new PaginationResponse(pageImpl, CardValueOrders.class);
|
||||
// paginationResponse.setTotalPages(page.getPages());
|
||||
// paginationResponse.setTotalElements(page.getTotal());
|
||||
// paginationResponse.setContent(cardValueOrders);
|
||||
//
|
||||
// return getSuccessResult(paginationResponse);
|
||||
// }
|
||||
@RequestMapping(value = "/detail", method = RequestMethod.GET)
|
||||
public ResponseObject getBalanceDetail(Integer page, Integer pageSize, CardBalanceChangeDto order) {
|
||||
Page<Object> pageHelper = PageHelper.startPage(page, pageSize);
|
||||
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
|
||||
LambdaQueryWrapper<CardBalanceChange> lambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||
lambdaQueryWrapper.eq(CardBalanceChange::getUserId, nowAccountInfo.getId());
|
||||
if (ObjectUtil.isNotEmpty(order.getChangeType())) {
|
||||
lambdaQueryWrapper.eq(CardBalanceChange::getChangeType, order.getChangeType());
|
||||
}
|
||||
if (ObjectUtil.isNotEmpty(order.getStartTime())) {
|
||||
DateTime parse = DateUtil.parse(order.getStartTime(), DatePattern.NORM_MONTH_FORMATTER);
|
||||
DateTime dateTime = DateUtil.beginOfMonth(parse);
|
||||
DateTime end = DateUtil.endOfMonth(parse);
|
||||
lambdaQueryWrapper.between(CardBalanceChange::getCreateTime, dateTime, end);
|
||||
}
|
||||
lambdaQueryWrapper.eq(CardBalanceChange::getStoreId, order.getStoreId());
|
||||
|
||||
PageRequest pageRequest = PageRequest.of(page, pageSize);
|
||||
|
||||
List<CardBalanceChange> cardBalanceChanges = cardBalanceChangeMapper.selectList(lambdaQueryWrapper);
|
||||
//查询商户名称
|
||||
MtStore mtStore = mtStoreMapper.selectOne(new LambdaQueryWrapper<MtStore>()
|
||||
.eq(MtStore::getId, order.getStoreId()));
|
||||
List<CardBalanceChangeVo> cardBalanceChangeVos = BeanUtil.copyToList(cardBalanceChanges, CardBalanceChangeVo.class);
|
||||
if (ObjectUtil.isNotEmpty(mtStore)) {
|
||||
cardBalanceChangeVos.stream().forEach(item -> item.setStoreName(mtStore.getName()));
|
||||
}
|
||||
PageImpl pageImpl = new PageImpl(cardBalanceChanges, pageRequest, pageHelper.getTotal());
|
||||
PaginationResponse paginationResponse = new PaginationResponse(pageImpl, CardBalanceChangeVo.class);
|
||||
paginationResponse.setTotalPages(pageHelper.getPages());
|
||||
paginationResponse.setTotalElements(pageHelper.getTotal());
|
||||
paginationResponse.setContent(cardBalanceChangeVos);
|
||||
return getSuccessResult(paginationResponse);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user