diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardValue/controller/CardValueController.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardValue/controller/CardValueController.java index 4ff00b294..0552aa39c 100644 --- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardValue/controller/CardValueController.java +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/cardValue/controller/CardValueController.java @@ -85,6 +85,16 @@ public class CardValueController extends BaseController { return getSuccessResult(this.cardValueService.cardValueList(cardValue)); } + /** + * 查询本站会员充值卡列表(小程序) + * @param cardValue + * @return + */ + @GetMapping("cardValueLists") + public ResponseObject cardValueLists(@Param("cardValue") CardValue cardValue) { + return getSuccessResult(this.cardValueService.cardValueList(cardValue)); + } + /** * 通过主键查询单条数据 * diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/userManager/service/impl/LJUserServiceImpl.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/userManager/service/impl/LJUserServiceImpl.java index 5d1f8e61a..2a3267c48 100644 --- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/userManager/service/impl/LJUserServiceImpl.java +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/userManager/service/impl/LJUserServiceImpl.java @@ -348,12 +348,12 @@ public class LJUserServiceImpl extends ServiceImpl impleme LambdaQueryWrapper queryWrapper =new LambdaQueryWrapper<>(); queryWrapper.eq(MtUserFuel::getStoreId,storeId).eq(MtUserFuel::getMtUserId,nowAccountInfo.getId()); List list = userFuelService.list(queryWrapper); + ljUserVo.setUserFuels(list); //判断当前用户是否存在车队 List fleetInfoUniVos = fleetInfoService.queryByStoreId(storeId); if (CollUtil.isNotEmpty(fleetInfoUniVos)) { ljUserVo.setFleetInfoUniVos(fleetInfoUniVos); } - ljUserVo.setUserFuels(list); return ljUserVo; } diff --git a/gasStation-uni/pages/refuel/refuel.vue b/gasStation-uni/pages/refuel/refuel.vue index 0e39f00ca..f5950c64a 100644 --- a/gasStation-uni/pages/refuel/refuel.vue +++ b/gasStation-uni/pages/refuel/refuel.vue @@ -58,7 +58,7 @@ 会员卡类型 - 储值卡(余额:6532.89) + 储值卡(余额:{{user.cardBalance}}) @@ -203,18 +203,29 @@ 充值 - 123456.98 - NO.xxxxxxxxxxxxxxxxx + {{user.cardBalance}} + - + 囤油卡 充值 - 123456.98 - NO.xxxxxxxxxxxxxxxxx + {{item.fuelAmount}} + + + + + + {{item.fleetName}} + 充值 + + + {{item.totalBalance || 0}} + @@ -262,7 +273,7 @@ 消费应支付{{oilOrder.payAmount}}元 - 会员-储值卡(余额:8900.99) + 会员-储值卡(余额:{{user.cardBalance}}) @@ -295,7 +306,7 @@ 加油金额 - 256.89元 + {{oilOrder.orderAmount}}元 优惠信息 @@ -414,7 +425,10 @@ couponList: [], // 是否登录 ifLogin: false, - orderInfo:{}, + orderInfo: {}, + user: {}, + oilCardList: [], + fleetList: [] } }, components: { @@ -478,10 +492,22 @@ onShow() { this.getStore(uni.getStorageSync("storeId")); this.getTheJudgmentIsTheSame() - + this.getOilCard() }, methods: { + // 获取储值卡信息 + getOilCard() { + request({ + url: "business/userManager/user/storeUserInfo/" + uni.getStorageSync("storeId"), + method: 'get', + }).then(res => { + console.log(res, 491); + this.user = res.data + this.oilCardList = res.data.userFuels + this.fleetList = res.data.fleetInfoUniVos + }) + }, // 支付接口 payment() { this.ifLogin = this.AppToken ? true : false @@ -577,7 +603,8 @@ success: function(res) { console.log('success'); uni.redirectTo({ - url: '/pagesRefuel/orderSuccess/index?orderNo=' + _this.oilOrder.orderNo, + url: '/pagesRefuel/orderSuccess/index?orderNo=' + _this + .oilOrder.orderNo, }) }, fail: function(err) { @@ -605,7 +632,8 @@ if (resp.resultCode == '9000') { console.log("支付成功") uni.redirectTo({ - url: '/pagesRefuel/orderSuccess/index?orderNo=' + _this.oilOrder.orderNo, + url: '/pagesRefuel/orderSuccess/index?orderNo=' + _this + .oilOrder.orderNo, }) } else { request({ @@ -727,7 +755,6 @@ method: 'post', data: this.oilOrder, }).then((res) => { - console.log(res,578); this.oilOrder = res.data }) },