Selaa lähdekoodia

优化 返回

wuxw 6 vuotta sitten
vanhempi
commit
f02ffaa845

+ 4 - 0
AppFrontService/src/main/java/com/java110/app/controller/OwnerAppLoginController.java

@@ -10,6 +10,7 @@ import com.java110.utils.constant.CommonConstant;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.http.HttpStatus;
 import org.springframework.http.ResponseEntity;
 import org.springframework.web.bind.annotation.RequestBody;
 import org.springframework.web.bind.annotation.RequestMapping;
@@ -43,6 +44,9 @@ public class OwnerAppLoginController extends BaseController {
                 "login", "", "", "",
                 request.getHeader("APP_ID"));
         ResponseEntity<String> responseEntity = ownerAppLoginSMOImpl.doLogin(pd);
+        if(responseEntity.getStatusCode() != HttpStatus.OK){
+            return responseEntity;
+        }
         JSONObject outParam = JSONObject.parseObject(responseEntity.getBody());
         pd.setToken(outParam.getString("token"));
         request.setAttribute(CommonConstant.CONTEXT_PAGE_DATA,pd);

+ 3 - 0
AppFrontService/src/main/java/com/java110/app/controller/PropertyAppLoginController.java

@@ -44,6 +44,9 @@ public class PropertyAppLoginController extends BaseController {
                 "login", "", "", "",
                 request.getHeader("APP_ID"));
         ResponseEntity<String> responseEntity = propertyAppLoginSMOImpl.doLogin(pd);
+        if(responseEntity.getStatusCode() != HttpStatus.OK){
+            return responseEntity;
+        }
         JSONObject outParam = JSONObject.parseObject(responseEntity.getBody());
         pd.setToken(outParam.getString("token"));
         request.setAttribute(CommonConstant.CONTEXT_PAGE_DATA,pd);

+ 2 - 1
AppFrontService/src/main/java/com/java110/app/smo/ownerLogin/impl/OwnerAppLoginSMOImpl.java

@@ -81,7 +81,8 @@ public class OwnerAppLoginSMOImpl extends AppAbstractComponentSMO implements IOw
         }
 
         JSONObject appUser = ownerInfo.getJSONArray("auditAppUserBindingOwners").getJSONObject(0);
-
+        appUser.put("userId",userId);
+        appUser.put("userName",paramIn.getString("username"));
         JSONObject paramOut = new JSONObject();
         paramOut.put("result", 0);
         paramOut.put("owner", appUser);