|
|
@@ -10,28 +10,40 @@ import cn.hutool.json.JSONUtil;
|
|
|
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
|
|
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
|
|
import com.baomidou.mybatisplus.core.toolkit.IdWorker;
|
|
|
+import com.yc.ship.framework.common.exception.ServiceException;
|
|
|
import com.yc.ship.framework.common.pojo.CommonResult;
|
|
|
import com.yc.ship.framework.common.pojo.PageResult;
|
|
|
import com.yc.ship.framework.mybatis.core.query.LambdaQueryWrapperX;
|
|
|
import com.yc.ship.framework.mybatis.core.util.MyBatisUtils;
|
|
|
import com.yc.ship.module.infra.api.config.ConfigApi;
|
|
|
+import com.yc.ship.module.product.dal.dataobject.voyage.VoyageDO;
|
|
|
+import com.yc.ship.module.product.service.voyage.VoyageService;
|
|
|
import com.yc.ship.module.trade.api.insurance.dto.InsuranceApplyReqDTO;
|
|
|
+import com.yc.ship.module.trade.api.insurance.dto.InsuranceOrderInfoDTO;
|
|
|
import com.yc.ship.module.trade.api.insurance.dto.InsuredDTO;
|
|
|
import com.yc.ship.module.trade.api.insurance.dto.InsuredRespDTO;
|
|
|
import com.yc.ship.module.trade.controller.admin.insurance.vo.HccResult;
|
|
|
import com.yc.ship.module.trade.controller.admin.insurance.vo.InsuranceData;
|
|
|
import com.yc.ship.module.trade.controller.admin.insurance.vo.InsurancePageReqVO;
|
|
|
import com.yc.ship.module.trade.controller.admin.insurance.vo.InsuranceRespVO;
|
|
|
+import com.yc.ship.module.trade.controller.admin.order.vo.order.TradeOrderRespVO;
|
|
|
+import com.yc.ship.module.trade.controller.admin.order.vo.order.TradeVisitorRespVO;
|
|
|
import com.yc.ship.module.trade.dal.dataobject.insurance.InsuranceDO;
|
|
|
import com.yc.ship.module.trade.dal.mysql.insurance.InsuranceMapper;
|
|
|
+import com.yc.ship.module.trade.dal.mysql.order.TradeOrderMapper;
|
|
|
+import com.yc.ship.module.trade.dal.mysql.order.TradeVisitorMapper;
|
|
|
import com.yc.ship.module.trade.enums.CardTypeEnum;
|
|
|
+import com.yc.ship.module.trade.enums.CredentialTypeEnum;
|
|
|
import com.yc.ship.module.trade.enums.InsuranceStatusEnum;
|
|
|
+import com.yc.ship.module.trade.service.order.TradeOrderService;
|
|
|
import com.yc.ship.module.trade.utils.CommonUUCodeUtils;
|
|
|
import com.yc.ship.module.trade.utils.InsuranceRequestHelper;
|
|
|
+import com.yc.ship.module.trade.utils.InsuranceUtil;
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
import org.apache.commons.lang3.StringUtils;
|
|
|
import org.redisson.api.RLock;
|
|
|
import org.redisson.api.RedissonClient;
|
|
|
+import org.springframework.beans.factory.annotation.Value;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
|
import org.springframework.validation.annotation.Validated;
|
|
|
@@ -47,6 +59,7 @@ import java.util.Map;
|
|
|
import java.util.concurrent.TimeUnit;
|
|
|
|
|
|
import static com.yc.ship.framework.common.exception.util.ServiceExceptionUtil.exception;
|
|
|
+import static com.yc.ship.framework.common.exception.util.ServiceExceptionUtil.exception0;
|
|
|
import static com.yc.ship.module.trade.enums.ErrorCodeConstants.*;
|
|
|
|
|
|
|
|
|
@@ -71,6 +84,21 @@ public class InsuranceServiceImpl implements InsuranceService {
|
|
|
@Resource
|
|
|
private RedissonClient redissonClient;
|
|
|
|
|
|
+ @Resource
|
|
|
+ private TradeOrderMapper tradeOrderMapper;
|
|
|
+
|
|
|
+ @Resource
|
|
|
+ private TradeVisitorMapper tradeVisitorMapper;
|
|
|
+
|
|
|
+ @Resource
|
|
|
+ private VoyageService voyageService;
|
|
|
+
|
|
|
+ @Resource
|
|
|
+ private InsuranceUtil insuranceUtil;
|
|
|
+
|
|
|
+ @Value("${yudao.notify.insurance}")
|
|
|
+ private String notifyUrl;
|
|
|
+
|
|
|
|
|
|
private void validateInsuranceExists(Long id) {
|
|
|
if (insuranceMapper.selectById(id) == null) {
|
|
|
@@ -107,86 +135,106 @@ public class InsuranceServiceImpl implements InsuranceService {
|
|
|
*/
|
|
|
@Override
|
|
|
@Transactional
|
|
|
- public CommonResult<InsuredRespDTO> applyInsurance(InsuranceApplyReqDTO applyReqVO) {
|
|
|
- InsuredRespDTO respDTO = new InsuredRespDTO();
|
|
|
- try {
|
|
|
- String riskCode = configApi.getConfigValueByKey("insurance.riskCode");
|
|
|
- InsuranceDO insuranceDO = null;
|
|
|
- //保存投保信息
|
|
|
- insuranceDO = new InsuranceDO();
|
|
|
- Long orderId = applyReqVO.getOrderId();
|
|
|
- insuranceDO.setOrderId(orderId);
|
|
|
- insuranceDO.setAgencyOrderId(applyReqVO.getAgencyOrderId());
|
|
|
- insuranceDO.setInsuranceStatus(InsuranceStatusEnum.FAIL.getValue());
|
|
|
- insuranceDO.setInsuredNum(applyReqVO.getInsuredList().size());
|
|
|
- insuranceDO.setHolderName(applyReqVO.getHolderName());
|
|
|
- insuranceDO.setHolderNo(applyReqVO.getHolderNo());
|
|
|
- insuranceDO.setRationType(applyReqVO.getRationType());
|
|
|
- insuranceDO.setRiskCode(riskCode);
|
|
|
- insuranceDO.setInsuranceEffectDate(LocalDateTime.ofInstant(applyReqVO.getTravelDate().toInstant(), ZoneId.systemDefault()));
|
|
|
- Long id = IdWorker.getId(insuranceDO);
|
|
|
- insuranceDO.setId(id);
|
|
|
- insuranceDO.setDeleted(false);
|
|
|
- JSONObject reqObj = this.assembleInsuranceRequest(applyReqVO.getInsuredList(), applyReqVO.getRationType(), riskCode, applyReqVO.getTravelDate(),
|
|
|
- applyReqVO.getPremium(), applyReqVO.getAmount(), applyReqVO.getHolderName(), applyReqVO.getHolderNo(), orderId);
|
|
|
- insuranceMapper.insert(insuranceDO);
|
|
|
- String url = configApi.getConfigValueByKey("insurance.url");
|
|
|
+ public void applyInsurance(Long orderId) {
|
|
|
|
|
|
- RLock lock = redissonClient.getLock(INSURANCE_KEY + orderId);
|
|
|
- try {
|
|
|
- if (lock.tryLock(30, 60, TimeUnit.SECONDS)) {
|
|
|
- log.error("电子保险请求参数:{}",url+";"+JSONUtil.toJsonStr(reqObj));
|
|
|
- String result = HttpUtil.createPost(url).contentType("application/json").body(JSONUtil.toJsonStr(reqObj)).timeout(15000).execute().body();
|
|
|
- log.error("电子保险返回参数:{}",result);
|
|
|
- JSONObject insuranceResponse = JSONUtil.parseObj(result);
|
|
|
- String publicKey = configApi.getConfigValueByKey("insurance.publicKey");
|
|
|
- String privateKey = configApi.getConfigValueByKey("insurance.privateKey");
|
|
|
- InsuranceRequestHelper.checkSignAndDecrypt(insuranceResponse, publicKey, privateKey);
|
|
|
-
|
|
|
- // 0:失败 1:成功
|
|
|
- if (null != insuranceResponse && "200".equals(insuranceResponse.get("code"))) {
|
|
|
- String data = insuranceResponse.get("data").toString();
|
|
|
- if (data != null) {
|
|
|
- InsuranceData insuranceData = JSONUtil.toBean(data, InsuranceData.class);
|
|
|
- insuranceDO.setResCode(insuranceData.getHccResults().get(0).getCode());
|
|
|
- insuranceDO.setResMsg( insuranceData.getHccResults().get(0).getMsg());
|
|
|
- if ("SUCCESS".equalsIgnoreCase(insuranceData.getHccResults().get(0).getCode())) {
|
|
|
- List<HccResult> hccResultDetailList = insuranceData.getHccResults();
|
|
|
- HccResult hccResultDetail = hccResultDetailList.get(0);
|
|
|
- insuranceDO.setInsuranceNo(hccResultDetail.getOrderNo());
|
|
|
- Integer insuranceStatus = StringUtils.equalsIgnoreCase("success", hccResultDetail.getStatus())
|
|
|
- ? InsuranceStatusEnum.SUCCESS.getValue() : InsuranceStatusEnum.FAIL.getValue();
|
|
|
- insuranceDO.setInsuranceStatus(insuranceStatus);
|
|
|
- insuranceDO.setPolicyNo(hccResultDetail.getPolicyNo());
|
|
|
- insuranceDO.setProposalNo(hccResultDetail.getProposalNo());
|
|
|
- insuranceDO.setAmount(new BigDecimal(hccResultDetail.getAmount() + ""));
|
|
|
- insuranceDO.setPremium(new BigDecimal(hccResultDetail.getPremium() + ""));
|
|
|
- insuranceMapper.updateById(insuranceDO);
|
|
|
- respDTO.setInsuranceStatus(insuranceStatus);
|
|
|
- respDTO.setInsuredId(insuranceDO.getId());
|
|
|
- return CommonResult.success(respDTO);
|
|
|
- }
|
|
|
- insuranceMapper.updateById(insuranceDO);
|
|
|
- }
|
|
|
- }
|
|
|
- } else {
|
|
|
- return CommonResult.error(INSURE_FAILED);
|
|
|
- }
|
|
|
- } catch (Exception e) {
|
|
|
- e.printStackTrace();
|
|
|
- log.error("保险申报异常,:", e);
|
|
|
- throw exception(CONTRACT_APPLY_FAILED);
|
|
|
- } finally {
|
|
|
- if (lock.isLocked() && lock.isHeldByCurrentThread()) {
|
|
|
- lock.unlock();
|
|
|
- }
|
|
|
- }
|
|
|
- } catch (Exception e) {
|
|
|
- e.printStackTrace();
|
|
|
- log.error("[投保申请]:" + e.getMessage());
|
|
|
- return CommonResult.error(INSURE_FAILED);
|
|
|
+ TradeOrderRespVO orderInfo = tradeOrderMapper.getOrderInfo(orderId);
|
|
|
+ VoyageDO voyage = voyageService.getVoyage(orderInfo.getVoyageId());
|
|
|
+
|
|
|
+ InsuranceApplyReqDTO insuranceApplyReqDTO = new InsuranceApplyReqDTO();
|
|
|
+ insuranceApplyReqDTO.setService("applyTeam");
|
|
|
+ insuranceApplyReqDTO.setReplyUrl(notifyUrl);
|
|
|
+ insuranceApplyReqDTO.setOnlinePayInd("0");
|
|
|
+
|
|
|
+ //订单对象, 一个订单下可以有一批被保险人
|
|
|
+ InsuranceOrderInfoDTO insuranceOrderInfoDTO = new InsuranceOrderInfoDTO();
|
|
|
+
|
|
|
+ //投保人信息
|
|
|
+ insuranceOrderInfoDTO.setExternalOrderNo(orderInfo.getOrderNo());
|
|
|
+ insuranceOrderInfoDTO.setExternalPolicyNumber(orderInfo.getId().toString());
|
|
|
+ insuranceOrderInfoDTO.setTeamCode(orderInfo.getGroupNo());
|
|
|
+ //TODO: 当前写死
|
|
|
+ insuranceOrderInfoDTO.setProductNo("SIGCOE_ZBJC1");
|
|
|
+ insuranceOrderInfoDTO.setBeginDate(DateUtil.format(voyage.getBoardingTime(), "yyyy-MM-dd"));
|
|
|
+ insuranceOrderInfoDTO.setEndDate(DateUtil.format(voyage.getLeaveTime(), "yyyy-MM-dd"));
|
|
|
+ insuranceOrderInfoDTO.setCurrencyCode("CNY");
|
|
|
+ insuranceOrderInfoDTO.setBizType(1);
|
|
|
+ insuranceOrderInfoDTO.setApplicantType(1);
|
|
|
+ insuranceOrderInfoDTO.setApplicant("宜昌长江国际旅行社有限公司");
|
|
|
+ insuranceOrderInfoDTO.setApplicantCertificateType(6);
|
|
|
+ insuranceOrderInfoDTO.setApplicantCertificateNo("91420500737133035K");
|
|
|
+ insuranceOrderInfoDTO.setApplicantBirthday("1990-01-01");
|
|
|
+ insuranceOrderInfoDTO.setApplicantSex(1);
|
|
|
+
|
|
|
+ //销售人信息
|
|
|
+ insuranceOrderInfoDTO.setSellCorp("测试公司");
|
|
|
+ insuranceOrderInfoDTO.setSellDept("测试部门");
|
|
|
+ insuranceOrderInfoDTO.setSellUser("测试人");
|
|
|
+ insuranceApplyReqDTO.setOrder(insuranceOrderInfoDTO);
|
|
|
+
|
|
|
+ //被保人对象列表, 其下可多位被保险人, 他们在同个订单下
|
|
|
+ List<TradeVisitorRespVO> tradeVisitorRespVOS = tradeVisitorMapper.queryVisitorByOrderId(orderId);
|
|
|
+ List<InsuredDTO> insuredList = new ArrayList<>();
|
|
|
+ tradeVisitorRespVOS.stream().forEach(tradeVisitorRespVO -> {
|
|
|
+ InsuredDTO insuredDTO = new InsuredDTO();
|
|
|
+ insuredDTO.setExternalPolicyNumber(tradeVisitorRespVO.getId().toString());
|
|
|
+ insuredDTO.setInsuredName(tradeVisitorRespVO.getName());
|
|
|
+ insuredDTO.setCertificateType(transCredentialType(tradeVisitorRespVO.getCredentialType()));
|
|
|
+ insuredDTO.setCertificateNo(tradeVisitorRespVO.getCredentialNo());
|
|
|
+ insuredDTO.setBirthday(tradeVisitorRespVO.getBirthday());
|
|
|
+ insuredDTO.setSex(tradeVisitorRespVO.getGender());
|
|
|
+ insuredDTO.setRelation(2); //不是保单持有人,只是被保险人
|
|
|
+ insuredList.add(insuredDTO);
|
|
|
+ });
|
|
|
+ insuranceApplyReqDTO.setInsureds(insuredList);
|
|
|
+
|
|
|
+ //验证投保信息
|
|
|
+// CommonResult commonResult = insuranceUtil.validateInsuranceRequest(insuranceApplyReqDTO);
|
|
|
+// if(!commonResult.isSuccess()) {
|
|
|
+// throw exception0(commonResult.getCode(),commonResult.getMsg());
|
|
|
+// }
|
|
|
+ // 开始投保
|
|
|
+ CommonResult commonResult = insuranceUtil.sendInsuranceApply(insuranceApplyReqDTO);
|
|
|
+ if(!commonResult.isSuccess()) {
|
|
|
+ throw exception0(commonResult.getCode(),commonResult.getMsg());
|
|
|
}
|
|
|
- return CommonResult.error(INSURE_FAILED);
|
|
|
+ //保存投保信息
|
|
|
+ InsuranceDO insuranceDO = new InsuranceDO();
|
|
|
+ insuranceDO.setOrderId(orderId);
|
|
|
+// insuranceDO.setAgencyOrderId(applyReqVO.getAgencyOrderId());
|
|
|
+ insuranceDO.setInsuranceStatus(InsuranceStatusEnum.INSURE.getValue());
|
|
|
+ insuranceDO.setInsuredNum(insuredList.size());
|
|
|
+// insuranceDO.setHolderName(applyReqVO.getHolderName());
|
|
|
+// insuranceDO.setHolderNo(applyReqVO.getHolderNo());
|
|
|
+// insuranceDO.setRationType(applyReqVO.getRationType());
|
|
|
+// insuranceDO.setRiskCode(riskCode);
|
|
|
+// insuranceDO.setInsuranceEffectDate(LocalDateTime.ofInstant(applyReqVO.getTravelDate().toInstant(), ZoneId.systemDefault()));
|
|
|
+ Long id = IdWorker.getId(insuranceDO);
|
|
|
+ insuranceDO.setId(id);
|
|
|
+ insuranceMapper.insert(insuranceDO);
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 处理系统证件枚举与保险证件枚举转换
|
|
|
+ * @param credentialType
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ private Integer transCredentialType(Integer credentialType) {
|
|
|
+ Integer transCredentialType = 6; //默认为其他
|
|
|
+ switch (credentialType) {
|
|
|
+ case 0:
|
|
|
+ transCredentialType = 1;
|
|
|
+ break;
|
|
|
+ case 1:
|
|
|
+ transCredentialType = 3;
|
|
|
+ break;
|
|
|
+ case 2: case 3: case 4: case 6: case 7: case 8: case 9: case 99:
|
|
|
+ transCredentialType = 6;
|
|
|
+ break;
|
|
|
+ case 5:
|
|
|
+ transCredentialType = 5;
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ return transCredentialType;
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
@@ -291,6 +339,11 @@ public class InsuranceServiceImpl implements InsuranceService {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ @Override
|
|
|
+ public InsuranceDO getByOrderId(Long orderId) {
|
|
|
+ return insuranceMapper.selectByOrderId(orderId);
|
|
|
+ }
|
|
|
+
|
|
|
/**
|
|
|
* 电子保单查询
|
|
|
*/
|
|
|
@@ -363,117 +416,6 @@ public class InsuranceServiceImpl implements InsuranceService {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- /**
|
|
|
- * 组装申请保险参数
|
|
|
- *
|
|
|
- * @param insuredList
|
|
|
- * @param rationType 产品代码
|
|
|
- * @param premium 保费
|
|
|
- * @param amount 保额
|
|
|
- */
|
|
|
- private JSONObject assembleInsuranceRequest(List<InsuredDTO> insuredList, String rationType, String riskCode, Date travelDate,
|
|
|
- BigDecimal premium, BigDecimal amount, String HolderName, String holderIdNo, Long orderDetailId) throws Exception {
|
|
|
- JSONObject head = this.getCommonHead(rationType, riskCode, "INPUT");
|
|
|
-
|
|
|
- JSONObject hccInsurance = new JSONObject();
|
|
|
- //订单号
|
|
|
- hccInsurance.set("orderNo", CommonUUCodeUtils.createInsuranceFlowNo());
|
|
|
- //产品代码
|
|
|
- hccInsurance.set("rationType", rationType);
|
|
|
- //投保时间
|
|
|
- hccInsurance.set("insurDate", DateUtil.format(new Date(), "yyyy-MM-dd HH:mm:ss"));
|
|
|
- String startDate = DateUtil.formatDate(travelDate) + " 00:00:00";
|
|
|
- String endDate = DateUtil.formatDate(travelDate) + " 23:59:59";
|
|
|
- //起保日期
|
|
|
- hccInsurance.set("insurStartDate", startDate);
|
|
|
- //终保日期
|
|
|
- hccInsurance.set("insurEndDate", endDate);
|
|
|
- //保险区间
|
|
|
- hccInsurance.set("insurPeriod", "1");
|
|
|
- //保险区间单位
|
|
|
- hccInsurance.set("insurYearFlag", "D");
|
|
|
- //购买份数
|
|
|
- hccInsurance.set("mult", "1");
|
|
|
- //保费 (测)
|
|
|
- hccInsurance.set("premium",premium + "");
|
|
|
- //保额
|
|
|
- hccInsurance.set("amount", amount.multiply(new BigDecimal(insuredList.size())) + "");
|
|
|
- hccInsurance.set("inputDate", DateUtil.format(new Date(), DatePattern.NORM_DATETIME_PATTERN));
|
|
|
- hccInsurance.set("sysFlag", configApi.getConfigValueByKey("insurance.sysflag"));
|
|
|
- //险种代码
|
|
|
- hccInsurance.set("mainRiskCode", riskCode);
|
|
|
-
|
|
|
- List<JSONObject> hccInsuredList = new ArrayList<>();
|
|
|
-
|
|
|
- insuredList.forEach(insured -> {
|
|
|
- JSONObject hccInsured = new JSONObject();
|
|
|
- //被保人编号
|
|
|
- hccInsured.set("insuredNo", orderDetailId);
|
|
|
- //被保人姓名
|
|
|
- hccInsured.set("insuredName", insured.getInsuredName());
|
|
|
- //被保人证件类型
|
|
|
- hccInsured.set("insuredIdType", CardTypeEnum.getInsuranceCardCodeById(insured.getInsuredIdType()));
|
|
|
- //被保人证件号码
|
|
|
- hccInsured.set("insuredIdNo", insured.getInsuredIdNo());
|
|
|
- hccInsuredList.add(hccInsured);
|
|
|
- });
|
|
|
-
|
|
|
- //投保人信息
|
|
|
- JSONObject hccHolderInfo = new JSONObject();
|
|
|
- //投保人姓名
|
|
|
- hccHolderInfo.set("holderName", HolderName);
|
|
|
- //投保人证件号码
|
|
|
- hccHolderInfo.set("holderIdNo", holderIdNo);
|
|
|
- //投保人证件类型
|
|
|
- // 01 身份证
|
|
|
- // * 02 户口薄
|
|
|
- // * 03 护照
|
|
|
- // * 04 军官证
|
|
|
- // * 05 驾驶执照
|
|
|
- // * 06 返乡证
|
|
|
- // * 99 其它
|
|
|
- // * 07 异常身份证
|
|
|
- // * 08 组织机构代码证
|
|
|
- // * 09 统一社会信用代码
|
|
|
- // * 48 港澳台居民居住证
|
|
|
- //hccHolderInfo.set("holderIdType", "01");
|
|
|
- String holderIdType = "01"; // 默认值
|
|
|
- if (!insuredList.isEmpty()) {
|
|
|
- boolean allNot01 = insuredList.stream()
|
|
|
- .map(InsuredDTO::getInsuredIdType)
|
|
|
- .allMatch(type -> !"01".equals(type));
|
|
|
-
|
|
|
- if (allNot01) {
|
|
|
- holderIdType = "03";
|
|
|
- }
|
|
|
- }
|
|
|
- hccHolderInfo.set("holderIdType", holderIdType);
|
|
|
- JSONObject insurancePolicy = new JSONObject();
|
|
|
- insurancePolicy.set("hccInsurance", hccInsurance);
|
|
|
- insurancePolicy.set("hccInsuredList", hccInsuredList);
|
|
|
- insurancePolicy.set("hccHolderInfo", hccHolderInfo);
|
|
|
-
|
|
|
- List<JSONObject> insurancePolicyList = new ArrayList();
|
|
|
- insurancePolicyList.add(insurancePolicy);
|
|
|
-
|
|
|
- JSONObject applyInsuranceRequest = new JSONObject();
|
|
|
- applyInsuranceRequest.set("head", head);
|
|
|
- applyInsuranceRequest.set("insurancePolicyList", insurancePolicyList);
|
|
|
-
|
|
|
- JSONObject insuranceRequest = new JSONObject();
|
|
|
- insuranceRequest.set("appKey", configApi.getConfigValueByKey("insurance.sysflag"));
|
|
|
- insuranceRequest.set("timestamp", System.currentTimeMillis() + "");
|
|
|
- insuranceRequest.set("serviceName", "insurance");
|
|
|
- insuranceRequest.set("version", configApi.getConfigValueByKey("insurance.version"));
|
|
|
- insuranceRequest.set("encryptType", ENCRYPT_TYPE);
|
|
|
- insuranceRequest.set("bizContent", JSONUtil.toJsonStr(applyInsuranceRequest));
|
|
|
- String publicKey = configApi.getConfigValueByKey("insurance.publicKey");
|
|
|
- String privateKey = configApi.getConfigValueByKey("insurance.privateKey");
|
|
|
- //加密加签
|
|
|
- InsuranceRequestHelper.encryptAndSign(insuranceRequest, publicKey, privateKey);
|
|
|
- return insuranceRequest;
|
|
|
- }
|
|
|
-
|
|
|
private JSONObject getCommonHead(String rationType, String riskCode, String type) {
|
|
|
JSONObject head = new JSONObject();
|
|
|
head.set("sysFlag", configApi.getConfigValueByKey("insurance.sysflag"));
|