From c4a098e3f88bc5071e36b92b9e5dcceb51129957 Mon Sep 17 00:00:00 2001
From: puzhibing <393733352@qq.com>
Date: 星期四, 01 六月 2023 23:25:07 +0800
Subject: [PATCH] 同步后台代码

---
 management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/general/TAppUserController.java |   13 ++++++++-----
 1 files changed, 8 insertions(+), 5 deletions(-)

diff --git a/management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/general/TAppUserController.java b/management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/general/TAppUserController.java
index 7b9c86e..3c22173 100644
--- a/management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/general/TAppUserController.java
+++ b/management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/general/TAppUserController.java
@@ -8,14 +8,12 @@
 import com.stylefeng.guns.modular.system.enums.CouponStatusEnum;
 import com.stylefeng.guns.modular.system.enums.OrderStateEnum;
 import com.stylefeng.guns.modular.system.exports.TAppUserExceptionExport;
-import com.stylefeng.guns.modular.system.model.TAppUser;
-import com.stylefeng.guns.modular.system.model.TCoupon;
-import com.stylefeng.guns.modular.system.model.TOrder;
-import com.stylefeng.guns.modular.system.model.TUserToCoupon;
+import com.stylefeng.guns.modular.system.model.*;
 import com.stylefeng.guns.modular.system.service.ITAppUserService;
 import com.stylefeng.guns.modular.system.service.ITCouponService;
 import com.stylefeng.guns.modular.system.service.ITOrderService;
 import com.stylefeng.guns.modular.system.service.ITUserToCouponService;
+import com.stylefeng.guns.modular.system.util.RedisUtil;
 import io.swagger.annotations.ApiImplicitParam;
 import io.swagger.annotations.ApiImplicitParams;
 import io.swagger.annotations.ApiOperation;
@@ -58,6 +56,8 @@
     private ITOrderService tOrderService;
     @Autowired
     private ITUserToCouponService tUserToCouponService;
+    @Autowired
+    private RedisUtil redisUtil;
 
     /**
      * 跳转到首页
@@ -239,6 +239,9 @@
         TAppUser tAppUser = tAppUserService.selectById(id);
         if(1 == status){
             tAppUser.setStatus(2);
+            String value = redisUtil.getValue("USER_" + tAppUser.getPhone());
+            redisUtil.remove(value);
+            redisUtil.remove("USER_" + tAppUser.getPhone());
         }
         if(2 == status){
             tAppUser.setStatus(1);
@@ -313,7 +316,7 @@
                 values[i][7] = d.getEmergencyContact();
                 values[i][8] = d.getEmergencyPhone();
                 values[i][9] = String.valueOf(d.getAccountBalance());
-                values[i][10] = String.valueOf(d.getUserTagId());
+                values[i][10] = String.valueOf(Objects.nonNull(d.getUserTagId())?d.getUserTagId():"");
                 Integer status1 = d.getStatus();
                 if(1 == status1){
                     values[i][11] = "正常";

--
Gitblit v1.7.1