修改小程序端的活动展示方式

This commit is contained in:
齐天大圣 2023-12-18 15:10:29 +08:00
parent 1b9036ffb0
commit f8a1fdea61
12 changed files with 214 additions and 32 deletions

View File

@ -243,13 +243,17 @@ public class ActiveConsumptionServiceImpl extends ServiceImpl<ActiveConsumptionM
}
}
}
ArrayList<String> oilNameList = new ArrayList<>();
//油号名字
String oilName = "";
for (Integer id : s.getAdaptOil()) {
oilName += oilNameService.selectOilNameById(id).getOilName()+",";
String oilName = oilNameService.selectOilNameById(id).getOilName();
oilNameList.add(oilName);
}
activeConsumptionAppletVO.setActiveDescribe(s.getName() + ""+"本活动"+oilName+"油品可用,消费需满"+
s.getParticipationConditionMoney()+"元,"+ adaptUserType+"可用,赠送券:"+card+" 赠送物品:"+goods+" 赠送积分:"+s.getPoints()+"积分。");
activeConsumptionAppletVO.setOilName(oilNameList);
activeConsumptionAppletVO.setPoints(s.getPoints());
activeConsumptionAppletVO.setAdaptUserType(adaptUserType);
activeConsumptionAppletVO.setActiveDescribe(s.getName() + ""+"本活动消费需满"+
s.getParticipationConditionMoney()+"元,赠送券:"+card+" 赠送物品:"+goods+"");
return activeConsumptionAppletVO;
}).collect(Collectors.toList());
return appletVOList;

View File

@ -3,11 +3,19 @@ package com.fuint.business.marketingActivity.activeConsumption.vo;
import lombok.Data;
import java.io.Serializable;
import java.util.List;
@Data
public class ActiveConsumptionAppletVO implements Serializable {
//活动描述
private String activeDescribe;
//活动时间
private String time;
//参与油品
private List<String> oilName;
//积分
private Integer points;
//可用用户
private String adaptUserType;
}

View File

@ -29,6 +29,7 @@ import org.springframework.transaction.annotation.Transactional;
import javax.annotation.Resource;
import java.io.Serializable;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.stream.Collectors;
@ -225,9 +226,10 @@ public class ActiveDiscountServiceImpl extends ServiceImpl<ActiveDiscountMapper,
String formatEd = dateFormat.format(s.getActiveEndTime());
activeDiscountAppletVO.setTime(formatSt+"-" + formatEd+"");
//油号名字
String oilName = "";
ArrayList<String> oilNameList = new ArrayList<>();
for (Integer id : s.getAdaptOil()) {
oilName += oilNameService.selectOilNameById(id).getOilName() + ",";
String oilName = oilNameService.selectOilNameById(id).getOilName();
oilNameList.add(oilName);
}
//适用用户名
String adaptUserType = "";
@ -242,7 +244,10 @@ public class ActiveDiscountServiceImpl extends ServiceImpl<ActiveDiscountMapper,
discount = activeDiscountChild.getDiscount();
}
}
activeDiscountAppletVO.setDiscountActiveDescribe(s.getName() + ":本活动:适用用户为:"+adaptUserType+"购买如下油品:" + oilName + ",享受满" +
activeDiscountAppletVO.setAdaptUserType(adaptUserType);
activeDiscountAppletVO.setOilName(oilNameList);
activeDiscountAppletVO.setDiscountActiveDescribe(s.getName() + ",享受满" +
amount + "元,打" + discount + "折。");
return activeDiscountAppletVO;
}).collect(Collectors.toList());

View File

@ -3,10 +3,18 @@ package com.fuint.business.marketingActivity.activeDiscount.vo;
import lombok.Data;
import java.io.Serializable;
import java.util.List;
@Data
public class ActiveDiscountAppletVO implements Serializable {
//活动描述
private String discountActiveDescribe;
//活动时间
private String time;
//参与油品
private List<String> oilName;
//积分
private Integer points;
//可用用户
private String adaptUserType;
}

View File

