|
|
@@ -168,6 +168,35 @@ public class ZhongAnAPIService {
|
|
|
return response.getValue();
|
|
|
}
|
|
|
|
|
|
+ /**
|
|
|
+ * 发起创建保险单
|
|
|
+ *
|
|
|
+ * @param token
|
|
|
+ * @param flowId
|
|
|
+ * @param zhongAnCacheInputQueryParam
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ public ZhongAnCacheInputQueryResult cacheInputQuery(String token, String flowId, ZhongAnCacheInputQueryParam zhongAnCacheInputQueryParam) {
|
|
|
+ HttpHeaders headers = new HttpHeaders();
|
|
|
+ headers.add("Cookie", token);
|
|
|
+
|
|
|
+ MultiValueMap<String, String> param = new LinkedMultiValueMap<>();
|
|
|
+ param.add("insurePlaceCode", zhongAnCacheInputQueryParam.getInsurePlaceCode());
|
|
|
+ param.add("insurePlace", zhongAnCacheInputQueryParam.getInsurePlace());
|
|
|
+ param.add("thirdOrgCode", zhongAnCacheInputQueryParam.getThirdOrgCode());
|
|
|
+ param.add("licenseNo", zhongAnCacheInputQueryParam.getLicenseNo());
|
|
|
+ param.add("branchCode", zhongAnCacheInputQueryParam.getBranchCode());
|
|
|
+ param.add("isOpenRenewalFlag", zhongAnCacheInputQueryParam.getIsOpenRenewalFlag());
|
|
|
+ param.add("flowId", flowId);
|
|
|
+ param.add("page", "%2FinsureEntry");
|
|
|
+ param.add("i", "e");
|
|
|
+ param.add("flag", "0");
|
|
|
+
|
|
|
+ ZhongAnCacheInputQueryResult.Response response = form(ZhongAnAPI.CacheInputQuery, param, ZhongAnCacheInputQueryResult.Response.class, headers);
|
|
|
+
|
|
|
+ return response.getValue();
|
|
|
+ }
|
|
|
+
|
|
|
/**
|
|
|
* 将保单数据缓存起来
|
|
|
*
|
|
|
@@ -175,7 +204,7 @@ public class ZhongAnAPIService {
|
|
|
* 目前观察到的一次登录会话中, cacheCarInfo 保存的数据是全局共享的,不具备数据隔离性:
|
|
|
* 1、会被后续的报价接口 {@link #premiumTrial}、 {@link #queryCarInfo} 使用到。
|
|
|
* 2、如果同时对多个车信息保存并报价,最后一次保存的车数据会将之前的其它车的数据覆盖,最终导致 premiumTrial 只会对最后一个车进行报价。
|
|
|
- * 3、也可能与 flowId 有关系
|
|
|
+ * 3、也可能与 flowId 有关系,可以测试一下 flowId 不一样的情况
|
|
|
*
|
|
|
* @param token
|
|
|
* @param zhongAnCacheCarInfoParam
|