|
@@ -21,26 +21,11 @@ public class HttpService {
|
|
|
|
|
|
|
|
private HttpClient client;
|
|
private HttpClient client;
|
|
|
|
|
|
|
|
- private String token;
|
|
|
|
|
- private String tokenTest = "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJyZXFNYXAiOiJ7XCJjYXJSZXF1ZXN0SWRcIjpcIlRPS0UyMDI1MDMxMTA5MzY0MzI0NTAwMDBcIn0iLCJpc3MiOiJ0ay5jbiIsImV4cCI6MTc0MTc0MzQwM30.rXChMg_TtHTv5XZs2_6JtHpHZ7N_E3JeCtrhRolSwbQ";
|
|
|
|
|
-
|
|
|
|
|
/**
|
|
/**
|
|
|
* {@link #checkResponseUnknownField(UnknownFieldEntity)} 接口对数据校验,发现实体上缺少 json 的一些字段时,抛出异常。
|
|
* {@link #checkResponseUnknownField(UnknownFieldEntity)} 接口对数据校验,发现实体上缺少 json 的一些字段时,抛出异常。
|
|
|
*/
|
|
*/
|
|
|
private boolean unknownFieldThrowException = true;
|
|
private boolean unknownFieldThrowException = true;
|
|
|
|
|
|
|
|
-
|
|
|
|
|
- private String token() {
|
|
|
|
|
- if (token != null) {
|
|
|
|
|
- return token;
|
|
|
|
|
- }
|
|
|
|
|
- if (tokenTest != null) {
|
|
|
|
|
- return tokenTest;
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- throw new RuntimeException("token 为 null,请先登录!");
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
private void checkResponseUnknownField(UnknownFieldEntity entity) {
|
|
private void checkResponseUnknownField(UnknownFieldEntity entity) {
|
|
|
if (entity == null) {
|
|
if (entity == null) {
|
|
|
return;
|
|
return;
|
|
@@ -126,7 +111,7 @@ public class HttpService {
|
|
|
IdentityTokenResult data = response.getData();
|
|
IdentityTokenResult data = response.getData();
|
|
|
|
|
|
|
|
if (data != null) {
|
|
if (data != null) {
|
|
|
- token = data.getTkCarRequestToken();
|
|
|
|
|
|
|
+ token = data.getTkCarRequesttoken;
|
|
|
|
|
|
|
|
if (logger.isInfoEnabled()) {
|
|
if (logger.isInfoEnabled()) {
|
|
|
logger.info("保存新 token:{}", token);
|
|
logger.info("保存新 token:{}", token);
|
|
@@ -158,7 +143,7 @@ public class HttpService {
|
|
|
* @param comCode
|
|
* @param comCode
|
|
|
* @return
|
|
* @return
|
|
|
*/
|
|
*/
|
|
|
- public InitIdentityResult initIdentity(String tplatformId, String fromId, String orderId, String comCode) {
|
|
|
|
|
|
|
+ public InitIdentityResult initIdentity(String token, String tplatformId, String fromId, String orderId, String comCode) {
|
|
|
InitIdentityParam param = new InitIdentityParam();
|
|
InitIdentityParam param = new InitIdentityParam();
|
|
|
param.setTplatformId(tplatformId);
|
|
param.setTplatformId(tplatformId);
|
|
|
param.setChannelCode("OffWeb");
|
|
param.setChannelCode("OffWeb");
|
|
@@ -167,7 +152,7 @@ public class HttpService {
|
|
|
param.setComCode(comCode);
|
|
param.setComCode(comCode);
|
|
|
|
|
|
|
|
HttpHeaders httpHeaders = new HttpHeaders();
|
|
HttpHeaders httpHeaders = new HttpHeaders();
|
|
|
- httpHeaders.add("tkCarRequestToken", token());
|
|
|
|
|
|
|
+ httpHeaders.add("tkCarRequestToken", token);
|
|
|
|
|
|
|
|
InitIdentityResult.Response response = client.request(HttpURL.initIdentity, param, httpHeaders, InitIdentityResult.Response.class);
|
|
InitIdentityResult.Response response = client.request(HttpURL.initIdentity, param, httpHeaders, InitIdentityResult.Response.class);
|
|
|
|
|
|
|
@@ -183,7 +168,7 @@ public class HttpService {
|
|
|
param.setChannelCode("OffWeb");
|
|
param.setChannelCode("OffWeb");
|
|
|
|
|
|
|
|
HttpHeaders httpHeaders = new HttpHeaders();
|
|
HttpHeaders httpHeaders = new HttpHeaders();
|
|
|
- httpHeaders.add("tkCarRequestToken", token());
|
|
|
|
|
|
|
+ httpHeaders.add("tkCarRequestToken", token);
|
|
|
|
|
|
|
|
InitBasicDataResult response = client.request(HttpURL.initBasicData, param, httpHeaders, InitBasicDataResult.class);
|
|
InitBasicDataResult response = client.request(HttpURL.initBasicData, param, httpHeaders, InitBasicDataResult.class);
|
|
|
|
|
|
|
@@ -203,7 +188,7 @@ public class HttpService {
|
|
|
* @param orderId
|
|
* @param orderId
|
|
|
* @return
|
|
* @return
|
|
|
*/
|
|
*/
|
|
|
- public BasicInfoResult basicInfo(String tplatformId, String tplatLoginKey, String fromId, String orderId) {
|
|
|
|
|
|
|
+ public BasicInfoResult basicInfo(String token, String tplatformId, String tplatLoginKey, String fromId, String orderId) {
|
|
|
BasicInfoParam param = new BasicInfoParam();
|
|
BasicInfoParam param = new BasicInfoParam();
|
|
|
param.setTplatformId(tplatformId);
|
|
param.setTplatformId(tplatformId);
|
|
|
param.setChannelCode("OffWeb");
|
|
param.setChannelCode("OffWeb");
|
|
@@ -217,7 +202,7 @@ public class HttpService {
|
|
|
//param.setCrossRenewalFlag("");
|
|
//param.setCrossRenewalFlag("");
|
|
|
|
|
|
|
|
HttpHeaders httpHeaders = new HttpHeaders();
|
|
HttpHeaders httpHeaders = new HttpHeaders();
|
|
|
- httpHeaders.add("tkCarRequestToken", token());
|
|
|
|
|
|
|
+ httpHeaders.add("tkCarRequestToken", token);
|
|
|
|
|
|
|
|
StringResponse response = client.request(HttpURL.basicInfo, param, httpHeaders, StringResponse.class);
|
|
StringResponse response = client.request(HttpURL.basicInfo, param, httpHeaders, StringResponse.class);
|
|
|
|
|
|
|
@@ -250,7 +235,7 @@ public class HttpService {
|
|
|
* @param comCode
|
|
* @param comCode
|
|
|
* @return
|
|
* @return
|
|
|
*/
|
|
*/
|
|
|
- public List<CarTypeResult> carType(String tplatformId, String fromId, String comCode) {
|
|
|
|
|
|
|
+ public List<CarTypeResult> carType(String token, String tplatformId, String fromId, String comCode) {
|
|
|
CarTypeParam param = new CarTypeParam();
|
|
CarTypeParam param = new CarTypeParam();
|
|
|
param.setTplatformId(tplatformId);
|
|
param.setTplatformId(tplatformId);
|
|
|
param.setChannelCode("OffWeb");
|
|
param.setChannelCode("OffWeb");
|
|
@@ -258,7 +243,7 @@ public class HttpService {
|
|
|
param.setComCode(comCode);
|
|
param.setComCode(comCode);
|
|
|
|
|
|
|
|
HttpHeaders httpHeaders = new HttpHeaders();
|
|
HttpHeaders httpHeaders = new HttpHeaders();
|
|
|
- httpHeaders.add("tkCarRequestToken", token());
|
|
|
|
|
|
|
+ httpHeaders.add("tkCarRequestToken", token);
|
|
|
|
|
|
|
|
CarTypeResult.Response response = client.request(HttpURL.carType, param, httpHeaders, CarTypeResult.Response.class);
|
|
CarTypeResult.Response response = client.request(HttpURL.carType, param, httpHeaders, CarTypeResult.Response.class);
|
|
|
|
|
|
|
@@ -277,7 +262,7 @@ public class HttpService {
|
|
|
* @param agencyKeyword 渠道名称
|
|
* @param agencyKeyword 渠道名称
|
|
|
* @return
|
|
* @return
|
|
|
*/
|
|
*/
|
|
|
- public List<AgentFuzzyResult> agentFuzzy(String tplatformId, String fromId, String orderId, String agencyKeyword) {
|
|
|
|
|
|
|
+ public List<AgentFuzzyResult> agentFuzzy(String token, String tplatformId, String fromId, String orderId, String agencyKeyword) {
|
|
|
AgentFuzzyParam param = new AgentFuzzyParam();
|
|
AgentFuzzyParam param = new AgentFuzzyParam();
|
|
|
param.setTplatformId(tplatformId);
|
|
param.setTplatformId(tplatformId);
|
|
|
param.setFromId(fromId);
|
|
param.setFromId(fromId);
|
|
@@ -288,7 +273,7 @@ public class HttpService {
|
|
|
param.setAgentCode("");
|
|
param.setAgentCode("");
|
|
|
|
|
|
|
|
HttpHeaders httpHeaders = new HttpHeaders();
|
|
HttpHeaders httpHeaders = new HttpHeaders();
|
|
|
- httpHeaders.add("tkCarRequestToken", token());
|
|
|
|
|
|
|
+ httpHeaders.add("tkCarRequestToken", token);
|
|
|
|
|
|
|
|
AgentFuzzyResult.Response response = client.request(HttpURL.agentFuzzy, param, httpHeaders, AgentFuzzyResult.Response.class);
|
|
AgentFuzzyResult.Response response = client.request(HttpURL.agentFuzzy, param, httpHeaders, AgentFuzzyResult.Response.class);
|
|
|
|
|
|
|
@@ -308,7 +293,7 @@ public class HttpService {
|
|
|
* @param agentCode 代理人代码
|
|
* @param agentCode 代理人代码
|
|
|
* @return
|
|
* @return
|
|
|
*/
|
|
*/
|
|
|
- public TKAgentQueryResult agentQuery(String tplatformId, String orderId, TKAgentFuzzy tkAgentFuzzy, String agentCode) {
|
|
|
|
|
|
|
+ public TKAgentQueryResult agentQuery(String token, String tplatformId, String orderId, TKAgentFuzzy tkAgentFuzzy, String agentCode) {
|
|
|
AgentQueryParam param = new AgentQueryParam();
|
|
AgentQueryParam param = new AgentQueryParam();
|
|
|
param.setTplatformId(tplatformId);
|
|
param.setTplatformId(tplatformId);
|
|
|
param.setFromId(tkAgentFuzzy.getFromID());
|
|
param.setFromId(tkAgentFuzzy.getFromID());
|
|
@@ -319,7 +304,7 @@ public class HttpService {
|
|
|
param.setAgentCode(agentCode);
|
|
param.setAgentCode(agentCode);
|
|
|
|
|
|
|
|
HttpHeaders httpHeaders = new HttpHeaders();
|
|
HttpHeaders httpHeaders = new HttpHeaders();
|
|
|
- httpHeaders.add("tkCarRequestToken", token());
|
|
|
|
|
|
|
+ httpHeaders.add("tkCarRequestToken", token);
|
|
|
|
|
|
|
|
TKAgentQueryResult.Response response = client.request(HttpURL.agentQuery, param, httpHeaders, TKAgentQueryResult.Response.class);
|
|
TKAgentQueryResult.Response response = client.request(HttpURL.agentQuery, param, httpHeaders, TKAgentQueryResult.Response.class);
|
|
|
|
|
|
|
@@ -359,7 +344,7 @@ public class HttpService {
|
|
|
* @param agentCode 代理人代码
|
|
* @param agentCode 代理人代码
|
|
|
* @return
|
|
* @return
|
|
|
*/
|
|
*/
|
|
|
- public List<AreaUserResult> areaUser(String tplatformId, String orderId, TKAgentFuzzy tkAgentFuzzy, String agentCode) {
|
|
|
|
|
|
|
+ public List<AreaUserResult> areaUser(String token, String tplatformId, String orderId, TKAgentFuzzy tkAgentFuzzy, String agentCode) {
|
|
|
AreaUserParam param = new AreaUserParam();
|
|
AreaUserParam param = new AreaUserParam();
|
|
|
param.setTplatformId(tplatformId);
|
|
param.setTplatformId(tplatformId);
|
|
|
param.setFromId(tkAgentFuzzy.getFromID());
|
|
param.setFromId(tkAgentFuzzy.getFromID());
|
|
@@ -370,7 +355,7 @@ public class HttpService {
|
|
|
param.setAgentCode(agentCode);
|
|
param.setAgentCode(agentCode);
|
|
|
|
|
|
|
|
HttpHeaders httpHeaders = new HttpHeaders();
|
|
HttpHeaders httpHeaders = new HttpHeaders();
|
|
|
- httpHeaders.add("tkCarRequestToken", token());
|
|
|
|
|
|
|
+ httpHeaders.add("tkCarRequestToken", token);
|
|
|
|
|
|
|
|
AreaUserResult.Response response = client.request(HttpURL.areaUser, param, httpHeaders, AreaUserResult.Response.class);
|
|
AreaUserResult.Response response = client.request(HttpURL.areaUser, param, httpHeaders, AreaUserResult.Response.class);
|
|
|
|
|
|
|
@@ -386,12 +371,12 @@ public class HttpService {
|
|
|
*
|
|
*
|
|
|
* @return
|
|
* @return
|
|
|
*/
|
|
*/
|
|
|
- public OrderIdResult orderId() {
|
|
|
|
|
|
|
+ public OrderIdResult orderId(String token) {
|
|
|
OrderIdParam param = new OrderIdParam();
|
|
OrderIdParam param = new OrderIdParam();
|
|
|
param.setChannelCode("OffWeb");
|
|
param.setChannelCode("OffWeb");
|
|
|
|
|
|
|
|
HttpHeaders httpHeaders = new HttpHeaders();
|
|
HttpHeaders httpHeaders = new HttpHeaders();
|
|
|
- httpHeaders.add("tkCarRequestToken", token());
|
|
|
|
|
|
|
+ httpHeaders.add("tkCarRequestToken", token);
|
|
|
|
|
|
|
|
OrderIdResult.Response response = client.request(HttpURL.orderId, param, httpHeaders, OrderIdResult.Response.class);
|
|
OrderIdResult.Response response = client.request(HttpURL.orderId, param, httpHeaders, OrderIdResult.Response.class);
|
|
|
|
|
|
|
@@ -407,9 +392,9 @@ public class HttpService {
|
|
|
*
|
|
*
|
|
|
* @return
|
|
* @return
|
|
|
*/
|
|
*/
|
|
|
- public CarModelinfoQueryResult carModelinfoQuery(CarModelinfoQueryParam param) {
|
|
|
|
|
|
|
+ public CarModelinfoQueryResult carModelinfoQuery(String token, CarModelinfoQueryParam param) {
|
|
|
HttpHeaders httpHeaders = new HttpHeaders();
|
|
HttpHeaders httpHeaders = new HttpHeaders();
|
|
|
- httpHeaders.add("tkCarRequestToken", token());
|
|
|
|
|
|
|
+ httpHeaders.add("tkCarRequestToken", token);
|
|
|
|
|
|
|
|
StringResponse response = client.request(HttpURL.carModelinfoQuery, param, httpHeaders, StringResponse.class);
|
|
StringResponse response = client.request(HttpURL.carModelinfoQuery, param, httpHeaders, StringResponse.class);
|
|
|
|
|
|
|
@@ -440,9 +425,9 @@ public class HttpService {
|
|
|
*
|
|
*
|
|
|
* @return
|
|
* @return
|
|
|
*/
|
|
*/
|
|
|
- public String carModelinfoCheckVehicleType(CarModelinfoCheckVehicleTypeParam param) {
|
|
|
|
|
|
|
+ public String carModelinfoCheckVehicleType(String token, CarModelinfoCheckVehicleTypeParam param) {
|
|
|
HttpHeaders httpHeaders = new HttpHeaders();
|
|
HttpHeaders httpHeaders = new HttpHeaders();
|
|
|
- httpHeaders.add("tkCarRequestToken", token());
|
|
|
|
|
|
|
+ httpHeaders.add("tkCarRequestToken", token);
|
|
|
|
|
|
|
|
StringResponse response = client.request(HttpURL.carModelinfoCheckVehicleType, param, httpHeaders, StringResponse.class);
|
|
StringResponse response = client.request(HttpURL.carModelinfoCheckVehicleType, param, httpHeaders, StringResponse.class);
|
|
|
|
|
|
|
@@ -456,9 +441,9 @@ public class HttpService {
|
|
|
*
|
|
*
|
|
|
* @return
|
|
* @return
|
|
|
*/
|
|
*/
|
|
|
- public SaveBasicInfoResult saveBasicInfo(SaveBasicInfoParam param) {
|
|
|
|
|
|
|
+ public SaveBasicInfoResult saveBasicInfo(String token, SaveBasicInfoParam param) {
|
|
|
HttpHeaders httpHeaders = new HttpHeaders();
|
|
HttpHeaders httpHeaders = new HttpHeaders();
|
|
|
- httpHeaders.add("tkCarRequestToken", token());
|
|
|
|
|
|
|
+ httpHeaders.add("tkCarRequestToken", token);
|
|
|
|
|
|
|
|
SaveBasicInfoResult.Response response = client.request(HttpURL.saveBasicInfo, param, httpHeaders, SaveBasicInfoResult.Response.class);
|
|
SaveBasicInfoResult.Response response = client.request(HttpURL.saveBasicInfo, param, httpHeaders, SaveBasicInfoResult.Response.class);
|
|
|
|
|
|
|
@@ -472,7 +457,7 @@ public class HttpService {
|
|
|
*
|
|
*
|
|
|
* @return
|
|
* @return
|
|
|
*/
|
|
*/
|
|
|
- public InitQuoteResult initQuote(String tplatformId, String tplatLoginKey, String orderId) {
|
|
|
|
|
|
|
+ public InitQuoteResult initQuote(String token, String tplatformId, String tplatLoginKey, String orderId) {
|
|
|
InitQuoteParam param = new InitQuoteParam();
|
|
InitQuoteParam param = new InitQuoteParam();
|
|
|
param.setChannelCode("OffWeb");
|
|
param.setChannelCode("OffWeb");
|
|
|
param.setOrderID(orderId);
|
|
param.setOrderID(orderId);
|
|
@@ -480,7 +465,7 @@ public class HttpService {
|
|
|
param.setTplatLoginKey(tplatLoginKey);
|
|
param.setTplatLoginKey(tplatLoginKey);
|
|
|
|
|
|
|
|
HttpHeaders httpHeaders = new HttpHeaders();
|
|
HttpHeaders httpHeaders = new HttpHeaders();
|
|
|
- httpHeaders.add("tkCarRequestToken", token());
|
|
|
|
|
|
|
+ httpHeaders.add("tkCarRequestToken", token);
|
|
|
|
|
|
|
|
InitQuoteResult.Response response = client.request(HttpURL.initQuote, param, httpHeaders, InitQuoteResult.Response.class);
|
|
InitQuoteResult.Response response = client.request(HttpURL.initQuote, param, httpHeaders, InitQuoteResult.Response.class);
|
|
|
|
|
|
|
@@ -494,7 +479,7 @@ public class HttpService {
|
|
|
*
|
|
*
|
|
|
* @return
|
|
* @return
|
|
|
*/
|
|
*/
|
|
|
- public PreciseInitResult preciseInitToInit(String tplatformId, String tplatLoginKey, String orderId) {
|
|
|
|
|
|
|
+ public PreciseInitResult preciseInitToInit(String token, String tplatformId, String tplatLoginKey, String orderId) {
|
|
|
PreciseInitParam param = new PreciseInitParam();
|
|
PreciseInitParam param = new PreciseInitParam();
|
|
|
param.setChannelCode("OffWeb");
|
|
param.setChannelCode("OffWeb");
|
|
|
param.setOrderID(orderId);
|
|
param.setOrderID(orderId);
|
|
@@ -503,7 +488,7 @@ public class HttpService {
|
|
|
param.setTplatLoginKey(tplatLoginKey);
|
|
param.setTplatLoginKey(tplatLoginKey);
|
|
|
|
|
|
|
|
HttpHeaders httpHeaders = new HttpHeaders();
|
|
HttpHeaders httpHeaders = new HttpHeaders();
|
|
|
- httpHeaders.add("tkCarRequestToken", token());
|
|
|
|
|
|
|
+ httpHeaders.add("tkCarRequestToken", token);
|
|
|
|
|
|
|
|
PreciseInitResult.Response response = client.request(HttpURL.preciseInit, param, httpHeaders, PreciseInitResult.Response.class);
|
|
PreciseInitResult.Response response = client.request(HttpURL.preciseInit, param, httpHeaders, PreciseInitResult.Response.class);
|
|
|
|
|
|
|
@@ -517,7 +502,7 @@ public class HttpService {
|
|
|
*
|
|
*
|
|
|
* @return
|
|
* @return
|
|
|
*/
|
|
*/
|
|
|
- public PreciseInitResult preciseInitToQuote(String tplatformId, String tplatLoginKey, String orderId, TKChgOwnerInfo TKChgOwnerInfo) {
|
|
|
|
|
|
|
+ public PreciseInitResult preciseInitToQuote(String token, String tplatformId, String tplatLoginKey, String orderId, TKChgOwnerInfo TKChgOwnerInfo) {
|
|
|
PreciseInitParam param = new PreciseInitParam();
|
|
PreciseInitParam param = new PreciseInitParam();
|
|
|
param.setChannelCode("OffWeb");
|
|
param.setChannelCode("OffWeb");
|
|
|
param.setOrderID(orderId);
|
|
param.setOrderID(orderId);
|
|
@@ -527,7 +512,7 @@ public class HttpService {
|
|
|
param.setChgOwnerInfo(TKChgOwnerInfo);
|
|
param.setChgOwnerInfo(TKChgOwnerInfo);
|
|
|
|
|
|
|
|
HttpHeaders httpHeaders = new HttpHeaders();
|
|
HttpHeaders httpHeaders = new HttpHeaders();
|
|
|
- httpHeaders.add("tkCarRequestToken", token());
|
|
|
|
|
|
|
+ httpHeaders.add("tkCarRequestToken", token);
|
|
|
|
|
|
|
|
PreciseInitResult.Response response = client.request(HttpURL.preciseInit, param, httpHeaders, PreciseInitResult.Response.class);
|
|
PreciseInitResult.Response response = client.request(HttpURL.preciseInit, param, httpHeaders, PreciseInitResult.Response.class);
|
|
|
|
|
|
|
@@ -536,9 +521,9 @@ public class HttpService {
|
|
|
return response.getData();
|
|
return response.getData();
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- public PreciseInitResult preciseInitToQuote(PreciseInitParam param) {
|
|
|
|
|
|
|
+ public PreciseInitResult preciseInitToQuote(String token, PreciseInitParam param) {
|
|
|
HttpHeaders httpHeaders = new HttpHeaders();
|
|
HttpHeaders httpHeaders = new HttpHeaders();
|
|
|
- httpHeaders.add("tkCarRequestToken", token());
|
|
|
|
|
|
|
+ httpHeaders.add("tkCarRequestToken", token);
|
|
|
|
|
|
|
|
PreciseInitResult.Response response = client.request(HttpURL.preciseInit, param, httpHeaders, PreciseInitResult.Response.class);
|
|
PreciseInitResult.Response response = client.request(HttpURL.preciseInit, param, httpHeaders, PreciseInitResult.Response.class);
|
|
|
|
|
|
|
@@ -552,7 +537,7 @@ public class HttpService {
|
|
|
*
|
|
*
|
|
|
* @return
|
|
* @return
|
|
|
*/
|
|
*/
|
|
|
- public PreciseInitResult preciseInitToVipQuote(String tplatformId, String tplatLoginKey, String orderId, TKInsureInfo insureInfo) {
|
|
|
|
|
|
|
+ public PreciseInitResult preciseInitToVipQuote(String token, String tplatformId, String tplatLoginKey, String orderId, TKInsureInfo insureInfo) {
|
|
|
PreciseInitParam param = new PreciseInitParam();
|
|
PreciseInitParam param = new PreciseInitParam();
|
|
|
param.setChannelCode("OffWeb");
|
|
param.setChannelCode("OffWeb");
|
|
|
param.setOrderID(orderId);
|
|
param.setOrderID(orderId);
|
|
@@ -562,7 +547,7 @@ public class HttpService {
|
|
|
param.setInsureInfo(insureInfo);
|
|
param.setInsureInfo(insureInfo);
|
|
|
|
|
|
|
|
HttpHeaders httpHeaders = new HttpHeaders();
|
|
HttpHeaders httpHeaders = new HttpHeaders();
|
|
|
- httpHeaders.add("tkCarRequestToken", token());
|
|
|
|
|
|
|
+ httpHeaders.add("tkCarRequestToken", token);
|
|
|
|
|
|
|
|
PreciseInitResult.Response response = client.request(HttpURL.preciseInit, param, httpHeaders, PreciseInitResult.Response.class);
|
|
PreciseInitResult.Response response = client.request(HttpURL.preciseInit, param, httpHeaders, PreciseInitResult.Response.class);
|
|
|
|
|
|
|
@@ -576,14 +561,14 @@ public class HttpService {
|
|
|
*
|
|
*
|
|
|
* @return
|
|
* @return
|
|
|
*/
|
|
*/
|
|
|
- public AgentTaxResult agentTax(String tplatformId, String orderId) {
|
|
|
|
|
|
|
+ public AgentTaxResult agentTax(String token, String tplatformId, String orderId) {
|
|
|
AgentTaxParam param = new AgentTaxParam();
|
|
AgentTaxParam param = new AgentTaxParam();
|
|
|
param.setChannelCode("OffWeb");
|
|
param.setChannelCode("OffWeb");
|
|
|
param.setOrderID(orderId);
|
|
param.setOrderID(orderId);
|
|
|
param.setTplatformId(tplatformId);
|
|
param.setTplatformId(tplatformId);
|
|
|
|
|
|
|
|
HttpHeaders httpHeaders = new HttpHeaders();
|
|
HttpHeaders httpHeaders = new HttpHeaders();
|
|
|
- httpHeaders.add("tkCarRequestToken", token());
|
|
|
|
|
|
|
+ httpHeaders.add("tkCarRequestToken", token);
|
|
|
|
|
|
|
|
AgentTaxResult.Response response = client.request(HttpURL.agentTax, param, httpHeaders, AgentTaxResult.Response.class);
|
|
AgentTaxResult.Response response = client.request(HttpURL.agentTax, param, httpHeaders, AgentTaxResult.Response.class);
|
|
|
|
|
|
|
@@ -597,7 +582,7 @@ public class HttpService {
|
|
|
*
|
|
*
|
|
|
* @return
|
|
* @return
|
|
|
*/
|
|
*/
|
|
|
- public InitQuotationResult initQuotationFlag1(String tplatformId, String orderId) {
|
|
|
|
|
|
|
+ public InitQuotationResult initQuotationFlag1(String token, String tplatformId, String orderId) {
|
|
|
InitQuotationParam param = new InitQuotationParam();
|
|
InitQuotationParam param = new InitQuotationParam();
|
|
|
param.setChannelCode("OffWeb");
|
|
param.setChannelCode("OffWeb");
|
|
|
param.setOrderID(orderId);
|
|
param.setOrderID(orderId);
|
|
@@ -605,7 +590,7 @@ public class HttpService {
|
|
|
param.setInitFlag("1");
|
|
param.setInitFlag("1");
|
|
|
|
|
|
|
|
HttpHeaders httpHeaders = new HttpHeaders();
|
|
HttpHeaders httpHeaders = new HttpHeaders();
|
|
|
- httpHeaders.add("tkCarRequestToken", token());
|
|
|
|
|
|
|
+ httpHeaders.add("tkCarRequestToken", token);
|
|
|
|
|
|
|
|
StringResponse response = client.request(HttpURL.initQuotation, param, httpHeaders, StringResponse.class);
|
|
StringResponse response = client.request(HttpURL.initQuotation, param, httpHeaders, StringResponse.class);
|
|
|
|
|
|
|
@@ -630,7 +615,7 @@ public class HttpService {
|
|
|
*
|
|
*
|
|
|
* @return
|
|
* @return
|
|
|
*/
|
|
*/
|
|
|
- public InitQuotationResult initQuotationFlag2(String tplatformId, String orderId) {
|
|
|
|
|
|
|
+ public InitQuotationResult initQuotationFlag2(String token, String tplatformId, String orderId) {
|
|
|
InitQuotationParam param = new InitQuotationParam();
|
|
InitQuotationParam param = new InitQuotationParam();
|
|
|
param.setChannelCode("OffWeb");
|
|
param.setChannelCode("OffWeb");
|
|
|
param.setOrderID(orderId);
|
|
param.setOrderID(orderId);
|
|
@@ -638,7 +623,7 @@ public class HttpService {
|
|
|
param.setInitFlag("quote");
|
|
param.setInitFlag("quote");
|
|
|
|
|
|
|
|
HttpHeaders httpHeaders = new HttpHeaders();
|
|
HttpHeaders httpHeaders = new HttpHeaders();
|
|
|
- httpHeaders.add("tkCarRequestToken", token());
|
|
|
|
|
|
|
+ httpHeaders.add("tkCarRequestToken", token);
|
|
|
|
|
|
|
|
InitQuotationResult.Response response = client.request(HttpURL.initQuotation, param, httpHeaders, InitQuotationResult.Response.class);
|
|
InitQuotationResult.Response response = client.request(HttpURL.initQuotation, param, httpHeaders, InitQuotationResult.Response.class);
|
|
|
|
|
|
|
@@ -654,7 +639,7 @@ public class HttpService {
|
|
|
*
|
|
*
|
|
|
* @return
|
|
* @return
|
|
|
*/
|
|
*/
|
|
|
- public SaveQuoteResult saveQuote(String tplatformId, String fromId, String orderId) {
|
|
|
|
|
|
|
+ public SaveQuoteResult saveQuote(String token, String tplatformId, String fromId, String orderId) {
|
|
|
SaveQuoteParam param = new SaveQuoteParam();
|
|
SaveQuoteParam param = new SaveQuoteParam();
|
|
|
param.setChannelCode("OffWeb");
|
|
param.setChannelCode("OffWeb");
|
|
|
param.setTplatformId(tplatformId);
|
|
param.setTplatformId(tplatformId);
|
|
@@ -663,7 +648,7 @@ public class HttpService {
|
|
|
param.setFromID(fromId);
|
|
param.setFromID(fromId);
|
|
|
|
|
|
|
|
HttpHeaders httpHeaders = new HttpHeaders();
|
|
HttpHeaders httpHeaders = new HttpHeaders();
|
|
|
- httpHeaders.add("tkCarRequestToken", token());
|
|
|
|
|
|
|
+ httpHeaders.add("tkCarRequestToken", token);
|
|
|
|
|
|
|
|
SaveQuoteResult.Response response = client.request(HttpURL.saveQuote, param, httpHeaders, SaveQuoteResult.Response.class);
|
|
SaveQuoteResult.Response response = client.request(HttpURL.saveQuote, param, httpHeaders, SaveQuoteResult.Response.class);
|
|
|
|
|
|
|
@@ -673,13 +658,13 @@ public class HttpService {
|
|
|
/**
|
|
/**
|
|
|
* @return
|
|
* @return
|
|
|
*/
|
|
*/
|
|
|
- public FloatNoticeGetResult floatNoticeGet(String tplatformId, String orderId) {
|
|
|
|
|
|
|
+ public FloatNoticeGetResult floatNoticeGet(String token, String tplatformId, String orderId) {
|
|
|
FloatNoticeGetParam param = new FloatNoticeGetParam();
|
|
FloatNoticeGetParam param = new FloatNoticeGetParam();
|
|
|
param.setChannelCode("OffWeb");
|
|
param.setChannelCode("OffWeb");
|
|
|
param.setOrderID(orderId);
|
|
param.setOrderID(orderId);
|
|
|
|
|
|
|
|
HttpHeaders httpHeaders = new HttpHeaders();
|
|
HttpHeaders httpHeaders = new HttpHeaders();
|
|
|
- httpHeaders.add("tkCarRequestToken", token());
|
|
|
|
|
|
|
+ httpHeaders.add("tkCarRequestToken", token);
|
|
|
|
|
|
|
|
FloatNoticeGetResult.Response response = client.request(HttpURL.floatNoticeGet, param, httpHeaders, FloatNoticeGetResult.Response.class);
|
|
FloatNoticeGetResult.Response response = client.request(HttpURL.floatNoticeGet, param, httpHeaders, FloatNoticeGetResult.Response.class);
|
|
|
|
|
|
|
@@ -692,7 +677,7 @@ public class HttpService {
|
|
|
*
|
|
*
|
|
|
* @return
|
|
* @return
|
|
|
*/
|
|
*/
|
|
|
- public InitProposalResult initProposal(String tplatformId, String tplatLoginKey, String orderId) {
|
|
|
|
|
|
|
+ public InitProposalResult initProposal(String token, String tplatformId, String tplatLoginKey, String orderId) {
|
|
|
InitProposalParam param = new InitProposalParam();
|
|
InitProposalParam param = new InitProposalParam();
|
|
|
param.setChannelCode("OffWeb");
|
|
param.setChannelCode("OffWeb");
|
|
|
param.setOrderID(orderId);
|
|
param.setOrderID(orderId);
|
|
@@ -701,7 +686,7 @@ public class HttpService {
|
|
|
|
|
|
|
|
|
|
|
|
|
HttpHeaders httpHeaders = new HttpHeaders();
|
|
HttpHeaders httpHeaders = new HttpHeaders();
|
|
|
- httpHeaders.add("tkCarRequestToken", token());
|
|
|
|
|
|
|
+ httpHeaders.add("tkCarRequestToken", token);
|
|
|
|
|
|
|
|
StringResponse response = client.request(HttpURL.initProposal, param, httpHeaders, StringResponse.class);
|
|
StringResponse response = client.request(HttpURL.initProposal, param, httpHeaders, StringResponse.class);
|
|
|
|
|
|
|
@@ -728,7 +713,7 @@ public class HttpService {
|
|
|
*
|
|
*
|
|
|
* @return
|
|
* @return
|
|
|
*/
|
|
*/
|
|
|
- public List<EngageEngageQueryResult> engageEngageQuery(String tplatformId, String fromId, String orderId, EngageEngageQueryParam.Privy privy) {
|
|
|
|
|
|
|
+ public List<EngageEngageQueryResult> engageEngageQuery(String token, String tplatformId, String fromId, String orderId, EngageEngageQueryParam.Privy privy) {
|
|
|
EngageEngageQueryParam param = new EngageEngageQueryParam();
|
|
EngageEngageQueryParam param = new EngageEngageQueryParam();
|
|
|
param.setChannelCode("OffWeb");
|
|
param.setChannelCode("OffWeb");
|
|
|
param.setFromId(fromId);
|
|
param.setFromId(fromId);
|
|
@@ -736,7 +721,7 @@ public class HttpService {
|
|
|
param.setPrivy(privy);
|
|
param.setPrivy(privy);
|
|
|
|
|
|
|
|
HttpHeaders httpHeaders = new HttpHeaders();
|
|
HttpHeaders httpHeaders = new HttpHeaders();
|
|
|
- httpHeaders.add("tkCarRequestToken", token());
|
|
|
|
|
|
|
+ httpHeaders.add("tkCarRequestToken", token);
|
|
|
|
|
|
|
|
|
|
|
|
|
EngageEngageQueryResult.Response response = client.request(HttpURL.engageEngageQuery, param, httpHeaders, EngageEngageQueryResult.Response.class);
|
|
EngageEngageQueryResult.Response response = client.request(HttpURL.engageEngageQuery, param, httpHeaders, EngageEngageQueryResult.Response.class);
|
|
@@ -747,14 +732,14 @@ public class HttpService {
|
|
|
/**
|
|
/**
|
|
|
* @return
|
|
* @return
|
|
|
*/
|
|
*/
|
|
|
- public Map<String, String> initFindRiskConfig(String tplatformId) {
|
|
|
|
|
|
|
+ public Map<String, String> initFindRiskConfig(String token, String tplatformId) {
|
|
|
InitFindRiskConfigParam param = new InitFindRiskConfigParam();
|
|
InitFindRiskConfigParam param = new InitFindRiskConfigParam();
|
|
|
param.setConfigcode("SDMessageControl");
|
|
param.setConfigcode("SDMessageControl");
|
|
|
param.setRiskcode("08");
|
|
param.setRiskcode("08");
|
|
|
param.setCompanycode("01");
|
|
param.setCompanycode("01");
|
|
|
|
|
|
|
|
HttpHeaders httpHeaders = new HttpHeaders();
|
|
HttpHeaders httpHeaders = new HttpHeaders();
|
|
|
- httpHeaders.add("tkCarRequestToken", token());
|
|
|
|
|
|
|
+ httpHeaders.add("tkCarRequestToken", token);
|
|
|
|
|
|
|
|
|
|
|
|
|
InitFindRiskConfigResult.Response response = client.request(HttpURL.initFindRiskConfig, param, httpHeaders, InitFindRiskConfigResult.Response.class);
|
|
InitFindRiskConfigResult.Response response = client.request(HttpURL.initFindRiskConfig, param, httpHeaders, InitFindRiskConfigResult.Response.class);
|
|
@@ -765,13 +750,13 @@ public class HttpService {
|
|
|
/**
|
|
/**
|
|
|
* @return
|
|
* @return
|
|
|
*/
|
|
*/
|
|
|
- public GroupOrderGetNewNoticeStatusResult groupOrderGetNewNoticeStatus(String tplatformId) {
|
|
|
|
|
|
|
+ public GroupOrderGetNewNoticeStatusResult groupOrderGetNewNoticeStatus(String token, String tplatformId) {
|
|
|
GroupOrderGetNewNoticeStatusParam param = new GroupOrderGetNewNoticeStatusParam();
|
|
GroupOrderGetNewNoticeStatusParam param = new GroupOrderGetNewNoticeStatusParam();
|
|
|
param.setChannelCode("OffWeb");
|
|
param.setChannelCode("OffWeb");
|
|
|
param.setTplatformId(tplatformId);
|
|
param.setTplatformId(tplatformId);
|
|
|
|
|
|
|
|
HttpHeaders httpHeaders = new HttpHeaders();
|
|
HttpHeaders httpHeaders = new HttpHeaders();
|
|
|
- httpHeaders.add("tkCarRequestToken", token());
|
|
|
|
|
|
|
+ httpHeaders.add("tkCarRequestToken", token);
|
|
|
|
|
|
|
|
|
|
|
|
|
GroupOrderGetNewNoticeStatusResult.Response response = client.request(HttpURL.groupOrderGetNewNoticeStatus, param, httpHeaders, GroupOrderGetNewNoticeStatusResult.Response.class);
|
|
GroupOrderGetNewNoticeStatusResult.Response response = client.request(HttpURL.groupOrderGetNewNoticeStatus, param, httpHeaders, GroupOrderGetNewNoticeStatusResult.Response.class);
|
|
@@ -784,7 +769,7 @@ public class HttpService {
|
|
|
*
|
|
*
|
|
|
* @return
|
|
* @return
|
|
|
*/
|
|
*/
|
|
|
- public EntranceResult entranceForDecrypt(String tplatformId, String fromId, String orderId) {
|
|
|
|
|
|
|
+ private EntranceResult entranceForDecrypt(String token, String tplatformId, String fromId, String orderId) {
|
|
|
EntranceParam param = new EntranceParam();
|
|
EntranceParam param = new EntranceParam();
|
|
|
param.setChannelCode("OffWeb");
|
|
param.setChannelCode("OffWeb");
|
|
|
param.setFromID(fromId);
|
|
param.setFromID(fromId);
|
|
@@ -795,7 +780,7 @@ public class HttpService {
|
|
|
param.setCollectFlag("");
|
|
param.setCollectFlag("");
|
|
|
|
|
|
|
|
HttpHeaders httpHeaders = new HttpHeaders();
|
|
HttpHeaders httpHeaders = new HttpHeaders();
|
|
|
- httpHeaders.add("tkCarRequestToken", token());
|
|
|
|
|
|
|
+ httpHeaders.add("tkCarRequestToken", token);
|
|
|
|
|
|
|
|
StringResponse response = client.request(HttpURL.entrance, param, httpHeaders, StringResponse.class);
|
|
StringResponse response = client.request(HttpURL.entrance, param, httpHeaders, StringResponse.class);
|
|
|
|
|
|
|
@@ -820,10 +805,10 @@ public class HttpService {
|
|
|
*
|
|
*
|
|
|
* @return
|
|
* @return
|
|
|
*/
|
|
*/
|
|
|
- public String entranceForString(Object param, String actionType) {
|
|
|
|
|
|
|
+ private String entranceForString(String token, Object param, String actionType) {
|
|
|
HttpHeaders httpHeaders = new HttpHeaders();
|
|
HttpHeaders httpHeaders = new HttpHeaders();
|
|
|
|
|
+ httpHeaders.add("tkCarRequestToken", token);
|
|
|
httpHeaders.add("Actiontype", actionType);
|
|
httpHeaders.add("Actiontype", actionType);
|
|
|
- httpHeaders.add("tkCarRequestToken", token());
|
|
|
|
|
|
|
|
|
|
StringResponse response = client.request(HttpURL.entrance, param, httpHeaders, StringResponse.class);
|
|
StringResponse response = client.request(HttpURL.entrance, param, httpHeaders, StringResponse.class);
|
|
|
|
|
|
|
@@ -835,10 +820,10 @@ public class HttpService {
|
|
|
*
|
|
*
|
|
|
* @return
|
|
* @return
|
|
|
*/
|
|
*/
|
|
|
- public <B> B entranceForJson(Object param, String actionType, Class<B> responseType) {
|
|
|
|
|
|
|
+ private <B> B entranceForJson(String token, Object param, String actionType, Class<B> responseType) {
|
|
|
HttpHeaders httpHeaders = new HttpHeaders();
|
|
HttpHeaders httpHeaders = new HttpHeaders();
|
|
|
httpHeaders.add("Actiontype", actionType);
|
|
httpHeaders.add("Actiontype", actionType);
|
|
|
- httpHeaders.add("tkCarRequestToken", token());
|
|
|
|
|
|
|
+ httpHeaders.add("tkCarRequestToken", token);
|
|
|
|
|
|
|
|
B response = client.request(HttpURL.entrance, param, httpHeaders, responseType);
|
|
B response = client.request(HttpURL.entrance, param, httpHeaders, responseType);
|
|
|
|
|
|
|
@@ -850,7 +835,7 @@ public class HttpService {
|
|
|
*
|
|
*
|
|
|
* @return
|
|
* @return
|
|
|
*/
|
|
*/
|
|
|
- public EntranceResult entranceFor000012(String tplatformId, String fromId, String orderId, TKInsureInfo insureInfo) {
|
|
|
|
|
|
|
+ public EntranceResult entranceFor000012(String token, String tplatformId, String fromId, String orderId, TKInsureInfo insureInfo) {
|
|
|
TKEntranceFor000012Param param = new TKEntranceFor000012Param();
|
|
TKEntranceFor000012Param param = new TKEntranceFor000012Param();
|
|
|
param.setChannelCode("OffWeb");
|
|
param.setChannelCode("OffWeb");
|
|
|
param.setTplatformId(tplatformId);
|
|
param.setTplatformId(tplatformId);
|
|
@@ -868,7 +853,7 @@ public class HttpService {
|
|
|
*
|
|
*
|
|
|
* @return
|
|
* @return
|
|
|
*/
|
|
*/
|
|
|
- public TKEntranceFor000038Result entranceFor000038(String tplatformId, String fromId, String orderId) {
|
|
|
|
|
|
|
+ public TKEntranceFor000038Result entranceFor000038(String token, String tplatformId, String fromId, String orderId) {
|
|
|
TKEntranceFor000038Param param = new TKEntranceFor000038Param();
|
|
TKEntranceFor000038Param param = new TKEntranceFor000038Param();
|
|
|
param.setChannelCode("OffWeb");
|
|
param.setChannelCode("OffWeb");
|
|
|
param.setTplatformId(tplatformId);
|
|
param.setTplatformId(tplatformId);
|
|
@@ -900,12 +885,12 @@ public class HttpService {
|
|
|
*
|
|
*
|
|
|
* @return
|
|
* @return
|
|
|
*/
|
|
*/
|
|
|
- public String entranceFor000133(String orderId) {
|
|
|
|
|
|
|
+ public String entranceFor000133(String token, String orderId) {
|
|
|
EntranceParam param = new EntranceParam();
|
|
EntranceParam param = new EntranceParam();
|
|
|
param.setChannelCode("OffWeb");
|
|
param.setChannelCode("OffWeb");
|
|
|
param.setOrderID(orderId);
|
|
param.setOrderID(orderId);
|
|
|
|
|
|
|
|
- String response = entranceForString(param, "000133");
|
|
|
|
|
|
|
+ String response = entranceForString(token, param, "000133");
|
|
|
|
|
|
|
|
if (response != null) {
|
|
if (response != null) {
|
|
|
response = response.replace("验车码:", "");
|
|
response = response.replace("验车码:", "");
|
|
@@ -919,12 +904,12 @@ public class HttpService {
|
|
|
*
|
|
*
|
|
|
* @return
|
|
* @return
|
|
|
*/
|
|
*/
|
|
|
- public String carCheckAttorneyList(String tplatformId, String proposalNo) {
|
|
|
|
|
|
|
+ public String carCheckAttorneyList(String token, String tplatformId, String proposalNo) {
|
|
|
CarCheckAttorneyListParam param = new CarCheckAttorneyListParam();
|
|
CarCheckAttorneyListParam param = new CarCheckAttorneyListParam();
|
|
|
param.setProposalNo(proposalNo);
|
|
param.setProposalNo(proposalNo);
|
|
|
|
|
|
|
|
HttpHeaders httpHeaders = new HttpHeaders();
|
|
HttpHeaders httpHeaders = new HttpHeaders();
|
|
|
- httpHeaders.add("tkCarRequestToken", token());
|
|
|
|
|
|
|
+ httpHeaders.add("tkCarRequestToken", token);
|
|
|
|
|
|
|
|
// todo 这个接口,暂时了解到返回的数据的 data 字段是一个字符串格式,内容是 message 消息提示 “暂无模板,请联系客户经理”,怀疑有数据时会变成 json 数据,所以以后可能需要处理此问题。
|
|
// todo 这个接口,暂时了解到返回的数据的 data 字段是一个字符串格式,内容是 message 消息提示 “暂无模板,请联系客户经理”,怀疑有数据时会变成 json 数据,所以以后可能需要处理此问题。
|
|
|
StringResponse response = client.request(HttpURL.carCheckAttorneyList, param, httpHeaders, StringResponse.class);
|
|
StringResponse response = client.request(HttpURL.carCheckAttorneyList, param, httpHeaders, StringResponse.class);
|
|
@@ -937,14 +922,14 @@ public class HttpService {
|
|
|
*
|
|
*
|
|
|
* @return
|
|
* @return
|
|
|
*/
|
|
*/
|
|
|
- public String payForward(String tplatformId, String proposalNo) {
|
|
|
|
|
|
|
+ public String payForward(String token, String tplatformId, String proposalNo) {
|
|
|
TKPayForwardParam param = new TKPayForwardParam();
|
|
TKPayForwardParam param = new TKPayForwardParam();
|
|
|
param.setChannelCode("OffWeb");
|
|
param.setChannelCode("OffWeb");
|
|
|
param.setTplatformId(tplatformId);
|
|
param.setTplatformId(tplatformId);
|
|
|
param.setProposalNo(proposalNo);
|
|
param.setProposalNo(proposalNo);
|
|
|
|
|
|
|
|
HttpHeaders httpHeaders = new HttpHeaders();
|
|
HttpHeaders httpHeaders = new HttpHeaders();
|
|
|
- httpHeaders.add("tkCarRequestToken", token());
|
|
|
|
|
|
|
+ httpHeaders.add("tkCarRequestToken", token);
|
|
|
|
|
|
|
|
TKPayForwardResult.Response response = client.request(HttpURL.payForward, param, httpHeaders, TKPayForwardResult.Response.class);
|
|
TKPayForwardResult.Response response = client.request(HttpURL.payForward, param, httpHeaders, TKPayForwardResult.Response.class);
|
|
|
|
|
|