|
|
@ -11,6 +11,8 @@ import com.epmet.commons.thirdplat.properties.JcetThirdplatProps; |
|
|
|
import com.epmet.commons.thirdplat.properties.ThirdplatProps; |
|
|
|
import com.epmet.commons.tools.utils.HttpClientManager; |
|
|
|
import com.epmet.commons.tools.utils.Result; |
|
|
|
import org.slf4j.Logger; |
|
|
|
import org.slf4j.LoggerFactory; |
|
|
|
|
|
|
|
import java.io.UnsupportedEncodingException; |
|
|
|
import java.util.HashMap; |
|
|
@ -18,6 +20,8 @@ import java.util.Map; |
|
|
|
|
|
|
|
public class JcetApiService extends AbstractApiService { |
|
|
|
|
|
|
|
Logger logger = LoggerFactory.getLogger(getClass()); |
|
|
|
|
|
|
|
private JcetThirdplatProps jcetThirdplatProps; |
|
|
|
|
|
|
|
public JcetApiService(ThirdplatProps props) { |
|
|
@ -32,6 +36,10 @@ public class JcetApiService extends AbstractApiService { |
|
|
|
* @date 2021.01.19 10:26 |
|
|
|
*/ |
|
|
|
public ThirdPlatUserInfo getUserInfoByTicket(String ticket) throws UnsupportedEncodingException { |
|
|
|
|
|
|
|
logger.info("【请求酒城e通第三方平台】getUserInfoByTicket()接口开始>>>>>>>>>>>>"); |
|
|
|
logger.info("【请求酒城e通第三方平台】getUserInfoByTicket()接口入参 ticket:{}", ticket); |
|
|
|
|
|
|
|
SsoTicketFormDTO ssoTicket = new SsoTicketFormDTO(); |
|
|
|
ssoTicket.setSsoTicket(ticket); |
|
|
|
|
|
|
@ -42,6 +50,13 @@ public class JcetApiService extends AbstractApiService { |
|
|
|
JSON.toJSONString(ssoTicket), |
|
|
|
getHeaders(ssoTicket)); |
|
|
|
|
|
|
|
try { |
|
|
|
logger.info("【请求酒城e通第三方平台】getUserInfoByTicket()接口返回:{}", result.getData()); |
|
|
|
} catch (Exception e) { |
|
|
|
//e.printStackTrace();
|
|
|
|
} |
|
|
|
logger.info("【请求酒城e通第三方平台】getUserInfoByTicket()接口结束<<<<<<<<<<<<"); |
|
|
|
|
|
|
|
JcetUserInfoResultDTO resultDTO = parseResult(result, JcetUserInfoResultDTO.class); |
|
|
|
|
|
|
|
ThirdPlatUserInfo userInfo = new ThirdPlatUserInfo(); |
|
|
|