소스 검색

优化地址写死问题

java110 6 년 전
부모
커밋
3b26b544ad

+ 2 - 1
FrontService/src/main/java/com/java110/front/smo/impl/LoginServiceSMOImpl.java

@@ -2,6 +2,7 @@ package com.java110.front.smo.impl;
 
 import com.alibaba.fastjson.JSONObject;
 import com.java110.utils.cache.CommonCache;
+import com.java110.utils.constant.ServiceConstant;
 import com.java110.utils.util.Assert;
 import com.java110.core.context.IPageData;
 import com.java110.core.factory.AuthenticationFactory;
@@ -50,7 +51,7 @@ public class LoginServiceSMOImpl extends BaseComponentSMO implements ILoginServi
         }
 
         loginInfo.put("passwd", AuthenticationFactory.passwdMd5(loginInfo.getString("passwd")));
-        responseEntity = this.callCenterService(restTemplate,pd,loginInfo.toJSONString(), "http://api.java110.com:8008/api/user.service.login",HttpMethod.POST);
+        responseEntity = this.callCenterService(restTemplate,pd,loginInfo.toJSONString(), ServiceConstant.SERVICE_API_URL +"/api/user.service.login",HttpMethod.POST);
         if(responseEntity.getStatusCode() == HttpStatus.OK){
             pd.setToken(JSONObject.parseObject(responseEntity.getBody()).getString("token"));
         }

+ 1 - 1
FrontService/src/main/java/com/java110/front/smo/ownerRegister/ownerLogin/impl/OwnerAppRegisterSMOImpl.java

@@ -54,7 +54,7 @@ public class OwnerAppRegisterSMOImpl extends AppAbstractComponentSMO implements
         JSONObject loginInfo = JSONObject.parseObject(pd.getReqData());
 
         loginInfo.put("passwd", AuthenticationFactory.passwdMd5(loginInfo.getString("password")));
-        responseEntity = this.callCenterService(restTemplate, pd, loginInfo.toJSONString(), "http://api.java110.com:8008/api/user.service.login", HttpMethod.POST);
+        responseEntity = this.callCenterService(restTemplate, pd, loginInfo.toJSONString(), ServiceConstant.SERVICE_API_URL +"/api/user.service.login", HttpMethod.POST);
         if (responseEntity.getStatusCode() != HttpStatus.OK) {
             return responseEntity;
         }

+ 2 - 1
FrontService/src/main/java/com/java110/front/smo/propertyLogin/impl/wxLogin/impl/PropertyAppLoginSMOImpl.java

@@ -6,6 +6,7 @@ import com.java110.front.smo.propertyLogin.impl.wxLogin.IPropertyAppLoginSMO;
 import com.java110.core.context.IPageData;
 import com.java110.core.context.PageData;
 import com.java110.core.factory.AuthenticationFactory;
+import com.java110.utils.constant.ServiceConstant;
 import com.java110.utils.exception.SMOException;
 import com.java110.utils.util.Assert;
 import org.slf4j.Logger;
@@ -52,7 +53,7 @@ public class PropertyAppLoginSMOImpl extends AppAbstractComponentSMO implements
         JSONObject loginInfo = JSONObject.parseObject(pd.getReqData());
 
         loginInfo.put("passwd", AuthenticationFactory.passwdMd5(loginInfo.getString("password")));
-        responseEntity = this.callCenterService(restTemplate, pd, loginInfo.toJSONString(), "http://api.java110.com:8008/api/user.service.login", HttpMethod.POST);
+        responseEntity = this.callCenterService(restTemplate, pd, loginInfo.toJSONString(), ServiceConstant.SERVICE_API_URL +"/api/user.service.login", HttpMethod.POST);
         if (responseEntity.getStatusCode() != HttpStatus.OK) {
             return responseEntity;
         }