From 37c9eb40cefd85a4589c4cf4e5cacdb8c3792b06 Mon Sep 17 00:00:00 2001
From: cun-nan <19819293608@163.com>
Date: Thu, 17 Oct 2024 11:27:25 +0800
Subject: [PATCH 1/2] 10.17
---
.../EventMarketing/openCardGift/invite.vue | 5 ++
gasStation-uni/pagesMy/invite/details.vue | 33 +++++----
gasStation-uni/pagesMy/invite/invite.vue | 33 ++++++---
gasStation-uni/pagesMy/invite/list.vue | 67 ++++++++++---------
4 files changed, 78 insertions(+), 60 deletions(-)
diff --git a/fuintAdmin/src/views/EventMarketing/openCardGift/invite.vue b/fuintAdmin/src/views/EventMarketing/openCardGift/invite.vue
index 462dd1682..faf8f5464 100644
--- a/fuintAdmin/src/views/EventMarketing/openCardGift/invite.vue
+++ b/fuintAdmin/src/views/EventMarketing/openCardGift/invite.vue
@@ -243,6 +243,11 @@ export default {
},
methods: {
updateMax(item) {
+ this.cardCouponList.forEach(item1 => {
+ if (item.vouchersId==item1.id){
+ item.giftCardName = item1.name
+ }
+ })
//先清空之前的值
item.giftCardTotal = 1;
// 更新最大值
diff --git a/gasStation-uni/pagesMy/invite/details.vue b/gasStation-uni/pagesMy/invite/details.vue
index 82e9bc48e..968e4cbac 100644
--- a/gasStation-uni/pagesMy/invite/details.vue
+++ b/gasStation-uni/pagesMy/invite/details.vue
@@ -4,33 +4,24 @@
活动名称
- {{activeInfo.name}}
+ {{activeInfo.activeName}}
活动时间
- 长期有效
+ {{activeInfo.activeStartTime || '--'}}~{{activeInfo.activeEndTime || ""}}
-
- 推荐人等级
-
- {{activeInfo.userGradeName}}
-
-
-
- 支付方式
-
- 微信、支付宝、云闪付、现金、pos刷卡
-
-
-
- 赠送优惠券
-
- 50元优惠券
+
+
+ 赠送优惠券
+
+ {{item.giftCardName || "--"}}
+
+
赠送积分
@@ -43,6 +34,12 @@
{{activeInfo.growaValue || 0}}成长值
+
+ 活动详情
+
+ {{activeInfo.activityDetails || "--"}}
+
+
diff --git a/gasStation-uni/pagesMy/invite/invite.vue b/gasStation-uni/pagesMy/invite/invite.vue
index 40e6aef41..86f5d3128 100644
--- a/gasStation-uni/pagesMy/invite/invite.vue
+++ b/gasStation-uni/pagesMy/invite/invite.vue
@@ -19,9 +19,9 @@
奖励记录
-
+
+
推荐会员消费有礼
@@ -33,7 +33,7 @@
赠送优惠券
- {{item.giftCardName}}
+ {{item.giftCardName || "--"}}
@@ -44,7 +44,7 @@
特权说明
- {{activeInfo.discountActiveDescribe}}
+ 加油立享优惠
有效期
@@ -74,10 +74,11 @@
扫码领会员
-
+
+
- 百业兴加油站
+ {{store.name}}
油站会员卡
@@ -129,6 +130,7 @@
export default {
data() {
return {
+ titles:"",
query: {
storeId: ''
},
@@ -154,6 +156,8 @@
lon: "",
// 店铺纬度信息
lat: "",
+ // url信息
+ baseUrl: this.$baseUrl,
// 店铺信息
store: {
name: "测试油站",
@@ -168,6 +172,13 @@
// '&userId=' + uni.getStorageSync('userId') + '&type=yaoqingyouli'
// console.log(codes);
// this.query.storeId = uni.getStorageSync("storeId");
+ // #ifdef MP-WEIXIN
+ wx.showShareMenu({
+ withShareTicket: true,
+ //设置下方的Menus菜单,才能够让发送给朋友与分享到朋友圈两个按钮可以点击
+ menus: ["shareAppMessage", "shareTimeline"]
+ })
+ // #endif
},
onShow() {
this.getAllAmount();
@@ -205,7 +216,7 @@
wx.onShareAppMessage(function() {
return {
- title: '来个油惠',
+ title: '矩油惠 百业兴',
path: '/pages/index/index',
imageUrl: 'https://example.com/share.jpg',
success: function(res) {
@@ -219,10 +230,11 @@
},
onShareAppMessage(res) {
if (res.from === 'button') { // 来自页面内分享按钮
- console.log(res.target)
+ console.log(res.target,233)
+
}
return {
- title: '来个油惠',
+ title: '矩油惠 百业兴',
path: '/pages/index/index?storeId=' + uni.getStorageSync('storeId') + '&userId=' + uni
.getStorageSync('userId') + '&type=yaoqingyouli'
}
@@ -252,9 +264,10 @@
// 下载图片
savePicture() {
console.log(230);
+ let url = this.options.code;
// 下载图片
uni.downloadFile({
- url: 'https://www.example.com/file/test', //仅为示例,并非真实的资源
+ url: url,
success: (res) => {
if (res.statusCode === 200) {
console.log('下载成功');
diff --git a/gasStation-uni/pagesMy/invite/list.vue b/gasStation-uni/pagesMy/invite/list.vue
index 9beca08e8..29be710c9 100644
--- a/gasStation-uni/pagesMy/invite/list.vue
+++ b/gasStation-uni/pagesMy/invite/list.vue
@@ -1,7 +1,7 @@
-
+
{{item.name}}
@@ -22,16 +22,24 @@
-
+
- 名字
+ {{item.inviteeUserName || "--"}}
- 2024-8-7
+ {{item.createTime}}
+
+
+
+
+
+
+
+
@@ -51,15 +59,12 @@
}
],
- List: [],
+ list: [],
pageNo: 1,
pageSize: 10,
totalPage: '',
-
+ rewardList: []
}
- },
- onLoad() {
-
},
onPullDownRefresh() {
//下拉刷新
@@ -82,6 +87,12 @@
components: {
+ },
+ onLoad() {
+
+ },
+ onShow() {
+ this.getList()
},
methods: {
setIndex(num) {
@@ -92,30 +103,22 @@
this.pageNo = 1
this.pageSize = 10
this.totalPage = ''
- this.List = []
+ this.list = []
},
- // 分页——网络请求
- async getList() {
- uni.showLoading({
- title: '加载中'
- });
- let res = await request({
- url: '网络请求',
+ // 获取列表信息
+ getList() {
+ request({
+ url: '/business/marketingActivity/activeApplet/getRecommendedRecordsByStoreId',
method: 'get',
- data: {
- pageNo: this.pageNo,
- pageSize: this.pageSize,
+ params: {
+ storeId: uni.getStorageSync("storeId")
+ }
+ }).then(res => {
+ console.log(res, 106)
+ if (res.code == 200) {
+ this.list = res.data
}
})
- if (res.code == 200) {
- uni.hideLoading(); //交互反馈
- if (this.pageNo != 1) {
- this.List = this.ruleList.concat(res.result.records)
- } else {
- this.List = res.result.records
- }
- this.totalPage = res.result.pages
- }
},
goback() {
uni.navigateBack()
@@ -133,7 +136,7 @@
width: 100%;
height: 100vh;
box-sizing: border-box;
-
+ padding-top: 15px;
}
.top_box {
@@ -185,7 +188,7 @@
.whit-box {
width: 95%;
background: #fff;
- margin: 15px;
+ margin: 10px auto;
}
From 4a4d53fcdaed2401ba3abb95623bac36f532a43d Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E8=AE=B8=E5=85=81=E6=9E=9E?= <3422692813@qq.com>
Date: Thu, 17 Oct 2024 11:36:29 +0800
Subject: [PATCH 2/2] =?UTF-8?q?=E6=9B=B4=E6=96=B010.17?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../service/impl/ActiveAppletServiceImpl.java | 20 +++++------
.../ActiveRecommendRecordsController.java | 10 ++++++
.../entity/ActiveRecommendRecords.java | 3 +-
.../ActiveRecommendRecordsService.java | 10 ++++++
.../ActiveRecommendRecordsServiceImpl.java | 35 +++++++++++++++++++
.../activeRecommend/vo/RecordsVo.java | 9 +++++
6 files changed, 76 insertions(+), 11 deletions(-)
create mode 100644 fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/activeRecommend/vo/RecordsVo.java
diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/activeApplet/service/impl/ActiveAppletServiceImpl.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/activeApplet/service/impl/ActiveAppletServiceImpl.java
index e9d9e8935..9a4ecbce4 100644
--- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/activeApplet/service/impl/ActiveAppletServiceImpl.java
+++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/activeApplet/service/impl/ActiveAppletServiceImpl.java
@@ -264,16 +264,16 @@ public class ActiveAppletServiceImpl extends ServiceImpl cardCoupons = activeRecommendChildMapper.selectList(new LambdaQueryWrapper()
- .in(ActiveRecommendChild::getId, split));
- if (cardCoupons != null) {
- List collect = cardCoupons.stream().map(ActiveRecommendChild::getGiftCardName).collect(Collectors.toList());
- activeRecommendRecord.setCouponNames(collect);
- }
- }
+// //通过券ids查询券信息
+// for (ActiveRecommendRecords activeRecommendRecord : activeRecommendRecords) {
+// String[] split = activeRecommendRecord.getActiveRecommendIds().split(",");
+// List cardCoupons = activeRecommendChildMapper.selectList(new LambdaQueryWrapper()
+// .in(ActiveRecommendChild::getId, split));
+// if (cardCoupons != null) {
+// List collect = cardCoupons.stream().map(ActiveRecommendChild::getGiftCardName).collect(Collectors.toList());
+// activeRecommendRecord.setCouponNames(collect);
+// }
+// }
return activeRecommendRecords;
}
diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/activeRecommend/controller/ActiveRecommendRecordsController.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/activeRecommend/controller/ActiveRecommendRecordsController.java
index cdfd4ab02..aa2748119 100644
--- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/activeRecommend/controller/ActiveRecommendRecordsController.java
+++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/activeRecommend/controller/ActiveRecommendRecordsController.java
@@ -96,5 +96,15 @@ public class ActiveRecommendRecordsController extends BaseController {
public ResponseObject delete(@RequestParam("idList") List idList) {
return getSuccessResult(this.activeRecommendRecordsService.removeByIds(idList));
}
+
+ /**
+ * 查询邀请记录奖励列表
+ * @param storeId
+ * @return
+ */
+ @GetMapping("selectRecord")
+ public ResponseObject selectRecord(Integer storeId){
+ return getSuccessResult(this.activeRecommendRecordsService.selectAll(storeId));
+ }
}
diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/activeRecommend/entity/ActiveRecommendRecords.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/activeRecommend/entity/ActiveRecommendRecords.java
index 8dc93442a..340e72bfa 100644
--- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/activeRecommend/entity/ActiveRecommendRecords.java
+++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/activeRecommend/entity/ActiveRecommendRecords.java
@@ -48,7 +48,8 @@ public class ActiveRecommendRecords extends Model {
//更新时间
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss" , timezone = "GMT+8")
private Date updateTime;
- private String activeRecommendIds;
+ private String vouchersIds;
+ private String vouchersNames;
private Integer points;
private Integer growthValue;
@TableField(exist = false)
diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/activeRecommend/service/ActiveRecommendRecordsService.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/activeRecommend/service/ActiveRecommendRecordsService.java
index 1abf7c62e..b27df508f 100644
--- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/activeRecommend/service/ActiveRecommendRecordsService.java
+++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/activeRecommend/service/ActiveRecommendRecordsService.java
@@ -5,6 +5,9 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.fuint.business.marketingActivity.activeRecommend.dto.ActiveRecommendRecordsDTO;
import com.fuint.business.marketingActivity.activeRecommend.entity.ActiveRecommendRecords;
+import com.fuint.business.marketingActivity.activeRecommend.vo.RecordsVo;
+
+import java.util.List;
/**
* 邀请有礼记录表(ActiveRecommendRecords)表服务接口
@@ -42,5 +45,12 @@ public interface ActiveRecommendRecordsService extends IService selectAll(Integer storeId);
}
diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/activeRecommend/service/impl/ActiveRecommendRecordsServiceImpl.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/activeRecommend/service/impl/ActiveRecommendRecordsServiceImpl.java
index a319d3c3f..ef37c0260 100644
--- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/activeRecommend/service/impl/ActiveRecommendRecordsServiceImpl.java
+++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/activeRecommend/service/impl/ActiveRecommendRecordsServiceImpl.java
@@ -23,6 +23,7 @@ import com.fuint.business.marketingActivity.activeRecommend.service.ActiveRecomm
import com.fuint.business.marketingActivity.activeRecommend.service.ActiveRecommendService;
import com.fuint.business.marketingActivity.activeRecommend.vo.ActiveRecommendRecordsVO;
import com.fuint.business.marketingActivity.activeRecommend.vo.ActiveRecommendVO;
+import com.fuint.business.marketingActivity.activeRecommend.vo.RecordsVo;
import com.fuint.business.marketingActivity.activeUserRecharge.entity.ActiveUserRecharge;
import com.fuint.business.marketingActivity.activeUserRecharge.entity.ActiveUserRechargeChild;
import com.fuint.business.marketingActivity.activeUserRecharge.entity.ActiveUserRechargeRecords;
@@ -58,6 +59,7 @@ import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import javax.annotation.Resource;
+import java.util.ArrayList;
import java.util.Arrays;
import java.util.Date;
import java.util.List;
@@ -470,6 +472,39 @@ public class ActiveRecommendRecordsServiceImpl extends ServiceImpl selectAll(Integer storeId) {
+ AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
+ List activeRecommendRecords = baseMapper.selectList(new LambdaQueryWrapper()
+ .eq(ActiveRecommendRecords::getStoreId, storeId)
+ .eq(ActiveRecommendRecords::getUserId, nowAccountInfo.getId()));
+ List recordsVos = new ArrayList<>();
+ for (ActiveRecommendRecords activeRecommendRecord : activeRecommendRecords) {
+ if (ObjectUtil.isNotEmpty(activeRecommendRecord.getPoints())) {
+ RecordsVo recordsVo = new RecordsVo();
+ recordsVo.setName(activeRecommendRecord.getPoints() + "积分");
+ recordsVo.setTime(activeRecommendRecord.getCreateTime().toString());
+ recordsVos.add(recordsVo);
+ }
+ if (ObjectUtil.isNotEmpty(activeRecommendRecord.getGrowthValue())) {
+ RecordsVo recordsVo1 = new RecordsVo();
+ recordsVo1.setName(activeRecommendRecord.getGrowthValue() + "成长值");
+ recordsVo1.setTime(activeRecommendRecord.getCreateTime().toString());
+ recordsVos.add(recordsVo1);
+ }
+ String[] split = activeRecommendRecord.getVouchersNames().split(",");
+ if (split.length > 0) {
+ for (String s : split) {
+ RecordsVo recordsVo2 = new RecordsVo();
+ recordsVo2.setName(s);
+ recordsVo2.setTime(activeRecommendRecord.getCreateTime().toString());
+ recordsVos.add(recordsVo2);
+ }
+ }
+ }
+ return recordsVos;
+ }
+
private boolean isTimeBetween(Date activeStartTime, Date activeEndTime, DateTime now) {
if (now.isAfterOrEquals(activeStartTime) && now.isBeforeOrEquals(activeEndTime)) {
return true;
diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/activeRecommend/vo/RecordsVo.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/activeRecommend/vo/RecordsVo.java
new file mode 100644
index 000000000..997a00c0c
--- /dev/null
+++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/activeRecommend/vo/RecordsVo.java
@@ -0,0 +1,9 @@
+package com.fuint.business.marketingActivity.activeRecommend.vo;
+
+import lombok.Data;
+
+@Data
+public class RecordsVo {
+ private String name;
+ private String time;
+}