|
|
@@ -1,10 +1,8 @@
|
|
|
package com.ydtech.modules.order.service.impl;
|
|
|
|
|
|
import cn.hutool.core.collection.CollUtil;
|
|
|
-import cn.hutool.json.JSONUtil;
|
|
|
import com.alibaba.fastjson.JSON;
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
|
-import com.fasterxml.jackson.annotation.JsonProperty;
|
|
|
import com.ydtech.config.properties.GuorenApiConfigurationProperties;
|
|
|
import com.ydtech.constants.enums.InsurKind;
|
|
|
import com.ydtech.constants.enums.InsurKindGuoRen;
|
|
|
@@ -41,9 +39,11 @@ import com.ydtech.modules.order.service.GuorenOrderApiService;
|
|
|
import com.ydtech.modules.order.service.InsAreaCompanyService;
|
|
|
import com.ydtech.modules.order.service.InsOrdersService;
|
|
|
import com.ydtech.modules.protocol.utils.AssertionUtils;
|
|
|
-import com.ydtech.utils.*;
|
|
|
+import com.ydtech.utils.DateTimeUtil;
|
|
|
+import com.ydtech.utils.HttpUtil;
|
|
|
+import com.ydtech.utils.InsUtils;
|
|
|
+import com.ydtech.utils.StringUtils;
|
|
|
import com.ydtech.utils.baidu.FileUtil;
|
|
|
-import lombok.Data;
|
|
|
import org.apache.commons.httpclient.methods.multipart.FilePart;
|
|
|
import org.apache.commons.httpclient.methods.multipart.Part;
|
|
|
import org.apache.commons.httpclient.methods.multipart.StringPart;
|
|
|
@@ -95,12 +95,11 @@ public class GuorenOrderApiServiceImpl implements GuorenOrderApiService {
|
|
|
private final GuorenRequestApiComponent guorenRequestApiComponent;
|
|
|
|
|
|
|
|
|
-
|
|
|
public GuorenOrderApiServiceImpl(GuorenApiConfigurationProperties properties, InsOrdersComponents insOrdersComponents,
|
|
|
GuorenRequestApiComponent guorenRequestApiComponent, InsAreaCompanyService insAreaCompanyService,
|
|
|
InsOrdersService insOrdersService, EsmInsCompanyService esmInsCompanyService,
|
|
|
ConfigureParametersComponents configureParametersComponents, InsTaskImagesMapper insTaskImagesMapper
|
|
|
- ) {
|
|
|
+ ) {
|
|
|
this.properties = properties;
|
|
|
this.insOrdersComponents = insOrdersComponents;
|
|
|
this.guorenRequestApiComponent = guorenRequestApiComponent;
|
|
|
@@ -271,7 +270,16 @@ public class GuorenOrderApiServiceImpl implements GuorenOrderApiService {
|
|
|
if (iac.getOrderstatus().equals(InsOrderStatusEnum.WAIT_PAY.getCode())) {
|
|
|
//获取签名地址
|
|
|
SignatureResponse signature = guorenRequestApiComponent.signature(iac);
|
|
|
- iac.setPaymentLink(signature.getQrCode());
|
|
|
+ String image;
|
|
|
+ // 将base64 截取出来
|
|
|
+ if (signature.getQrCode().contains("image")) {
|
|
|
+ String[] split = signature.getQrCode().split(",");
|
|
|
+ image = split[1];
|
|
|
+ } else {
|
|
|
+ image = signature.getQrCode();
|
|
|
+ }
|
|
|
+
|
|
|
+ iac.setPaymentLink(image);
|
|
|
} else {
|
|
|
return HttpResult.error("核保操作失败,状态:" + InsOrderStatusEnum.matchKey(iac.getOrderstatus()).getDesc());
|
|
|
}
|
|
|
@@ -967,8 +975,4 @@ public class GuorenOrderApiServiceImpl implements GuorenOrderApiService {
|
|
|
}
|
|
|
|
|
|
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
}
|