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