From 33caf2bb79bb3c561916c91ae386ec772411e2e8 Mon Sep 17 00:00:00 2001
From: rk <94314517@qq.com>
Date: 星期一, 11 五月 2026 18:21:50 +0800
Subject: [PATCH] 代码生成

---
 server/services/src/main/java/com/doumee/config/jwt/WebMvcConfig.java |   17 +++++++++--------
 1 files changed, 9 insertions(+), 8 deletions(-)

diff --git a/server/services/src/main/java/com/doumee/config/jwt/WebMvcConfig.java b/server/services/src/main/java/com/doumee/config/jwt/WebMvcConfig.java
index 8fb56d8..3b9f99d 100644
--- a/server/services/src/main/java/com/doumee/config/jwt/WebMvcConfig.java
+++ b/server/services/src/main/java/com/doumee/config/jwt/WebMvcConfig.java
@@ -10,6 +10,7 @@
 import com.doumee.dao.business.model.Member;
 import com.doumee.dao.business.model.ShopInfo;
 import io.jsonwebtoken.JwtException;
+import lombok.extern.log4j.Log4j;
 import org.apache.commons.lang3.StringUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.context.annotation.Bean;
@@ -26,6 +27,7 @@
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
 import java.util.Objects;
+import java.util.logging.Logger;
 
 @Configuration
 public class WebMvcConfig implements WebMvcConfigurer {
@@ -115,6 +117,7 @@
 
     public Boolean checkMemberLogin(HttpServletRequest request, HttpServletResponse response){
         String token = request.getHeader(JwtTokenUtil.HEADER_KEY);
+        System.out.println("浼氬憳token:=========>{}"+token);
         try {
             if(!token.startsWith(Constants.ZERO+"")){
                 throw new BusinessException(ResponseStatus.TOKEN_EXCEED_TIME);
@@ -145,6 +148,7 @@
 
 
     public Boolean checkShopLogin(String token,HttpServletRequest request, HttpServletResponse response){
+        System.out.println("闂ㄥ簵token:=========>{}"+token);
         try {
             if(!token.startsWith(Constants.TWO+"")){
                 throw new BusinessException(ResponseStatus.SHOP_TOKEN_EXCEED_TIME);
@@ -158,20 +162,16 @@
                 throw new BusinessException(ResponseStatus.SHOP_BE_OVERDUE);
             }
             String openid = shop.getOpenid();
-            Integer shopId = getTokenId(token);
-            Integer isDeleted = dao.queryForObject(" select COALESCE(DELETED,0)  from shop_info where id  = ?", Integer.class, shopId);
+            Integer shopId = shop.getId();//getTokenId(token);
+            Integer isDeleted = dao.queryForObject(" select COALESCE(DELETED,0)  from shop_info where VERSION_TYPE = 0 and  id  = ?", Integer.class, shopId);
             if(isDeleted== Constants.ONE){
                 throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"鍟嗘埛宸插垹闄�,璇疯仈绯荤鐞嗗憳");
             }
-            Integer isForbidden = dao.queryForObject(" select COALESCE(STATUS,0)  from shop_info where id  = ?", Integer.class, shopId);
+            Integer isForbidden = dao.queryForObject(" select COALESCE(STATUS,0)  from shop_info where VERSION_TYPE = 0 and id  = ?", Integer.class, shopId);
             if(isForbidden == Constants.ONE){
                 throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"鍟嗘埛宸茬鐢�,璇疯仈绯荤鐞嗗憳");
             }
-            String dbOpenid = dao.queryForObject(" select ifnull(openid,'')  from shop_info where id  = ?", String.class, shopId);
-            if(StringUtils.isBlank(dbOpenid)||!openid.equals(dbOpenid)){
-                throw new BusinessException(ResponseStatus.SHOP_TOKEN_EXCEED_TIME);
-            }
-            Integer count = dao.queryForObject("select count(1) from shop_info where id  = ?", Integer.class, shopId);
+            Integer count = dao.queryForObject("select count(1) from shop_info where VERSION_TYPE = 0 and  id  = ?", Integer.class, shopId);
             if (count != null && count > 0) {
                 request.setAttribute(JwtTokenUtil.SHOP_ID, shop.getId());
                 return true;
@@ -185,6 +185,7 @@
 
     public Boolean checkDriverLogin(HttpServletRequest request, HttpServletResponse response){
         String token = request.getHeader(JwtTokenUtil.HEADER_KEY);
+        System.out.println("鍙告満token:=========>{}"+token);
         try {
             if(!token.startsWith(Constants.ONE+"")){
                 throw new BusinessException(ResponseStatus.TOKEN_EXCEED_TIME);

--
Gitblit v1.9.3