bug
This commit is contained in:
parent
fb07dc3458
commit
eee9790aba
@ -57,6 +57,14 @@ export function updateActiveRecommend(data) {
|
|||||||
data: data
|
data: data
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
// 修改推荐有礼
|
||||||
|
export function editActiveRecommend(data) {
|
||||||
|
return request({
|
||||||
|
url: 'business/marketingActivity/activeRecommend/edit',
|
||||||
|
method: 'post',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
// 删除推荐有礼
|
// 删除推荐有礼
|
||||||
export function delActiveRecommend(id) {
|
export function delActiveRecommend(id) {
|
||||||
|
@ -252,7 +252,7 @@
|
|||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<span style="cursor: pointer;" v-if="scope.row.status == 0"> <el-tag>进行中</el-tag > </span>
|
<span style="cursor: pointer;" v-if="scope.row.status == 0"> <el-tag>进行中</el-tag > </span>
|
||||||
<span style="cursor: pointer;" v-if="scope.row.status == 1"> <el-tag type="danger">待生效</el-tag> </span>
|
<span style="cursor: pointer;" v-if="scope.row.status == 1"> <el-tag type="danger">待生效</el-tag> </span>
|
||||||
<span style="cursor: pointer;" v-if="scope.row.status == 2"> <el-tag type="danger">已结束</el-tag> </span>
|
<span style="cursor: pointer;" v-if="scope.row.status == 2"> <el-tag type="danger">下线</el-tag> </span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="赠送积分" align="center" prop="adaptUserType" >
|
<el-table-column label="赠送积分" align="center" prop="adaptUserType" >
|
||||||
@ -289,10 +289,10 @@
|
|||||||
<el-button
|
<el-button
|
||||||
size="mini"
|
size="mini"
|
||||||
type="text"
|
type="text"
|
||||||
icon="el-icon-delete"
|
icon="el-icon-sort-up"
|
||||||
@click="handleDeletexia(scope.row)"
|
@click="handleDeletexia(scope.row)"
|
||||||
v-if="scope.row.isonline == 0"
|
v-if="scope.row.isonline == 1"
|
||||||
>下线</el-button>
|
>上线</el-button>
|
||||||
<el-button
|
<el-button
|
||||||
size="mini"
|
size="mini"
|
||||||
type="text"
|
type="text"
|
||||||
@ -910,10 +910,10 @@ export default {
|
|||||||
// });
|
// });
|
||||||
//
|
//
|
||||||
// });
|
// });
|
||||||
this.$modal.confirm('确定下线此条新人有礼活动信息?').then(function() {
|
this.$modal.confirm('确定上线此条新人有礼活动信息?').then(function() {
|
||||||
return editActiveNewlyweds({id:row.id,isonline:1});
|
return editActiveNewlyweds({id:row.id,isonline:0});
|
||||||
}).then(() => {
|
}).then(() => {
|
||||||
this.$modal.msgSuccess("下线成功");
|
this.$modal.msgSuccess("上线成功");
|
||||||
this.open = false;
|
this.open = false;
|
||||||
this.getList();
|
this.getList();
|
||||||
}).catch(() => {});
|
}).catch(() => {});
|
||||||
|
@ -95,10 +95,10 @@
|
|||||||
<el-button
|
<el-button
|
||||||
size="mini"
|
size="mini"
|
||||||
type="text"
|
type="text"
|
||||||
icon="el-icon-delete"
|
icon="el-icon-sort-up"
|
||||||
@click="handleDeletexia(scope.row)"
|
@click="handleDeletexia(scope.row)"
|
||||||
v-if="scope.row.isonline == 0"
|
v-if="scope.row.isonline == 1"
|
||||||
>下线</el-button>
|
>上线</el-button>
|
||||||
<el-button
|
<el-button
|
||||||
size="mini"
|
size="mini"
|
||||||
type="text"
|
type="text"
|
||||||
@ -320,13 +320,13 @@
|
|||||||
<el-form-item label="活动规则" prop="activeRule">
|
<el-form-item label="活动规则" prop="activeRule">
|
||||||
<el-input type="textarea" v-model="ruleForm.activeRule"></el-input>
|
<el-input type="textarea" v-model="ruleForm.activeRule"></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="活动状态" prop="status">
|
<!-- <el-form-item label="活动状态" prop="status">-->
|
||||||
<el-radio-group v-model="ruleForm.status">
|
<!-- <el-radio-group v-model="ruleForm.status">-->
|
||||||
<el-radio label="0">开启</el-radio>
|
<!-- <el-radio label="0">进行中</el-radio>-->
|
||||||
<!-- <el-radio label="1">待生效</el-radio>-->
|
<!-- <el-radio label="1">待生效</el-radio>-->
|
||||||
<el-radio label="2">关闭</el-radio>
|
<!-- <el-radio label="2">已结束</el-radio>-->
|
||||||
</el-radio-group>
|
<!-- </el-radio-group>-->
|
||||||
</el-form-item>
|
<!-- </el-form-item>-->
|
||||||
|
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-button type="primary" @click="submitForm('ruleForm')">保存</el-button>
|
<el-button type="primary" @click="submitForm('ruleForm')">保存</el-button>
|
||||||
@ -620,7 +620,16 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { listActiveRecommend, getActiveRecommend, delActiveRecommend, addActiveRecommend, updateActiveRecommend,listFavorable,listExchange } from "@/api/EventMarketing/activeRecommend";
|
import {
|
||||||
|
listActiveRecommend,
|
||||||
|
getActiveRecommend,
|
||||||
|
delActiveRecommend,
|
||||||
|
addActiveRecommend,
|
||||||
|
updateActiveRecommend,
|
||||||
|
listFavorable,
|
||||||
|
listExchange,
|
||||||
|
editActiveRecommend
|
||||||
|
} from "@/api/EventMarketing/activeRecommend";
|
||||||
import ImageUpload from '@/components/ImageUpload'
|
import ImageUpload from '@/components/ImageUpload'
|
||||||
import {getToken} from "@/utils/auth";
|
import {getToken} from "@/utils/auth";
|
||||||
import {
|
import {
|
||||||
@ -776,9 +785,9 @@ export default {
|
|||||||
rewardDisplay:[
|
rewardDisplay:[
|
||||||
{ required: true, message: '必填项不能为空', trigger: 'blur' },
|
{ required: true, message: '必填项不能为空', trigger: 'blur' },
|
||||||
],
|
],
|
||||||
status:[
|
// status:[
|
||||||
{ required: true, message: '必填项不能为空', trigger: 'blur' },
|
// { required: true, message: '必填项不能为空', trigger: 'blur' },
|
||||||
],
|
// ],
|
||||||
activeStartTime: [
|
activeStartTime: [
|
||||||
{ required: true, message: '必填项不能为空', trigger: 'change' },
|
{ required: true, message: '必填项不能为空', trigger: 'change' },
|
||||||
],
|
],
|
||||||
@ -816,7 +825,7 @@ export default {
|
|||||||
activeConsumptionChildList:[],
|
activeConsumptionChildList:[],
|
||||||
activeNewName:'',
|
activeNewName:'',
|
||||||
activeNewId:'',
|
activeNewId:'',
|
||||||
|
status:'1'
|
||||||
},
|
},
|
||||||
this.xzshow = true
|
this.xzshow = true
|
||||||
},
|
},
|
||||||
@ -1171,10 +1180,10 @@ export default {
|
|||||||
//
|
//
|
||||||
// });
|
// });
|
||||||
|
|
||||||
this.$modal.confirm('是否确认下线此条推荐有礼活动的信息?').then(function() {
|
this.$modal.confirm('是否确认上线此条推荐有礼活动的信息?').then(function() {
|
||||||
return updateActiveRecommend({id:row.id,isonline : 1,status : 2});
|
return editActiveRecommend({id:row.id,isonline : 0});
|
||||||
}).then(() => {
|
}).then(() => {
|
||||||
this.$modal.msgSuccess("下线成功");
|
this.$modal.msgSuccess("上线成功");
|
||||||
|
|
||||||
this.getactivelist()
|
this.getactivelist()
|
||||||
}).catch(() => {});
|
}).catch(() => {});
|
||||||
|
@ -556,7 +556,7 @@ public class ActiveNewlywedsServiceImpl extends ServiceImpl<ActiveNewlywedsMappe
|
|||||||
for (ActiveNewlyweds newlyweds : activeNewlywedsList) {
|
for (ActiveNewlyweds newlyweds : activeNewlywedsList) {
|
||||||
if (newlyweds.getId().equals(id)){
|
if (newlyweds.getId().equals(id)){
|
||||||
ActiveNewlyweds activeNewlyweds = baseMapper.selectById(id);
|
ActiveNewlyweds activeNewlyweds = baseMapper.selectById(id);
|
||||||
activeNewlyweds.setStatus("2");
|
activeNewlyweds.setStatus("0");
|
||||||
activeNewlyweds.setIsonline(isonline);
|
activeNewlyweds.setIsonline(isonline);
|
||||||
row = baseMapper.updateById(activeNewlyweds);
|
row = baseMapper.updateById(activeNewlyweds);
|
||||||
|
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
package com.fuint.business.marketingActivity.activeRecommend.service.impl;
|
package com.fuint.business.marketingActivity.activeRecommend.service.impl;
|
||||||
|
|
||||||
|
import cn.hutool.core.util.ObjectUtil;
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
import com.baomidou.mybatisplus.core.toolkit.CollectionUtils;
|
import com.baomidou.mybatisplus.core.toolkit.CollectionUtils;
|
||||||
@ -156,6 +157,7 @@ public class ActiveRecommendRecordsServiceImpl extends ServiceImpl<ActiveRecomme
|
|||||||
@Override
|
@Override
|
||||||
@Transactional
|
@Transactional
|
||||||
public boolean add(ActiveRecommendRecordsDTO activeRecommendRecordsDTO) {
|
public boolean add(ActiveRecommendRecordsDTO activeRecommendRecordsDTO) {
|
||||||
|
log.info("邀请有礼");
|
||||||
if (ObjectUtils.isNotEmpty(activeRecommendRecordsDTO) && activeRecommendRecordsDTO.getType().equals("yaoqingyouli")){
|
if (ObjectUtils.isNotEmpty(activeRecommendRecordsDTO) && activeRecommendRecordsDTO.getType().equals("yaoqingyouli")){
|
||||||
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
|
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
|
||||||
Integer userId = nowAccountInfo.getId();
|
Integer userId = nowAccountInfo.getId();
|
||||||
@ -172,10 +174,14 @@ public class ActiveRecommendRecordsServiceImpl extends ServiceImpl<ActiveRecomme
|
|||||||
|
|
||||||
LambdaQueryWrapper<ActiveRecommendRecords> queryWrapper = new LambdaQueryWrapper<>();
|
LambdaQueryWrapper<ActiveRecommendRecords> queryWrapper = new LambdaQueryWrapper<>();
|
||||||
queryWrapper.eq(ActiveRecommendRecords::getStoreId,activeRecommendRecordsDTO.getStoreId())
|
queryWrapper.eq(ActiveRecommendRecords::getStoreId,activeRecommendRecordsDTO.getStoreId())
|
||||||
.eq(ActiveRecommendRecords::getInviteeUserId,userId)
|
.eq(ActiveRecommendRecords::getInviteeUserId,userId);
|
||||||
.eq(ActiveRecommendRecords::getActiveNewlywedsId,oneByIdApplet.get(0).getId());
|
if (ObjectUtil.isNotEmpty(oneByIdApplet) && ObjectUtil.isNotEmpty(oneByIdApplet.get(0).getId()))
|
||||||
|
queryWrapper.eq(ActiveRecommendRecords::getActiveNewlywedsId,oneByIdApplet.get(0).getId());
|
||||||
List<ActiveRecommendRecords> list = list(queryWrapper);
|
List<ActiveRecommendRecords> list = list(queryWrapper);
|
||||||
if (CollectionUtils.isEmpty(list)){
|
if (CollectionUtils.isNotEmpty(list)){
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
if (ljUser1.getId().equals(ljUser.getId())){
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
for (ActiveRecommendVO activeRecommendVO : oneByIdApplet) {
|
for (ActiveRecommendVO activeRecommendVO : oneByIdApplet) {
|
||||||
@ -237,6 +243,8 @@ public class ActiveRecommendRecordsServiceImpl extends ServiceImpl<ActiveRecomme
|
|||||||
//被邀请人
|
//被邀请人
|
||||||
activeRecommendRecords.setInviteeUserId(userId.toString());
|
activeRecommendRecords.setInviteeUserId(userId.toString());
|
||||||
activeRecommendRecords.setInviteeUserName(ljUser.getName());
|
activeRecommendRecords.setInviteeUserName(ljUser.getName());
|
||||||
|
if (ObjectUtil.isNotEmpty(oneByIdApplet) && ObjectUtil.isNotEmpty(oneByIdApplet.get(0).getId()))
|
||||||
|
activeRecommendRecords.setActiveNewlywedsId(oneByIdApplet.get(0).getId());
|
||||||
return save(activeRecommendRecords);
|
return save(activeRecommendRecords);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -339,7 +339,7 @@ public class ActiveRecommendServiceImpl extends ServiceImpl<ActiveRecommendMappe
|
|||||||
for (ActiveRecommend recommend : activeRecommendList) {
|
for (ActiveRecommend recommend : activeRecommendList) {
|
||||||
if(recommend.getId().equals(id)){
|
if(recommend.getId().equals(id)){
|
||||||
ActiveRecommend activeRecommend = baseMapper.selectById(id);
|
ActiveRecommend activeRecommend = baseMapper.selectById(id);
|
||||||
activeRecommend.setStatus("2");
|
activeRecommend.setStatus("0");
|
||||||
activeRecommend.setIsonline(isonline);
|
activeRecommend.setIsonline(isonline);
|
||||||
row = baseMapper.updateById(activeRecommend);
|
row = baseMapper.updateById(activeRecommend);
|
||||||
LambdaQueryWrapper<ActiveApplet> queryWrapper1 = new LambdaQueryWrapper<>();
|
LambdaQueryWrapper<ActiveApplet> queryWrapper1 = new LambdaQueryWrapper<>();
|
||||||
|
@ -263,6 +263,7 @@
|
|||||||
await this.getUserAuthority();
|
await this.getUserAuthority();
|
||||||
// await this.getOilType();
|
// await this.getOilType();
|
||||||
}
|
}
|
||||||
|
|
||||||
await this.getTheJudgmentIsTheSame();
|
await this.getTheJudgmentIsTheSame();
|
||||||
} else {
|
} else {
|
||||||
await this.getUserAuthority();
|
await this.getUserAuthority();
|
||||||
|
@ -92,6 +92,7 @@
|
|||||||
},
|
},
|
||||||
}).then((resp) => {
|
}).then((resp) => {
|
||||||
if (resp.code == 200) {
|
if (resp.code == 200) {
|
||||||
|
console.log(uni.getStorageSync("y_type"),uni.getStorageSync("y_userId"));
|
||||||
if (uni.getStorageSync("y_type") ==
|
if (uni.getStorageSync("y_type") ==
|
||||||
'yaoqingyouli') {
|
'yaoqingyouli') {
|
||||||
_this.activeRecommendRecords()
|
_this.activeRecommendRecords()
|
||||||
|
Loading…
Reference in New Issue
Block a user