|
|
@@ -3,14 +3,19 @@ package com.jzg.quotation.zhongmei.crawler.component;
|
|
|
import cn.hutool.core.util.XmlUtil;
|
|
|
import com.alibaba.fastjson.JSON;
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
|
+import com.jzg.commons.constants.quote.enums.base.InsuranceEnum;
|
|
|
+import com.jzg.commons.entity.po.SysUploadFiles;
|
|
|
import com.jzg.commons.entity.quote.vo.AttributionInformationVo;
|
|
|
import com.jzg.commons.exception.SystemException;
|
|
|
+import com.jzg.commons.util.MinioUtils;
|
|
|
+import com.jzg.quotation.commons.client.PlatformClient;
|
|
|
import com.jzg.quotation.commons.component.RequestComponent;
|
|
|
import com.jzg.quotation.commons.constant.CacheConstant;
|
|
|
import com.jzg.commons.entity.quote.vo.image.InsuranceImageVo;
|
|
|
import com.jzg.quotation.commons.service.ExteriorUtilsRequest;
|
|
|
import com.jzg.quotation.commons.standard.CrawlerRequestUrlStandard;
|
|
|
import com.jzg.quotation.commons.utils.DateUtil;
|
|
|
+import com.jzg.quotation.commons.utils.InsuranceLog;
|
|
|
import com.jzg.quotation.commons.utils.RequestObjectConversion;
|
|
|
import com.jzg.quotation.zhongmei.api.constant.enums.ImageTypeEnum;
|
|
|
import com.jzg.quotation.zhongmei.api.entity.BaseRequestHead;
|
|
|
@@ -26,11 +31,13 @@ import com.jzg.quotation.zhongmei.crawler.properties.ZmCrawlerProperties;
|
|
|
import com.jzg.quotation.zhongmei.crawler.util.Base64Tool;
|
|
|
import lombok.RequiredArgsConstructor;
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
+import org.apache.commons.io.IOUtils;
|
|
|
import org.redisson.api.RBucket;
|
|
|
import org.redisson.api.RMap;
|
|
|
import org.redisson.api.RedissonClient;
|
|
|
import org.springframework.http.*;
|
|
|
import org.springframework.http.MediaType;
|
|
|
+import org.springframework.http.client.MultipartBodyBuilder;
|
|
|
import org.springframework.stereotype.Component;
|
|
|
import org.springframework.util.LinkedMultiValueMap;
|
|
|
import org.springframework.util.MultiValueMap;
|
|
|
@@ -86,6 +93,10 @@ public class ZmCrawlerRequestComponent {
|
|
|
|
|
|
public static final Duration ZM_SAVE_TIME = Duration.ofHours(3L);
|
|
|
|
|
|
+ private final PlatformClient platformClient;
|
|
|
+
|
|
|
+ private final MinioUtils minioUtils;
|
|
|
+
|
|
|
|
|
|
/**
|
|
|
* 验证码
|
|
|
@@ -99,8 +110,10 @@ public class ZmCrawlerRequestComponent {
|
|
|
ZmCrawlerCaptchaRequest captchaRequest = new ZmCrawlerCaptchaRequest(username);
|
|
|
BaseRequestHead head = new BaseRequestHead(null,"2");
|
|
|
captchaRequest.setHead(head);
|
|
|
- // 请求
|
|
|
- Mono<ZmCrawlerCaptchaResponse> monoResponse = requestComponent.postGbk(RequestUrl.CAPTCHA.getRequestUrl(zmCrawlerProperties.getBaseUrl()), Base64Tool.encode(JSONObject.toJSONString(captchaRequest)), ZmCrawlerCaptchaResponse.class, new HttpHeaders());
|
|
|
+ InsuranceLog.infoLog(InsuranceEnum.ZMBX.getPinyin(), "\n\t---------> {} \n\t---------> URl: {} \n\t---------> 请求参数:{}",
|
|
|
+ "爬虫验证码",RequestUrl.CAPTCHA.getRequestUrl(zmCrawlerProperties.getBaseUrl()),JSON.toJSONString(captchaRequest));
|
|
|
+ // 请求验证码
|
|
|
+ Mono<ZmCrawlerCaptchaResponse> monoResponse = requestComponent.postGbk(RequestUrl.CAPTCHA.getRequestUrl(zmCrawlerProperties.getBaseUrl()), Base64Tool.encode(JSONObject.toJSONString(captchaRequest)), ZmCrawlerCaptchaResponse.class, new HttpHeaders(),"验证码");
|
|
|
ZmCrawlerCaptchaResponse response = monoResponse.block();
|
|
|
// 识别验证码
|
|
|
String s = exteriorUtilsRequest.captchaIdentify(response.getVerifyCode());
|
|
|
@@ -135,8 +148,9 @@ public class ZmCrawlerRequestComponent {
|
|
|
ZmCrawlerAuthenticateRequest authenticateRequest = new ZmCrawlerAuthenticateRequest(captchaResponse, username, password);
|
|
|
BaseRequestHead head = new BaseRequestHead(null,"2");
|
|
|
authenticateRequest.setHead(head);
|
|
|
-
|
|
|
- Mono<ZmCrawlerAuthenticateResponse> responseMono = requestComponent.postGbk(RequestUrl.AUTHENTICATE.getRequestUrl(zmCrawlerProperties.getBaseUrl()), Base64Tool.encode(JSONObject.toJSONString(authenticateRequest)), ZmCrawlerAuthenticateResponse.class, new HttpHeaders());
|
|
|
+ InsuranceLog.infoLog(InsuranceEnum.ZMBX.getPinyin(), "\n\t---------> {} \n\t---------> URl: {} \n\t---------> 请求参数:{}",
|
|
|
+ "爬虫登录",RequestUrl.AUTHENTICATE.getRequestUrl(zmCrawlerProperties.getBaseUrl()),JSON.toJSONString(authenticateRequest));
|
|
|
+ Mono<ZmCrawlerAuthenticateResponse> responseMono = requestComponent.postGbk(RequestUrl.AUTHENTICATE.getRequestUrl(zmCrawlerProperties.getBaseUrl()), Base64Tool.encode(JSONObject.toJSONString(authenticateRequest)), ZmCrawlerAuthenticateResponse.class, new HttpHeaders(),"登录");
|
|
|
ZmCrawlerAuthenticateResponse authenticateResponse = Optional.of(responseMono.block()).orElseThrow();
|
|
|
if ("0".equals(authenticateResponse.getHead().getReturnCode()) && authenticateResponse.getReCode().equals("0")) {
|
|
|
Map<String, String> authorizationMap = buildCache(authenticateResponse);
|
|
|
@@ -230,10 +244,11 @@ public class ZmCrawlerRequestComponent {
|
|
|
* @return
|
|
|
*/
|
|
|
public List<ZmCrawlerModelQueryResponse.FullCarDataDTO> modelQuery(ZmCrawlerModelQueryRequest modelQueryRequest) {
|
|
|
+ InsuranceLog.infoLog(InsuranceEnum.ZMBX.getPinyin(), "\n\t---------> {} \n\t---------> URl: {} \n\t---------> 请求参数:{}",
|
|
|
+ "爬虫车型查询",RequestUrl.MODELS_QUERY.getRequestUrl(zmCrawlerProperties.getBaseUrl()),JSON.toJSONString(modelQueryRequest));
|
|
|
Mono<ZmCrawlerModelQueryResponse> responseMono = requestComponent.postGbk(RequestUrl.MODELS_QUERY.getRequestUrl(zmCrawlerProperties.getBaseUrl()),
|
|
|
- Base64Tool.encode(JSONObject.toJSONString(modelQueryRequest)), ZmCrawlerModelQueryResponse.class,new HttpHeaders());
|
|
|
+ Base64Tool.encode(JSONObject.toJSONString(modelQueryRequest)), ZmCrawlerModelQueryResponse.class,new HttpHeaders(),"车型查询");
|
|
|
ZmCrawlerModelQueryResponse zmCrawlerModelQueryResponseResponse = responseMono.block();
|
|
|
- System.out.println(JSON.toJSONString(zmCrawlerModelQueryResponseResponse.getCarModel()));
|
|
|
return zmCrawlerModelQueryResponseResponse.getCarModel();
|
|
|
}
|
|
|
|
|
|
@@ -244,7 +259,7 @@ public class ZmCrawlerRequestComponent {
|
|
|
*/
|
|
|
public Mono<ZmCrawlerNetpointQueryResponse> netpointQuery(ZmCrawlerNetpointQueryRequest modelQueryRequest) {
|
|
|
return requestComponent.postGbk(RequestUrl.NETPOINT_QUERY.getRequestUrl(zmCrawlerProperties.getBaseUrl()),
|
|
|
- Base64Tool.encode(JSONObject.toJSONString(modelQueryRequest)), ZmCrawlerNetpointQueryResponse.class,new HttpHeaders());
|
|
|
+ Base64Tool.encode(JSONObject.toJSONString(modelQueryRequest)), ZmCrawlerNetpointQueryResponse.class,new HttpHeaders(),"网点查询");
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
@@ -267,17 +282,19 @@ public class ZmCrawlerRequestComponent {
|
|
|
* @return
|
|
|
*/
|
|
|
public ZmCrawlerActualValueResponse getActualValue(ZmCrawlerActualValueRequest actualValueRequest) {
|
|
|
- System.out.println(JSON.toJSONString(actualValueRequest));
|
|
|
+ InsuranceLog.infoLog(InsuranceEnum.ZMBX.getPinyin(), "\n\t---------> {} \n\t---------> URl: {} \n\t---------> 请求参数:{}",
|
|
|
+ "爬虫获取折旧价",RequestUrl.ACTUAL_VALUE.getRequestUrl(zmCrawlerProperties.getBaseUrl()),JSON.toJSONString(actualValueRequest));
|
|
|
Mono<ZmCrawlerActualValueResponse> responseMono = requestComponent.postGbk(RequestUrl.ACTUAL_VALUE.getRequestUrl(zmCrawlerProperties.getBaseUrl()),
|
|
|
- Base64Tool.encode(JSONObject.toJSONString(actualValueRequest)), ZmCrawlerActualValueResponse.class,new HttpHeaders());
|
|
|
+ Base64Tool.encode(JSONObject.toJSONString(actualValueRequest)), ZmCrawlerActualValueResponse.class,new HttpHeaders(),"获取折旧价");
|
|
|
ZmCrawlerActualValueResponse response = responseMono.block();
|
|
|
return response;
|
|
|
}
|
|
|
|
|
|
public ZmCrawlerRideAccidentResponse rideAccident(ZmCrawlerRideAccidentRequest rideAccidentRequest) {
|
|
|
- System.out.println(JSON.toJSON(rideAccidentRequest));
|
|
|
+ InsuranceLog.infoLog(InsuranceEnum.ZMBX.getPinyin(), "\n\t---------> {} \n\t---------> URl: {} \n\t---------> 请求参数:{}",
|
|
|
+ "爬虫获取非车险列表",RequestUrl.BASECODESCHME.getRequestUrl(zmCrawlerProperties.getBaseUrl()),JSON.toJSONString(rideAccidentRequest));
|
|
|
Mono<ZmCrawlerRideAccidentResponse> responseMono = requestComponent.postGbk(RequestUrl.BASECODESCHME.getRequestUrl(zmCrawlerProperties.getBaseUrl()),
|
|
|
- Base64Tool.encode(JSONObject.toJSONString(rideAccidentRequest)), ZmCrawlerRideAccidentResponse.class,new HttpHeaders());
|
|
|
+ Base64Tool.encode(JSONObject.toJSONString(rideAccidentRequest)), ZmCrawlerRideAccidentResponse.class,new HttpHeaders(),"获取非车险");
|
|
|
ZmCrawlerRideAccidentResponse response = responseMono.block();
|
|
|
return response;
|
|
|
}
|
|
|
@@ -288,9 +305,10 @@ public class ZmCrawlerRequestComponent {
|
|
|
* @return
|
|
|
*/
|
|
|
public ZmCrawlerQuotedPriceResponse quotedPrice(ZmCrawlerQuotedPriceRequest quotedPriceRequest) {
|
|
|
- System.out.println(JSON.toJSON(quotedPriceRequest));
|
|
|
+ InsuranceLog.infoLog(InsuranceEnum.ZMBX.getPinyin(), "\n\t---------> {} \n\t---------> URl: {} \n\t---------> 请求参数:{}",
|
|
|
+ "爬虫保费计算",RequestUrl.QUOTED_PRICE.getRequestUrl(zmCrawlerProperties.getBaseUrl()),JSON.toJSONString(quotedPriceRequest));
|
|
|
Mono<ZmCrawlerQuotedPriceResponse> responseMono = requestComponent.postGbk(RequestUrl.QUOTED_PRICE.getRequestUrl(zmCrawlerProperties.getBaseUrl()),
|
|
|
- Base64Tool.encode(JSON.toJSONString(quotedPriceRequest)), ZmCrawlerQuotedPriceResponse.class,new HttpHeaders());
|
|
|
+ Base64Tool.encode(JSON.toJSONString(quotedPriceRequest)), ZmCrawlerQuotedPriceResponse.class,new HttpHeaders(),"保费计算");
|
|
|
ZmCrawlerQuotedPriceResponse response = responseMono.onErrorResume(ex -> {
|
|
|
log.error("Request failed", ex);
|
|
|
return Mono.empty();
|
|
|
@@ -328,11 +346,21 @@ public class ZmCrawlerRequestComponent {
|
|
|
|
|
|
MultiValueMap<String, Object> formData = RequestObjectConversion.convertMultiValueMap(importRequest);
|
|
|
JSONObject imageMap = new JSONObject();
|
|
|
+ SysUploadFiles sysUploadFiles = platformClient.getUploadFile(imageDTOS.get(0).getImageId());
|
|
|
+ String fileName = sysUploadFiles.getFileName();
|
|
|
+ InputStream inputStream = minioUtils.getObject("jzg", fileName);
|
|
|
+ byte[] fileBytes = null;
|
|
|
+ try {
|
|
|
+ fileBytes = IOUtils.toByteArray(inputStream);
|
|
|
+ } catch (IOException e) {
|
|
|
+ throw new RuntimeException(e);
|
|
|
+ }
|
|
|
+ imageDTOS.get(0).setImageBase64Str(Base64.getEncoder().encodeToString(fileBytes));
|
|
|
String base64Str = "data:image/jpeg;base64," + imageDTOS.get(0).getImageBase64Str();
|
|
|
imageMap.put("base64", base64Str);
|
|
|
imageMap.put("size", base64Str.length());
|
|
|
- imageMap.put("orginalName", imageDTOS.get(0).getImageName());
|
|
|
- imageMap.put("exif", "");
|
|
|
+ imageMap.put("orginalName", fileName);
|
|
|
+ imageMap.put("exif", "%7B'Create%20SoftWare%7C%E5%88%9B%E5%BB%BA%E8%BD%AF%E4%BB%B6':'undefined','Camera%20model%7C%E7%9B%B8%E6%9C%BA%E5%9E%8B%E5%8F%B7':'undefined','CaptureTime%7C%E6%8B%8D%E6%91%84%E6%97%B6%E9%97%B4':'undefined','Width%20x%20Height%7C%E9%95%BF%20x%20%E5%AE%BD':'undefined%20x%20undefined','Latitude%7C%E7%BA%AC%E5%BA%A6':'undefined%20undefined','Longitude%7C%E7%BB%8F%E5%BA%A6':'undefined%20undefined','Altitude%7C%E9%AB%98%E5%BA%A6':'undefined','DocClass%7C':''%7D");
|
|
|
formData.add("image0", imageMap.toJSONString());
|
|
|
|
|
|
// 构建 WebClient 实例
|
|
|
@@ -341,6 +369,9 @@ public class ZmCrawlerRequestComponent {
|
|
|
.defaultHeader(HttpHeaders.COOKIE, cookies.get(1) + ";" + cookies.get(0))
|
|
|
.defaultHeader(HttpHeaders.USER_AGENT, "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/118.0.0.0 Safari/537.36")
|
|
|
.defaultHeader(HttpHeaders.REFERER, "https://image.chinacoal-ins.com/SunICMS/ecm-nview/image/webScan/webScanMain.jsp")
|
|
|
+ .defaultHeader(HttpHeaders.CONTENT_TYPE, "multipart/form-data")
|
|
|
+ .defaultHeader(HttpHeaders.ACCEPT, "*/*")
|
|
|
+ .defaultHeader(HttpHeaders.CONNECTION, "keep-alive")
|
|
|
.build();
|
|
|
// 发送 POST 请求
|
|
|
String response = webClient.post()
|
|
|
@@ -824,8 +855,10 @@ public class ZmCrawlerRequestComponent {
|
|
|
* @return
|
|
|
*/
|
|
|
public ZmCrawlerOrderStatusResponse orderStatusQuery(ZmCrawlerOrderStatusRequest orderStatusRequest) {
|
|
|
+ InsuranceLog.infoLog(InsuranceEnum.ZMBX.getPinyin(), "\n\t---------> {} \n\t---------> URl: {} \n\t---------> 请求参数:{}",
|
|
|
+ "爬虫查询投保单状态",RequestUrl.ORDER_STATUS_QUERY.getRequestUrl(zmCrawlerProperties.getBaseUrl()),JSON.toJSONString(orderStatusRequest));
|
|
|
Mono<ZmCrawlerOrderStatusResponse> responseMono = requestComponent.postGbk(RequestUrl.ORDER_STATUS_QUERY.getRequestUrl(zmCrawlerProperties.getBaseUrl()),
|
|
|
- Base64Tool.encode(JSONObject.toJSONString(orderStatusRequest)), ZmCrawlerOrderStatusResponse.class,new HttpHeaders());
|
|
|
+ Base64Tool.encode(JSONObject.toJSONString(orderStatusRequest)), ZmCrawlerOrderStatusResponse.class,new HttpHeaders(),"查询投保单状态");
|
|
|
ZmCrawlerOrderStatusResponse response = responseMono.block();
|
|
|
return response;
|
|
|
}
|
|
|
@@ -836,8 +869,10 @@ public class ZmCrawlerRequestComponent {
|
|
|
* @return
|
|
|
*/
|
|
|
public ZmCrawlerSubmitResponse submit(ZmCrawlerSubmitRequest submitRequest) {
|
|
|
+ InsuranceLog.infoLog(InsuranceEnum.ZMBX.getPinyin(), "\n\t---------> {} \n\t---------> URl: {} \n\t---------> 请求参数:{}",
|
|
|
+ "爬虫提交核保",RequestUrl.SUBMIT.getRequestUrl(zmCrawlerProperties.getBaseUrl()),JSON.toJSONString(submitRequest));
|
|
|
Mono<ZmCrawlerSubmitResponse> responseMono = requestComponent.postGbk(RequestUrl.SUBMIT.getRequestUrl(zmCrawlerProperties.getBaseUrl()),
|
|
|
- Base64Tool.encode(JSONObject.toJSONString(submitRequest)), ZmCrawlerSubmitResponse.class,new HttpHeaders());
|
|
|
+ Base64Tool.encode(JSONObject.toJSONString(submitRequest)), ZmCrawlerSubmitResponse.class,new HttpHeaders(),"提交核保");
|
|
|
ZmCrawlerSubmitResponse response = responseMono.block();
|
|
|
return response;
|
|
|
}
|
|
|
@@ -848,8 +883,10 @@ public class ZmCrawlerRequestComponent {
|
|
|
* @return
|
|
|
*/
|
|
|
public ZmCrawlerCheckPaymentResponse checkPayment(ZmCrawlerCheckPaymentRequest checkPaymentRequest) {
|
|
|
+ InsuranceLog.infoLog(InsuranceEnum.ZMBX.getPinyin(), "\n\t---------> {} \n\t---------> URl: {} \n\t---------> 请求参数:{}",
|
|
|
+ "爬虫检查支付",RequestUrl.CHECK_PAYMENT.getRequestUrl(zmCrawlerProperties.getBaseUrl()),JSON.toJSONString(checkPaymentRequest));
|
|
|
Mono<ZmCrawlerCheckPaymentResponse> responseMono = requestComponent.postGbk(RequestUrl.CHECK_PAYMENT.getRequestUrl(zmCrawlerProperties.getBaseUrl()),
|
|
|
- Base64Tool.encode(JSONObject.toJSONString(checkPaymentRequest)), ZmCrawlerCheckPaymentResponse.class,new HttpHeaders());
|
|
|
+ Base64Tool.encode(JSONObject.toJSONString(checkPaymentRequest)), ZmCrawlerCheckPaymentResponse.class,new HttpHeaders(),"检查支付");
|
|
|
ZmCrawlerCheckPaymentResponse response = responseMono.block();
|
|
|
return response;
|
|
|
}
|
|
|
@@ -860,8 +897,10 @@ public class ZmCrawlerRequestComponent {
|
|
|
* @return
|
|
|
*/
|
|
|
public ZmCrawlerFindZfTaskResponse findZfTask(ZmCrawlerFindZfTaskRequest findZfTaskRequest) {
|
|
|
+ InsuranceLog.infoLog(InsuranceEnum.ZMBX.getPinyin(), "\n\t---------> {} \n\t---------> URl: {} \n\t---------> 请求参数:{}",
|
|
|
+ "爬虫查询是否存在支付数据",RequestUrl.FIND_ZF_TASK.getRequestUrl(zmCrawlerProperties.getBaseUrl()),JSON.toJSONString(findZfTaskRequest));
|
|
|
Mono<ZmCrawlerFindZfTaskResponse> responseMono = requestComponent.postGbk(RequestUrl.FIND_ZF_TASK.getRequestUrl(zmCrawlerProperties.getBaseUrl()),
|
|
|
- Base64Tool.encode(JSONObject.toJSONString(findZfTaskRequest)), ZmCrawlerFindZfTaskResponse.class,new HttpHeaders());
|
|
|
+ Base64Tool.encode(JSONObject.toJSONString(findZfTaskRequest)), ZmCrawlerFindZfTaskResponse.class,new HttpHeaders(),"查询是否存在支付数据");
|
|
|
ZmCrawlerFindZfTaskResponse response = responseMono.block();
|
|
|
return response;
|
|
|
}
|
|
|
@@ -872,8 +911,10 @@ public class ZmCrawlerRequestComponent {
|
|
|
* @return
|
|
|
*/
|
|
|
public ZmCrawlerOrderApplyResponse orderApply(ZmCrawlerOrderApplyRequest orderApplyRequest) {
|
|
|
+ InsuranceLog.infoLog(InsuranceEnum.ZMBX.getPinyin(), "\n\t---------> {} \n\t---------> URl: {} \n\t---------> 请求参数:{}",
|
|
|
+ "爬虫获取支付参数",RequestUrl.ORDER_APPLY.getRequestUrl(zmCrawlerProperties.getBaseUrl()),JSON.toJSONString(orderApplyRequest));
|
|
|
Mono<ZmCrawlerOrderApplyResponse> responseMono = requestComponent.postGbk(RequestUrl.ORDER_APPLY.getRequestUrl(zmCrawlerProperties.getBaseUrl()),
|
|
|
- Base64Tool.encode(JSONObject.toJSONString(orderApplyRequest)), ZmCrawlerOrderApplyResponse.class,new HttpHeaders());
|
|
|
+ Base64Tool.encode(JSONObject.toJSONString(orderApplyRequest)), ZmCrawlerOrderApplyResponse.class,new HttpHeaders(),"获取支付参数");
|
|
|
ZmCrawlerOrderApplyResponse response = responseMono.block();
|
|
|
return response;
|
|
|
}
|
|
|
@@ -884,8 +925,10 @@ public class ZmCrawlerRequestComponent {
|
|
|
* @return
|
|
|
*/
|
|
|
public ZmCrawlerOrderUpdateResponse orderUpdate(ZmCrawlerOrderUpdateRequest orderApplyRequest) {
|
|
|
+ InsuranceLog.infoLog(InsuranceEnum.ZMBX.getPinyin(), "\n\t---------> {} \n\t---------> URl: {} \n\t---------> 请求参数:{}",
|
|
|
+ "爬虫获取支付参数,更新相关数据",RequestUrl.ORDER_UPDATE.getRequestUrl(zmCrawlerProperties.getBaseUrl()),JSON.toJSONString(orderApplyRequest));
|
|
|
Mono<ZmCrawlerOrderUpdateResponse> responseMono = requestComponent.postGbk(RequestUrl.ORDER_UPDATE.getRequestUrl(zmCrawlerProperties.getBaseUrl()),
|
|
|
- Base64Tool.encode(JSONObject.toJSONString(orderApplyRequest)), ZmCrawlerOrderUpdateResponse.class,new HttpHeaders());
|
|
|
+ Base64Tool.encode(JSONObject.toJSONString(orderApplyRequest)), ZmCrawlerOrderUpdateResponse.class,new HttpHeaders(),"获取支付参数,更新相关数据");
|
|
|
ZmCrawlerOrderUpdateResponse response = responseMono.block();
|
|
|
return response;
|
|
|
}
|
|
|
@@ -896,8 +939,10 @@ public class ZmCrawlerRequestComponent {
|
|
|
* @return
|
|
|
*/
|
|
|
public ZmCrawlerGetQrCodeResponse getQrCode(ZmCrawlerGetQrCodeRequest qrCodeRequest) {
|
|
|
+ InsuranceLog.infoLog(InsuranceEnum.ZMBX.getPinyin(), "\n\t---------> {} \n\t---------> URl: {} \n\t---------> 请求参数:{}",
|
|
|
+ "爬虫获取支付二维码",RequestUrl.ACHIEVE_QR_CODE.getRequestUrl(zmCrawlerProperties.getBaseUrl()),JSON.toJSONString(qrCodeRequest));
|
|
|
Mono<ZmCrawlerGetQrCodeResponse> responseMono = requestComponent.postGbk(RequestUrl.ACHIEVE_QR_CODE.getRequestUrl(zmCrawlerProperties.getBaseUrl()),
|
|
|
- Base64Tool.encode(JSONObject.toJSONString(qrCodeRequest)), ZmCrawlerGetQrCodeResponse.class,new HttpHeaders());
|
|
|
+ Base64Tool.encode(JSONObject.toJSONString(qrCodeRequest)), ZmCrawlerGetQrCodeResponse.class,new HttpHeaders(),"获取支付二维码");
|
|
|
ZmCrawlerGetQrCodeResponse response = responseMono.block();
|
|
|
return response;
|
|
|
}
|
|
|
@@ -908,8 +953,10 @@ public class ZmCrawlerRequestComponent {
|
|
|
* @return
|
|
|
*/
|
|
|
public ZmCrawlerPolicyPrintResponse policyPrint(ZmCrawlerPolicyPrintRequest printRequest) {
|
|
|
+ InsuranceLog.infoLog(InsuranceEnum.ZMBX.getPinyin(), "\n\t---------> {} \n\t---------> URl: {} \n\t---------> 请求参数:{}",
|
|
|
+ "爬虫保单下载",RequestUrl.POLICY_PRINT.getRequestUrl(zmCrawlerProperties.getBaseUrl()),JSON.toJSONString(printRequest));
|
|
|
Mono<ZmCrawlerPolicyPrintResponse> responseMono = requestComponent.postGbk(RequestUrl.POLICY_PRINT.getRequestUrl(zmCrawlerProperties.getBaseUrl()),
|
|
|
- Base64Tool.encode(JSONObject.toJSONString(printRequest)), ZmCrawlerPolicyPrintResponse.class,new HttpHeaders());
|
|
|
+ Base64Tool.encode(JSONObject.toJSONString(printRequest)), ZmCrawlerPolicyPrintResponse.class,new HttpHeaders(),"保单下载");
|
|
|
ZmCrawlerPolicyPrintResponse response = responseMono.block();
|
|
|
return response;
|
|
|
}
|