From 5ee4dfad6e7b48885e205f8f945276b5d4ca5670 Mon Sep 17 00:00:00 2001
From: puzhibing <393733352@qq.com>
Date: 星期四, 18 五月 2023 16:34:27 +0800
Subject: [PATCH] 修改支付

---
 user/guns-admin/src/main/java/com/supersavedriving/user/modular/system/service/impl/AppUserServiceImpl.java |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/user/guns-admin/src/main/java/com/supersavedriving/user/modular/system/service/impl/AppUserServiceImpl.java b/user/guns-admin/src/main/java/com/supersavedriving/user/modular/system/service/impl/AppUserServiceImpl.java
index 7264bc4..9db79f1 100644
--- a/user/guns-admin/src/main/java/com/supersavedriving/user/modular/system/service/impl/AppUserServiceImpl.java
+++ b/user/guns-admin/src/main/java/com/supersavedriving/user/modular/system/service/impl/AppUserServiceImpl.java
@@ -128,6 +128,7 @@
                 key = token.substring(token.length() - 16);
             }
             redisUtil.setStrValue(key, appUser.getId().toString(), 7 * 24 * 60 * 60);
+            redisUtil.setStrValue("USER_" + appUser.getPhone(), key, 7 * 24 * 60 * 60);
             return token;
         }
         return null;
@@ -204,7 +205,8 @@
      * @param userId
      */
     public List<CouponWarpper> pushCoupon(Integer userId){
-        List<Coupon> coupons = couponService.selectList(new EntityWrapper<Coupon>().eq("coupon_type", 2).eq("coupon_state", 1).gt("remaining_quantity", 0));
+        List<Coupon> coupons = couponService.selectList(new EntityWrapper<Coupon>().eq("coupon_type", 2)
+                .eq("coupon_state", 1).eq("status", 1).gt("remaining_quantity", 0));
         List<CouponWarpper> list = new ArrayList<>();
         for (Coupon coupon : coupons) {
             UserToCoupon userToCoupon = new UserToCoupon();

--
Gitblit v1.7.1