Commit 07f5a0eb by guojuxing

网址配置

parent 68274a01
......@@ -252,9 +252,9 @@ public class AppletDecorationConfigApiServiceImpl implements AppletDecorationCon
if (totalIntegral.split(",").length > 1) {
return ServiceResponse.failure(ErrorCode.PARAMETER_ERROR.getCode(), "数据资产-总积分只能选择一个");
}
if (order.split(",").length > 1) {
return ServiceResponse.failure(ErrorCode.PARAMETER_ERROR.getCode(), "数据资产-线下订单只能选择一个");
}
// if (order.split(",").length > 1) {
// return ServiceResponse.failure(ErrorCode.PARAMETER_ERROR.getCode(), "数据资产-线下订单只能选择一个");
// }
if (!mainCardId.toString().equals(totalIntegral) && !appletSubCardList.contains(totalIntegral)) {
return ServiceResponse.failure(ErrorCode.PARAMETER_ERROR.getCode(), "数据资产-总积分只能选择小程序主卡或者主卡关联的平衡主卡");
}
......
......@@ -11,6 +11,7 @@ import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import com.gic.enterprise.response.EnterpriseRestResponse;
import com.gic.enterprise.web.config.Config;
import com.gic.open.api.service.AppTokenApiService;
import com.gic.open.api.service.market.MarketUserApiService;
import org.slf4j.Logger;
......@@ -58,6 +59,8 @@ public class BillingAccountController {
private MarketUserApiService marketUserApiService;
@Autowired
private AppTokenApiService appTokenApiService;
@Autowired
private Config config;
/**
* 账户余额相关信息
......@@ -274,7 +277,7 @@ public class BillingAccountController {
ServiceResponse<String> result = marketUserApiService
.BindGicEnterprise(Long.valueOf(enterpriseId), null, null, null);
if (result.isSuccess()) {
return RestResponse.success("https://four.gicdev.com/market/gic" + "?loginKey=" + result.getResult()
return RestResponse.success(config.getHost() + "/market/gic" + "?loginKey=" + result.getResult()
+ "&enterpriseId=" + enterpriseId);
}
return EnterpriseRestResponse.failure(result);
......
......@@ -9,6 +9,7 @@ import com.gic.enterprise.constants.Constants;
import com.gic.enterprise.response.EnterpriseRestResponse;
import com.gic.enterprise.utils.ResultControllerUtils;
import com.gic.open.api.service.market.MarketUserApiService;
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,8 +46,8 @@ public class LoginController {
private UserApiService userApiService;
@Autowired
private MarketUserApiService marketUserApiService;
private static final String SSO_LOGIN_URL = "https://four.gicdev.com/gic-auth-web/login-for-operation";
@Autowired
private Config config;
/**
* 商户绑定服务市场
......@@ -79,7 +80,7 @@ public class LoginController {
ServiceResponse<String> result = marketUserApiService.BindGicEnterprise(Long.valueOf(enterpriseId), null, null,
null);
if (result.isSuccess()) {
return RestResponse.success("https://four.gicdev.com/market/gic" + "?loginKey=" + result.getResult()
return RestResponse.success(config.getHost() + "/market/gic" + "?loginKey=" + result.getResult()
+ "&enterpriseId=" + enterpriseId);
}
return EnterpriseRestResponse.failure(result);
......@@ -88,7 +89,7 @@ public class LoginController {
@RequestMapping("login-gic")
public RestResponse login(Integer enterpriseId, String redirectUrl) throws IOException {
if (StringUtils.isBlank(redirectUrl)) {
redirectUrl = "https://four.gicdev.com/damo-system/overview/index";
redirectUrl = config.getHost() + "/damo-system/overview/index";
// redirectUrl = "https://four.gicdev.com/cost-center/billing-center/overview";
}
String token;
......@@ -163,6 +164,8 @@ public class LoginController {
}
//塞缓存
token = UserDetailUtils.setUserDetail(userDetail);
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