@ -28,6 +28,7 @@ import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.io.Serializable;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.stream.Collectors;
@ -225,9 +226,10 @@ public class ActiveFullminusServiceImpl extends ServiceImpl<ActiveFullminusMappe
String formatEd = dateFormat.format(s.getActiveEndTime());
activeFullminusAppletVO.setTime(formatSt+"-" + formatEd+"");
//油号名字
String oilName = "";
ArrayList<String> oilNameList = new ArrayList<>();
for (Integer id : s.getAdaptOil()) {
oilName += oilNameService.selectOilNameById(id).getOilName() + ",";
String oilName = oilNameService.selectOilNameById(id).getOilName();
oilNameList.add(oilName);
}
//适用用户名
String adaptUserType = "";
@ -242,7 +244,9 @@ public class ActiveFullminusServiceImpl extends ServiceImpl<ActiveFullminusMappe
discount = activeDiscountChild.getDeductionAmount();
}
}
activeFullminusAppletVO.setFullminusActiveDescribe(s.getName() + ":本活动:适用用户为:"+adaptUserType+"购买如下油品:" + oilName + ",享受满" +
activeFullminusAppletVO.setAdaptUserType(adaptUserType);
activeFullminusAppletVO.setOilName(oilNameList);
activeFullminusAppletVO.setFullminusActiveDescribe(s.getName() +"享受满" +
amount + "元,减" + discount + "元。");
return activeFullminusAppletVO;
}).collect(Collectors.toList());

View File

@ -3,10 +3,18 @@ package com.fuint.business.marketingActivity.activeFullminus.vo;
import lombok.Data;
import java.io.Serializable;
import java.util.List;
@Data
public class ActiveFullminusAppletVO implements Serializable {
//活动描述
private String fullminusActiveDescribe;
//活动时间
private String time;
//参与油品
private List<String> oilName;
//积分
private Integer points;
//可用用户
private String adaptUserType;
}

View File

@ -251,7 +251,11 @@ public class ActiveNewlywedsServiceImpl extends ServiceImpl<ActiveNewlywedsMappe
}
}
//邀请人的券
activeNewlywedsAppletVO.setNewlywedsActiveDescribe("优惠券:"+cardi1+"兑换券:"+cardo1);
//积分
activeNewlywedsAppletVO.setPoint(activeNewlywedsVO.getPoints().toString());
//成长值
activeNewlywedsAppletVO.setGrowValue(activeNewlywedsVO.getGrowthValue().toString());
activeNewlywedsAppletVO.setNewlywedsActiveDescribe("欢迎各位亲朋好友参加本店的新人有礼活动,我们有丰厚的奖励哦,参加即送优惠券:"+cardi1+"兑换券:"+cardo1);
return activeNewlywedsAppletVO;
}

View File

@ -194,9 +194,15 @@ public class ActiveRecommendServiceImpl extends ServiceImpl<ActiveRecommendMappe
}
}
//邀请人的券
activeRecommendAppletVO.setRecommendActiveDescribeIn("优惠券:"+cardi1+"兑换券:"+cardo1);
//活动时间
activeRecommendAppletVO.setTime("永久有效");
//积分
activeRecommendAppletVO.setPoint(activeRecommendVO.getPoints().toString());
//成长值
activeRecommendAppletVO.setGrowValue(activeRecommendVO.getGrowthValue().toString());
activeRecommendAppletVO.setRecommendActiveDescribeIn("欢迎各位亲朋好友来参加本店的推荐有礼活动,对于邀请人,参加即送:优惠券:"+cardi1+"兑换券:"+cardo1);
//被邀请人的券
activeRecommendAppletVO.setRecommendActiveDescribeOut("优惠券:"+cardi2);
activeRecommendAppletVO.setRecommendActiveDescribeOut("对于被邀请人,参加即送:优惠券:"+cardi2);
return activeRecommendAppletVO;
}

View File

@ -256,8 +256,11 @@ public class CardValueServiceImpl extends ServiceImpl<CardValueMapper, CardValue
card = cardValueChild.getGiftCardDetail() + "的券";
}
}
cardValueAppletVO.setDiscountActiveDescribe("本充值活动"+adaptUserType+"可用,充值满"+
s.getBidBalance()+"元,赠送金额为:"+s.getGiftBalance()+"元,赠送券:"+card+" 赠送积分:"+s.getPoints()+"积分,赠送成长值为:"+s.getGrowthValue()+"");
cardValueAppletVO.setAdaptUserType(adaptUserType);
cardValueAppletVO.setPoints(s.getPoints());
cardValueAppletVO.setGrowaValue(s.getGrowthValue());
cardValueAppletVO.setDiscountActiveDescribe("本充值活动,充值满"+
s.getBidBalance()+"元,赠送金额为:"+s.getGiftBalance()+"元,赠送券:"+card+"");
return cardValueAppletVO;
}).collect(Collectors.toList());
return appletVOList;

View File

@ -3,6 +3,7 @@ package com.fuint.business.marketingActivity.cardValue.vo;
import lombok.Data;
import java.io.Serializable;
import java.util.List;
@Data
public class CardValueAppletVO implements Serializable {
@ -10,4 +11,12 @@ public class CardValueAppletVO implements Serializable {
private String discountActiveDescribe;
//活动时间
private String time;
//参与油品
private List<String> oilName;
//积分
private Integer points;
//成长值
private Integer growaValue;
//可用用户
private String adaptUserType;
}

View File

@ -7,14 +7,11 @@
<view class="my-icons"></view>
</view>
<view class="mub">
<view class="mub-box" v-for="(item,index) in activityList" :key="index">
<view class="right-box" v-if="index!=0">
<view class="mub-box" v-for="(item,index) in activityList" :key="index"
@click="intoOtherPage(item.name)">
<view class="right-box">
立即前往
</view>
<view class="right-box" v-if="index==0">
最新活动
</view>
<view class="box-img" @click="intoOtherPage(item.name)">
<image src="../../static/imgs/xfyl.png" v-if="item.name == '消费有礼活动'"></image>
<image src="../../static/imgs/zkyx.png" v-if="item.name == '折扣营销活动'"></image>
@ -25,15 +22,15 @@
</view>
<view class="box-size">
<view class="box-s-title">{{item.name || "活动标题"}}</view>
<!-- <view class="box-s-size">{{item.des || "内容"}}</view> -->
<view class="dis-box">
<view class="box-s-size">{{item.des || "内容"}}</view>
<!-- <view class="dis-box">
<view class="dian"></view>
<view class="h_size">适用用户普通会员银牌会员V2</view>
</view>
<view class="dis-box">
<view class="dian" style="background: #FA5E03;"></view>
<view class="h_size">享受优惠满送一百万 送一元</view>
</view>
</view>-->
</view>
<view class="box-bottom">
<view class="">活动时间</view>
@ -241,4 +238,4 @@
font-weight: 400;
color: #777777;
}
</style>
</style>

View File

