From f1e88066e0af2a0852fe1095da87c04018c9cf5a Mon Sep 17 00:00:00 2001
From: xiaoyong931011 <15274802129@163.com>
Date: Mon, 11 Sep 2023 18:11:05 +0800
Subject: [PATCH] 优惠卷
---
src/main/java/cc/mrbird/febs/mall/service/impl/ApiMallMemberServiceImpl.java | 13 +++++++++++++
1 files changed, 13 insertions(+), 0 deletions(-)
diff --git a/src/main/java/cc/mrbird/febs/mall/service/impl/ApiMallMemberServiceImpl.java b/src/main/java/cc/mrbird/febs/mall/service/impl/ApiMallMemberServiceImpl.java
index 3a1332e..48309b2 100644
--- a/src/main/java/cc/mrbird/febs/mall/service/impl/ApiMallMemberServiceImpl.java
+++ b/src/main/java/cc/mrbird/febs/mall/service/impl/ApiMallMemberServiceImpl.java
@@ -907,10 +907,23 @@
Long memberId = LoginUserUtil.getLoginUser().getId();
IPage<MallMemberCouponVo> page = new Page<>(mallMemberCouponDto.getPageNum(), mallMemberCouponDto.getPageSize());
mallMemberCouponDto.setMemberId(memberId);
+ mallMemberCouponDto.setExpireTime(DateUtil.date());
IPage<MallMemberCouponVo> pages = mallMemberCouponMapper.selectListInPage(page, mallMemberCouponDto);
return new FebsResponse().success().data(pages);
}
+ @Override
+ public FebsResponse couponDetails(Long id) {
+ Long memberId = LoginUserUtil.getLoginUser().getId();
+ MallMemberCoupon mallMemberCoupon = mallMemberCouponMapper.selectById(id);
+ MallMemberCouponVo mallMemberCouponVo = new MallMemberCouponVo();
+ mallMemberCouponVo.setCouponName(mallMemberCoupon.getCouponName());
+ MallGoodsCoupon mallGoodsCoupon = mallGoodsCouponMapper.selectById(mallMemberCoupon.getCouponId());
+ mallMemberCouponVo.setCostAmount(mallGoodsCoupon.getCostAmount());
+ mallMemberCouponVo.setRealAmount(mallGoodsCoupon.getRealAmount());
+ return new FebsResponse().success().data(mallMemberCouponVo);
+ }
+
private String getXcxLoginUrl(String code) {
String wechatLoginUrl =xcxProperties.getWecharLoginUrl();
return String.format(wechatLoginUrl, xcxProperties.getXcxAppid(), xcxProperties.getXcxSecret(), code);
--
Gitblit v1.9.1