From 407af8365ecdd6700c4b008b0ba40d73da6496c4 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E9=BD=90=E5=A4=A9=E5=A4=A7=E5=9C=A3?= <17615834396@163.com>
Date: Fri, 15 Dec 2023 13:48:17 +0800
Subject: [PATCH] =?UTF-8?q?=E7=94=A8=E6=88=B7=E4=BD=99=E9=A2=9D=E6=9F=A5?=
=?UTF-8?q?=E8=AF=A2?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../mapper/xml/CardFuelRecordMapper.xml | 3 +
.../impl/CardFuelRecordServiceImpl.java | 8 +-
.../controller/LJUserController.java | 12 ++
.../service/UserBalanceService.java | 5 +
.../service/impl/UserBalanceServiceImpl.java | 16 +++
gasStation-uni/pagesHome/MyCard/MyCard.vue | 114 ++++++++++++++++--
.../pagesHome/PointsMall/PointsMall.vue | 4 -
.../pagesHome/oilRecharge/oilRecharge.vue | 2 +-
8 files changed, 144 insertions(+), 20 deletions(-)
diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardFule/mapper/xml/CardFuelRecordMapper.xml b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardFule/mapper/xml/CardFuelRecordMapper.xml
index 97f6915d0..73b2c0a55 100644
--- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardFule/mapper/xml/CardFuelRecordMapper.xml
+++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardFule/mapper/xml/CardFuelRecordMapper.xml
@@ -366,6 +366,9 @@
and mt_user_id = #{cardFuelRecord.mtUserId}
+
+ and store_id = #{cardFuelRecord.storeId}
+
order by create_time
diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardFule/service/impl/CardFuelRecordServiceImpl.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardFule/service/impl/CardFuelRecordServiceImpl.java
index 90d898cb1..d9f0b685e 100644
--- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardFule/service/impl/CardFuelRecordServiceImpl.java
+++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardFule/service/impl/CardFuelRecordServiceImpl.java
@@ -330,10 +330,12 @@ public class CardFuelRecordServiceImpl implements CardFuelRecordService {
*/
@Override
public IPage queryByPageApplet(Page page, CardFuelRecord cardFuelRecord) {
- //获取登录用户id
+ //获取登录用户信息
AccountInfo nowAccountInfo = TokenUtil.getNowAccountInfo();
- Integer id = nowAccountInfo.getId();
- cardFuelRecord.setMtUserId(id);
+ Integer userId = nowAccountInfo.getId();
+ Integer storeId = nowAccountInfo.getStoreId();
+ cardFuelRecord.setMtUserId(userId);
+ cardFuelRecord.setStoreId(storeId);
return this.cardFuelRecordMapper.queryByPageApplet(page,cardFuelRecord);
}
diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/userManager/controller/LJUserController.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/userManager/controller/LJUserController.java
index 4c5210517..67a7ebe91 100644
--- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/userManager/controller/LJUserController.java
+++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/userManager/controller/LJUserController.java
@@ -5,6 +5,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.fuint.business.userManager.entity.LJUser;
import com.fuint.business.userManager.entity.UserStatistic;
import com.fuint.business.userManager.service.LJUserService;
+import com.fuint.business.userManager.service.UserBalanceService;
import com.fuint.business.userManager.service.UserStatisticService;
import com.fuint.business.userManager.vo.LJUserVo;
import com.fuint.framework.web.BaseController;
@@ -26,6 +27,8 @@ public class LJUserController extends BaseController {
private LJUserService userService;
@Autowired
private UserStatisticService statisticService;
+ @Autowired
+ private UserBalanceService userBalanceService;
/**
* 根据条件分页查询会员信息
@@ -52,6 +55,15 @@ public class LJUserController extends BaseController {
return getSuccessResult(userService.selectUsersList());
}
+ /**
+ * 查询会员储值卡余额
+ * @return
+ */
+ @GetMapping("/getUserBalance")
+ public ResponseObject getUserBalance(){
+ return getSuccessResult(userBalanceService.getUserBalance());
+ }
+
/**
* 查询会员统计信息
* @return
diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/userManager/service/UserBalanceService.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/userManager/service/UserBalanceService.java
index b5b813011..e3008e931 100644
--- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/userManager/service/UserBalanceService.java
+++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/userManager/service/UserBalanceService.java
@@ -42,4 +42,9 @@ public interface UserBalanceService extends IService {
*/
public UserBalance selectUserBalance(int userId, int chainStoreId);
+ /**
+ * 查询会员储值卡余额
+ * @return
+ */
+ UserBalance getUserBalance();
}
diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/userManager/service/impl/UserBalanceServiceImpl.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/userManager/service/impl/UserBalanceServiceImpl.java
index 479d35082..3885402df 100644
--- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/userManager/service/impl/UserBalanceServiceImpl.java
+++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/userManager/service/impl/UserBalanceServiceImpl.java
@@ -5,6 +5,8 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.fuint.business.userManager.entity.UserBalance;
import com.fuint.business.userManager.mapper.UserBalanceMapper;
import com.fuint.business.userManager.service.UserBalanceService;
+import com.fuint.common.dto.AccountInfo;
+import com.fuint.common.util.TokenUtil;
import org.springframework.stereotype.Service;
/**
@@ -47,4 +49,18 @@ public class UserBalanceServiceImpl extends ServiceImpl();
+ queryWrapper.eq("mt_user_id",nowAccountInfo.getId());
+ queryWrapper.eq("store_id",nowAccountInfo.getStoreId());
+ UserBalance balance = baseMapper.selectOne(queryWrapper);
+ return balance;
+ }
}
diff --git a/gasStation-uni/pagesHome/MyCard/MyCard.vue b/gasStation-uni/pagesHome/MyCard/MyCard.vue
index 61fa4d571..b2ef69781 100644
--- a/gasStation-uni/pagesHome/MyCard/MyCard.vue
+++ b/gasStation-uni/pagesHome/MyCard/MyCard.vue
@@ -9,17 +9,21 @@
+
+ 储值卡
+
- 油站名称
+
通用余额
- ¥ 0.00
+ ¥ {{cardBalance}}
+
立即充值
@@ -30,30 +34,48 @@
囤油卡
-
- 下一张
-
+
+
+
+
+
+
+ 上一张
+
+
+
+ 下一张
+
+
+
+
+
+
+
- 油站名称
+
囤油卡
- 卡券卡密
- **** **** **** 970
+ {{cardsList[cardsIndex].type}}:{{cardsList[cardsIndex].oilType}}
+
+
+ 立即充值
+
@@ -68,21 +90,23 @@
- 油站名称
+
礼品卡
- 卡券卡密
- **** **** **** 970
+ 卡号:454545578545
+ 卡密: **** **** **** 970
-
+
+ 立即兑换
+
@@ -91,15 +115,23 @@