@ -14,21 +14,146 @@
<image src="../../static/imgs/xryl.png" v-if="title == '新人有礼活动'"></image>
<image src="../../static/imgs/yqyl.png" v-if="title == '推荐有礼活动'"></image>
</view>
<view class="center-box">
<view class="title-box">活动介绍</view>
<view class="h_size">活动介绍活动介绍活动介绍</view>
<view class="center-box" v-for="(item,index) in datas" :key="index" v-if="title == '消费有礼活动'">
<view class=" title-box">活动介绍</view>
<view class="h_size">{{item.activeDescribe || ""}}</view>
<view class="box-bottom">
<view class="">活动时间</view>
<view>{{item.time}}</view>
</view>
<view class="title-box">参与油品</view>
<view class="w_box">
<view class="w_oil" v-for="(item,index) in 3" :key="index">#95</view>
<view class="w_oil" v-for="(item,index) in item.oilName" :key="index">{{item}}</view>
</view>
<view class="h_bottom">
<view class="dis-box">
<view class="dian"></view>
<view class="h_size">参与会员普通会员银牌会员V2</view>
<view class="h_size">参与会员{{item.adaptUserType}}</view>
</view>
<view class="dis-box">
<view class="dian" style="background: #FA5E03;"></view>
<view class="h_size">获得折扣赠送{{item.points}}积分</view>
</view>
</view>
</view>
<view class="center-box" v-for="(item,index) in datas" :key="index" v-if="title == '折扣营销活动'">
<view class=" title-box">活动介绍</view>
<view class="h_size">{{item.discountActiveDescribe || ""}}</view>
<view class="box-bottom">
<view class="">活动时间</view>
<view>{{item.time}}</view>
</view>
<view class="title-box">参与油品</view>
<view class="w_box">
<view class="w_oil" v-for="(item,index) in item.oilName" :key="index">{{item}}</view>
</view>
<view class="h_bottom">
<view class="dis-box">
<view class="dian"></view>
<view class="h_size">参与会员{{item.adaptUserType}}</view>
</view>
<!-- <view class="dis-box">
<view class="dian" style="background: #FA5E03;"></view>
<view class="h_size">获得折扣赠送{{item.points}}积分</view>
</view> -->
</view>
</view>
<view class="center-box" v-for="(item,index) in datas" :key="index" v-if="title == '满减营销活动'">
<view class=" title-box">活动介绍</view>
<view class="h_size">{{item.fullminusActiveDescribe || ""}}</view>
<view class="box-bottom">
<view class="">活动时间</view>
<view>{{item.time}}</view>
</view>
<view class="title-box">参与油品</view>
<view class="w_box">
<view class="w_oil" v-for="(item,index) in item.oilName" :key="index">{{item}}</view>
</view>
<view class="h_bottom">
<view class="dis-box">
<view class="dian"></view>
<view class="h_size">参与会员{{item.adaptUserType}}</view>
</view>
<!-- <view class="dis-box">
<view class="dian" style="background: #FA5E03;"></view>
<view class="h_size">获得折扣赠送10积分</view>
</view> -->
</view>
</view>
<view class="center-box" v-for="(item,index) in datas" :key="index" v-if="title == '储值卡充值活动'">
<view class=" title-box">活动介绍</view>
<view class="h_size">{{item.discountActiveDescribe || ""}}</view>
<view class="box-bottom">
<view class="">活动时间{{item.time}}</view>
</view>
<!-- <view class="title-box">参与油品</view>
<view class="w_box">
<view class="w_oil" v-for="(item,index) in 3" :key="index">#95</view>
</view> -->
<view class="h_bottom">
<view class="dis-box">
<view class="dian"></view>
<view class="h_size">参与会员{{item.adaptUserType}}</view>
</view>
<view class="dis-box">
<view class="dian" style="background: #FA5E03;"></view>
<view class="h_size">获得折扣赠送{{item.points}}积分</view>
</view>
<view class="dis-box">
<view class="dian" style="background: #FA5E03;"></view>
<view class="h_size">获得折扣赠送{{item.growaValue}}成长值</view>
</view>
</view>
</view>
<view class="center-box" v-if="title == '新人有礼活动'">
<view class=" title-box">活动介绍</view>
<view class="h_size">{{datas.newlywedsActiveDescribe || ""}}</view>
<view class="box-bottom">
<view class="">活动时间</view>
<view>{{datas.time}}</view>
</view>
<!-- <view class="title-box">参与油品</view> -->
<!-- <view class="w_box">
<view class="w_oil" v-for="(item,index) in 3" :key="index">#95</view>
</view> -->
<view class="h_bottom">
<!-- <view class="dis-box">
<view class="dian"></view>
<view class="h_size">参与会员普通会员银牌会员V2</view>
</view> -->
<view class="dis-box">
<view class="dian" style="background: #FA5E03;"></view>
<view class="h_size">赠送{{datas.point}}积分</view>
</view>
<view class="dis-box">
<view class="dian" style="background: #FA5E03;"></view>
<view class="h_size">赠送{{datas.growValue}}成长值</view>
</view>
</view>
</view>
<view class="center-box" v-if="title == '推荐有礼活动'">
<view class=" title-box">活动介绍</view>
<view class="h_size">{{datas.recommendActiveDescribeIn || ""}}</view>
<view class="h_size">{{datas.recommendActiveDescribeOut || ""}}</view>
<view class="box-bottom">
<view class="">活动时间{{datas.time}}</view>
</view>
<!-- <view class="title-box">参与油品</view>
<view class="w_box">
<view class="w_oil" v-for="(item,index) in 3" :key="index">#95</view>
</view> -->
<view class="h_bottom">
<!-- <view class="dis-box">
<view class="dian"></view>
<view class="h_size">参与会员普通会员银牌会员V2</view>
</view> -->
<view class="dis-box">
<view class="dian" style="background: #FA5E03;"></view>
<view class="h_size">赠送{{datas.point}}积分</view>
</view>
<view class="dis-box">
<view class="dian" style="background: #FA5E03;"></view>
<view class="h_size">赠送{{datas.growValue}}成长值</view>
</view>
</view>
</view>
@ -62,6 +187,7 @@
export default {
data() {
return {
oilName: [],
title: '',
datas: [],
@ -86,8 +212,8 @@
method: 'get',
}).then(res => {
if (res.code == 200) {
this.datas = res.data
uni.hideLoading();
this.datas = res.data,
uni.hideLoading();
}
})