Commit 6ebb0981 by guojuxing

计费中心挑准到服务市场

parent f461efda
......@@ -182,6 +182,11 @@
<artifactId>gic-member-config-api</artifactId>
<version>${gic-member-config-api}</version>
</dependency>
<dependency>
<groupId>com.gic</groupId>
<artifactId>gic-open-platform-api</artifactId>
<version>${gic-open-platform-api}</version>
</dependency>
</dependencies>
<build>
......
package com.gic.enterprise.web.controller;
import java.io.IOException;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.HashMap;
......@@ -9,6 +10,8 @@ import java.util.Map;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import com.gic.enterprise.response.EnterpriseRestResponse;
import com.gic.open.api.service.market.MarketUserApiService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
......@@ -50,6 +53,8 @@ public class BillingAccountController {
private BillingCouponCardApiService billingCouponCardApiService;
@Autowired
private BillingEnterpriseSmsPackageApiService billingEnterpriseSmsPackageApiService;
@Autowired
private MarketUserApiService marketUserApiService;
/**
* 账户余额相关信息
......@@ -246,4 +251,23 @@ public class BillingAccountController {
}
return RestResponse.success(resultMap);
}
/**
* 单点登录到服务市场首页
* @Title: ssoToMarketService

* @Description:

 * @author guojuxing
* @return com.gic.commons.webapi.reponse.RestResponse


 */
@RequestMapping("sso-to-market-service")
public RestResponse ssoToMarketService() throws IOException {
Integer enterpriseId = UserDetailUtils.getUserDetail().getEnterpriseId();
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()
+ "&enterpriseId=" + enterpriseId);
}
return EnterpriseRestResponse.failure(result);
}
}
......@@ -107,4 +107,6 @@
<dubbo:reference interface="com.gic.enterprise.service.AppletDecorationConfigApiService" id="appletDecorationConfigApiService" timeout="6000"/>
<dubbo:reference interface="com.gic.member.config.api.service.AppletsConfigApiService" id="appletsConfigApiService" timeout="6000"/>
<dubbo:reference interface="com.gic.member.config.api.service.ServiceConfigApiService" id="serviceConfigApiService" timeout="6000"/>
<dubbo:reference interface="com.gic.open.api.service.market.MarketUserApiService" id="marketUserApiService" timeout="6000" />
</beans>
\ No newline at end of file
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