This commit is contained in:
cun-nan 2024-03-13 16:18:27 +08:00
parent 8b69eae4bb
commit a57a04dc87
4 changed files with 125 additions and 0 deletions

View File

@ -15,5 +15,7 @@ public interface ActiveAppletService extends IService<ActiveApplet> {
List<ActiveApplet> applet(ActiveApplet activeApplet);
List<ActiveApplet> appletActiveByType(ActiveApplet activeApplet);
void updateIsonline(Integer storeId,String type,Integer activeId,String isonline);
}

View File

@ -1,5 +1,7 @@
package com.fuint.business.marketingActivity.activeApplet.service.impl;
import cn.hutool.core.util.ObjectUtil;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.fuint.business.marketingActivity.activeApplet.mapper.ActiveAppletMapper;
import com.fuint.business.marketingActivity.activeApplet.entity.ActiveApplet;
@ -30,5 +32,20 @@ public class ActiveAppletServiceImpl extends ServiceImpl<ActiveAppletMapper, Act
public List<ActiveApplet> appletActiveByType(ActiveApplet activeApplet) {
return activeAppletMapper.appletActiveByType(activeApplet);
}
@Override
public void updateIsonline(Integer storeId, String type, Integer activeId, String isonline) {
QueryWrapper queryWrapper = new QueryWrapper<>();
queryWrapper.eq("store_id",storeId);
queryWrapper.eq("type",type);
queryWrapper.eq("active_id",activeId);
ActiveApplet activeApplet = baseMapper.selectOne(queryWrapper);
if (ObjectUtil.isNotEmpty(activeApplet)){
if (isonline.equals("1")) activeApplet.setActiveStatus("2");
if (isonline.equals("0")) activeApplet.setActiveStatus("1");
activeApplet.setIsonline(isonline);
baseMapper.updateById(activeApplet);
}
}
}

View File

@ -423,6 +423,9 @@ public class CardValueServiceImpl extends ServiceImpl<CardValueMapper, CardValue
if (ObjectUtil.isNotEmpty(one)) activeApplet.setId(one.getId());
activeApplet.setGrowaValue(cardValue.getGrowthValue());
activeApplet.setPoints(cardValue.getPoints());
if (cardValueDTO.getIsonline().equals("1")) activeApplet.setActiveStatus("2");
if (cardValueDTO.getIsonline().equals("0")) activeApplet.setActiveStatus("1");
activeApplet.setIsonline(cardValueDTO.getIsonline());
activeApplet.setType("1");
activeApplet.setName("储值卡充值活动");
activeApplet.setDiscountActiveDescribe("本充值活动,充值满"+

View File

@ -0,0 +1,103 @@
<template>
<view class="content">
<view class="container">
<view class="my-header">
<view class="my-icons" @click="goback"> <uni-icons type="left" size="16"></uni-icons> </view>
<view class="my-text">邀请码</view>
<view class="my-icons"></view>
</view>
<view class="cen-box">
<view class="code-box">
<w-qrcode :options="options"></w-qrcode>
</view>
</view>
</view>
</view>
</template>
<script>
import request from '../../utils/request';
export default {
data() {
return {
title: '',
List: [],
pageNo: 1,
pageSize: 10,
totalPage: '',
options: {
code: 'https://www.tuofeng.cc/oily?storeId=' + uni.getStorageSync('storeId') + '&userId=' + uni
.getStorageSync('userId') + '&type=yaoqingyouli',
// code: 'https://www.tuofeng.cc/oily?storeId=' + uni.getStorageSync('storeId') + ' &userId=' + uni
// .getStorageSync('userId'), //
size: 460, // 460460rpx
},
}
},
onLoad() {
},
components: {
},
methods: {
goback() {
uni.navigateBack()
}
}
}
</script>
<style scoped lang="scss">
.cen-box {
width: 95%;
background: #ffffff;
box-sizing: border-box;
padding: 15px;
border-radius: 8px;
margin: 10px auto;
}
.code-box {
display: flex;
align-items: center;
justify-content: center;
}
.content {
background: #2F72F7;
}
.container {
width: 100%;
height: 100vh;
box-sizing: border-box;
padding-top: 88px;
}
.my-header {
width: 100%;
height: 88px;
background: #ffffff;
display: flex;
align-items: center;
justify-content: space-between;
color: #000;
box-sizing: border-box;
padding: 0px 15px;
padding-top: 40px;
z-index: 99999;
.my-icons {
width: 20px;
}
position: fixed;
top: 0px;
}
</style>