From e9df0042859c7a3a3cb52818f82d2dca6705876f Mon Sep 17 00:00:00 2001
From: Your Name <you@example.com>
Date: 星期四, 25 五月 2023 13:09:15 +0800
Subject: [PATCH] 优化代码

---
 springboot/src/main/java/com/java110/boot/smo/login/impl/PropertyAppLoginSMOImpl.java |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)

diff --git a/springboot/src/main/java/com/java110/boot/smo/login/impl/PropertyAppLoginSMOImpl.java b/springboot/src/main/java/com/java110/boot/smo/login/impl/PropertyAppLoginSMOImpl.java
index 99056ae..79666fa 100644
--- a/springboot/src/main/java/com/java110/boot/smo/login/impl/PropertyAppLoginSMOImpl.java
+++ b/springboot/src/main/java/com/java110/boot/smo/login/impl/PropertyAppLoginSMOImpl.java
@@ -58,7 +58,9 @@
         }
 
         JSONObject userInfo = JSONObject.parseObject(responseEntity.getBody());
-
+        if (userInfo.containsKey("code") && 0 != userInfo.getIntValue("code")) {
+            return responseEntity;
+        }
         //鏍规嵁鐢ㄦ埛鏌ヨ鍟嗘埛淇℃伅
         String userId = userInfo.getString("userId");
 
@@ -80,6 +82,9 @@
         userInfo.put("storeTypeCd", storeInfo.getString("storeTypeCd"));
         JSONObject paramOut = new JSONObject();
         paramOut.put("result", 0);
+
+        paramOut.put("code", 0);
+        paramOut.put("msg", "鎴愬姛");
         paramOut.put("userInfo", userInfo);
         paramOut.put("token", userInfo.getString("token"));
         //pd.setToken(JSONObject.parseObject(responseEntity.getBody()).getString("token"));

--
Gitblit v1.8.0