From cdca957e4835e359a89fe4c7c9833ab0c78ee4e3 Mon Sep 17 00:00:00 2001
From: lidongdong <1459917685@qq.com>
Date: 星期一, 01 四月 2024 11:18:10 +0800
Subject: [PATCH] 修改西区uu洗车登录接口500 7

---
 springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/controller/BaseController.java |   18 +++++++++++++++---
 1 files changed, 15 insertions(+), 3 deletions(-)

diff --git a/springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/controller/BaseController.java b/springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/controller/BaseController.java
index b10e110..3d844a2 100644
--- a/springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/controller/BaseController.java
+++ b/springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/controller/BaseController.java
@@ -1,6 +1,7 @@
 package com.panzhihua.common.controller;
 
 import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
 
 import com.panzhihua.common.model.vos.community.ComActVO;
 import com.panzhihua.common.utlis.StringUtils;
@@ -46,6 +47,14 @@
         return ((ServletRequestAttributes)RequestContextHolder.getRequestAttributes()).getRequest();
     }
 
+
+    /**
+     * 获取request对象
+     */
+    public HttpServletResponse getResponse() {
+        return ((ServletRequestAttributes)RequestContextHolder.getRequestAttributes()).getResponse();
+    }
+
     /**
      * 获取登录对象信息
      *
@@ -65,9 +74,9 @@
     public Long getCommunityId() {
         LoginUserInfoVO loginUserInfo = this.getLoginUserInfo();
         Long communityId = loginUserInfo.getCommunityId();
-        if (null == communityId) {
-            throw new ServiceException("用户未绑定社区");
-        }
+//        if (null == communityId) {
+//            throw new ServiceException("用户未绑定社区");
+//        }
         return communityId;
     }
 
@@ -140,6 +149,9 @@
 
     public String getAppId(){
         String appid = this.getRequest().getHeader("appid");
+        if(StringUtils.isEmpty(appid)){
+            return "wx0cef797390444b75";
+        }
         return appid;
     }
 

--
Gitblit v1.7.1