Selaa lähdekoodia

企查查测试问题修改

zhangchenm 1 viikko sitten
vanhempi
commit
9374db334e

+ 3 - 1
trade-client/src/main/java/com/trade/client/enterprise/customer/service/impl/EnterpriseServiceImpl.java

@@ -685,8 +685,10 @@ public class EnterpriseServiceImpl implements EnterpriseService {
             log.warn("企业准入失败,企业成立年限不符合要求!");
             throw new ValidatorException(HttpStatus.ERROR, "认证失败");
         }
+        // 注意这里企查查返回的被执行金额单位是万元,需要转换成元
         if (riskInvestigation.getRegistCapi() != null && StringUtils.parseMoney(riskInvestigation.getRegistCapi())
-                .compareTo(Optional.ofNullable(riskInvestigation.getZhixingAmount()).orElse(BigDecimal.ZERO)) < 0) {
+                .compareTo(Optional.ofNullable(riskInvestigation.getZhixingAmount())
+                        .map(e -> e.multiply(BigDecimal.valueOf(10000))).orElse(BigDecimal.ZERO)) < 0) {
             log.warn("企业准入失败,企业被执行金额大于注册资本!");
             throw new ValidatorException(HttpStatus.ERROR, "认证失败");
         }

+ 2 - 0
trade-service/src/main/java/com/trade/service/thirdparty/sop/domain/SOPRequestLogPO.java

@@ -3,11 +3,13 @@ package com.trade.service.thirdparty.sop.domain;
 import java.io.Serializable;
 import java.util.Date;
 
+import com.baomidou.mybatisplus.annotation.TableName;
 import com.fasterxml.jackson.annotation.JsonFormat;
 
 /**
  * SOP 接口请求日志 实体
  */
+@TableName("sop_request_log")
 public class SOPRequestLogPO implements Serializable {
 
     private static final long serialVersionUID = -4581977919584282836L;

+ 2 - 3
trade-service/src/main/java/com/trade/service/thirdparty/sop/service/impl/SOPServiceImpl.java

@@ -17,7 +17,6 @@ import com.trade.service.thirdparty.sop.service.SOPService;
 import com.trade.service.thirdparty.sop.util.ResponseJson;
 import com.trade.service.thirdparty.sop.util.SOPConstantUtil;
 import com.trade.service.thirdparty.sop.util.SOPRestUtil;
-import com.yomahub.liteflow.util.JsonUtil;
 
 import lombok.extern.slf4j.Slf4j;
 
@@ -64,7 +63,7 @@ public class SOPServiceImpl implements SOPService {
         if (!json.isSuccess()) {
             log.error("调用SOP查询企业详细信息接口返回失败,错误信息:" + json.getMsg());
         }
-        return JsonUtil.parseObject(json.getData().toString(), SOPEnterpriseDetail.class);
+        return JSON.parseObject(json.getData().toString(), SOPEnterpriseDetail.class);
     }
 
     @Override
@@ -79,7 +78,7 @@ public class SOPServiceImpl implements SOPService {
         if (null == json) {
             throw new ServiceException("获取企业风险调查信息失败", HttpStatus.ERROR);
         }
-        return JsonUtil.parseObject(json.getData().toString(), SOPRiskInvestigation.class);
+        return JSON.parseObject(json.getData().toString(), SOPRiskInvestigation.class);
     }
 
     @Override