|
@@ -738,10 +738,71 @@ public class TaiKangHttpService {
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
|
*
|
|
*
|
|
|
|
|
+ * entrance 返回的数据是加密数据的情况
|
|
|
*
|
|
*
|
|
|
* @return
|
|
* @return
|
|
|
*/
|
|
*/
|
|
|
- public EntranceResult entrance(String tplatformId, String fromId, String orderId) {
|
|
|
|
|
|
|
+ public EntranceResult entranceForDecrypt(String tplatformId, String fromId, String orderId) {
|
|
|
|
|
+ EntranceParam param = new EntranceParam();
|
|
|
|
|
+ param.setChannelCode("OffWeb");
|
|
|
|
|
+ param.setFromID(fromId);
|
|
|
|
|
+ param.setOrderID(orderId);
|
|
|
|
|
+ param.setLeadsid("");
|
|
|
|
|
+ param.setReadTime("");
|
|
|
|
|
+ param.setIdcardOcrFlag("");
|
|
|
|
|
+ param.setCollectFlag("");
|
|
|
|
|
+
|
|
|
|
|
+ HttpHeaders httpHeaders = new HttpHeaders();
|
|
|
|
|
+ httpHeaders.add("tkCarRequestToken", token());
|
|
|
|
|
+
|
|
|
|
|
+ StringResponse response = client.request(HttpURL.entrance, param, httpHeaders, StringResponse.class);
|
|
|
|
|
+
|
|
|
|
|
+ checkResponseUnknownField(response);
|
|
|
|
|
+
|
|
|
|
|
+ // 解密
|
|
|
|
|
+ String json = AESDecryptor.decrypt(response.getData());
|
|
|
|
|
+
|
|
|
|
|
+ if (logger.isInfoEnabled()) {
|
|
|
|
|
+ logger.info("TaiKangHttpClient entranceForDecrypt decrypt body: {}", json);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ EntranceResult.Response response1 = JsonUtil.readObjcet(json, EntranceResult.Response.class);
|
|
|
|
|
+
|
|
|
|
|
+ checkResponseUnknownField(response1);
|
|
|
|
|
+
|
|
|
|
|
+ return response1.getData();
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ /**
|
|
|
|
|
+ *
|
|
|
|
|
+ * entrance 返回的数据是字符串的情况
|
|
|
|
|
+ *
|
|
|
|
|
+ * @return
|
|
|
|
|
+ */
|
|
|
|
|
+ public String entranceForString(String tplatformId, String fromId, String orderId) {
|
|
|
|
|
+ EntranceParam param = new EntranceParam();
|
|
|
|
|
+ param.setChannelCode("OffWeb");
|
|
|
|
|
+ param.setFromID(fromId);
|
|
|
|
|
+ param.setOrderID(orderId);
|
|
|
|
|
+ param.setLeadsid("");
|
|
|
|
|
+ param.setReadTime("");
|
|
|
|
|
+ param.setIdcardOcrFlag("");
|
|
|
|
|
+ param.setCollectFlag("");
|
|
|
|
|
+
|
|
|
|
|
+ HttpHeaders httpHeaders = new HttpHeaders();
|
|
|
|
|
+ httpHeaders.add("tkCarRequestToken", token());
|
|
|
|
|
+
|
|
|
|
|
+ StringResponse response = client.request(HttpURL.entrance, param, httpHeaders, StringResponse.class);
|
|
|
|
|
+
|
|
|
|
|
+ return response.getData();
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ /**
|
|
|
|
|
+ *
|
|
|
|
|
+ * entrance 返回的数据是 json 的情况
|
|
|
|
|
+ * @return
|
|
|
|
|
+ */
|
|
|
|
|
+ public EntranceResult entranceForJson(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);
|