Commit 132182f6 by guojuxing

网址配置

parent a605865f
......@@ -10,6 +10,7 @@ import java.util.Map;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import com.gic.enterprise.web.config.Config;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
......@@ -58,9 +59,11 @@ public class BillingAccountController {
private MarketUserApiService marketUserApiService;
@Autowired
private AppTokenApiService appTokenApiService;
@Autowired
private Config config;
private static final String URL = "https://four.gicdev.com";
//private static final String URL = "https://four.gicdev.com";
/**
* 账户余额相关信息
......@@ -277,7 +280,7 @@ public class BillingAccountController {
ServiceResponse<String> result = marketUserApiService
.BindGicEnterprise(Long.valueOf(enterpriseId), null, null, null);
if (result.isSuccess()) {
return RestResponse.success(URL + "/market/gic" + "?loginKey=" + result.getResult()
return RestResponse.success(config.getHost() + "/market/gic" + "?loginKey=" + result.getResult()
+ "&enterpriseId=" + enterpriseId);
}
return EnterpriseRestResponse.failure(result);
......
......@@ -5,6 +5,7 @@ import java.util.HashMap;
import java.util.List;
import java.util.Map;
import com.gic.operation.web.config.Config;
import org.apache.commons.collections.CollectionUtils;
import org.apache.commons.lang.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
......@@ -45,9 +46,11 @@ public class LoginController {
private UserApiService userApiService;
@Autowired
private MarketUserApiService marketUserApiService;
@Autowired
private Config config;
private static final String URL = "https://four.gicdev.com";
// private static final String URL = "https://four.gicdev.com";
/**
* 商户绑定服务市场
......@@ -80,7 +83,7 @@ public class LoginController {
ServiceResponse<String> result = marketUserApiService.BindGicEnterprise(Long.valueOf(enterpriseId), null, null,
null);
if (result.isSuccess()) {
return RestResponse.success(URL + "/market/gic" + "?loginKey=" + result.getResult()
return RestResponse.success(config.getHost() + "/market/gic" + "?loginKey=" + result.getResult()
+ "&enterpriseId=" + enterpriseId);
}
return EnterpriseRestResponse.failure(result);
......@@ -89,7 +92,7 @@ public class LoginController {
@RequestMapping("login-gic")
public RestResponse login(Integer enterpriseId, String redirectUrl) throws IOException {
if (StringUtils.isBlank(redirectUrl)) {
redirectUrl = URL + "/damo-system/overview/index";
redirectUrl = config.getHost() + "/damo-system/overview/index";
// redirectUrl = "https://four.gicdev.com/cost-center/billing-center/overview";
}
String token;
......@@ -165,7 +168,7 @@ public class LoginController {
//塞缓存
token = UserDetailUtils.setUserDetail(userDetail);
String SSO_LOGIN_URL = URL + "/gic-auth-web/login-for-operation";
String SSO_LOGIN_URL = config.getHost() + "/gic-auth-web/login-for-operation";
return RestResponse.success(SSO_LOGIN_URL + "?token=" + token + "&redirectUrl=" + redirectUrl);
}
return RestResponse.success();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment