Commit fded883d authored by 陈宏杰's avatar 陈宏杰

A1重复报送问题

parent 5933e107
......@@ -3,6 +3,8 @@ package cn.quantgroup.report.mapper.master;
import cn.quantgroup.report.domain.baihang.ApplyLoanInfoZhuDai;
import org.springframework.stereotype.Repository;
import java.util.List;
/**
* -----------------------------------------------------------------------------<br>
* 描述: 贷款申请信息 <br>
......@@ -15,4 +17,6 @@ public interface ApplyLoanInfoZhuDaiMapper {
void saveApplyLoanInfoZhuDaiLog(ApplyLoanInfoZhuDai applyLoanInfoZhuDai);
List<ApplyLoanInfoZhuDai> findApplyLoanInfoZhuDaiLog(String reqId);
}
......@@ -128,27 +128,33 @@ public class BaiHangFileReportService {
List<String> reportList = new ArrayList<>();
reportList.add("#applyInfo");
String reqId_log = "";
List<ApplyLoanInfoZhuDai> zhuDaiLogList = null;
for (int i = 0; i < applyLoanInfos.size(); i++) {
try {
ApplyLoanInfoZhuDai applyLoanInfo = applyLoanInfos.get(i);
try {
ApplyLoanInfoZhuDai record = new ApplyLoanInfoZhuDai();
BeanUtils.copyProperties(applyLoanInfo, record);
record.setRecordId(UUID.randomUUID().toString().replaceAll("-", ""));
applyLoanInfoZhuDaiMapper.saveApplyLoanInfoZhuDaiLog(record);
} catch (Exception e) {
log.error("量化派助贷TO百行报送(A1)-贷款申请信息保存记录失败", e);
}
reqId_log = applyLoanInfo.getReqID();
//邮箱有错误的就不传
if (!TuoMinUtils.checkEmail(applyLoanInfo.getEmailAddress())) {
applyLoanInfo.setEmailAddress(null);
zhuDaiLogList = applyLoanInfoZhuDaiMapper.findApplyLoanInfoZhuDaiLog(applyLoanInfo.getReqID());
if (CollectionUtils.isEmpty(zhuDaiLogList)) {
try {
ApplyLoanInfoZhuDai record = new ApplyLoanInfoZhuDai();
BeanUtils.copyProperties(applyLoanInfo, record);
record.setRecordId(UUID.randomUUID().toString().replaceAll("-", ""));
applyLoanInfoZhuDaiMapper.saveApplyLoanInfoZhuDaiLog(record);
} catch (Exception e) {
log.error("量化派助贷TO百行报送(A1)-贷款申请信息保存记录失败", e);
}
//邮箱有错误的就不传
if (!TuoMinUtils.checkEmail(applyLoanInfo.getEmailAddress())) {
applyLoanInfo.setEmailAddress(null);
}
applyLoanInfo.setName(sensitiveFilter(applyLoanInfo.getName()));
applyLoanInfo.setMobile(sensitiveFilter(applyLoanInfo.getMobile()));
applyLoanInfo.setPid(sensitiveFilter(applyLoanInfo.getPid()));
reportList.add(JSON.toJSONString(applyLoanInfo));
atomicInteger.getAndIncrement();
} else {
log.error("量化派助贷TO百行报送(A1)-贷款申请信息重复报送, reqId_log: {} ", reqId_log);
}
applyLoanInfo.setName(sensitiveFilter(applyLoanInfo.getName()));
applyLoanInfo.setMobile(sensitiveFilter(applyLoanInfo.getMobile()));
applyLoanInfo.setPid(sensitiveFilter(applyLoanInfo.getPid()));
reportList.add(JSON.toJSONString(applyLoanInfo));
atomicInteger.getAndIncrement();
} catch (Exception e) {
log.error("量化派助贷TO百行报送(A1)-贷款申请信息异常, reqId_log: {} ", reqId_log, e);
}
......
......@@ -2,30 +2,30 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="cn.quantgroup.report.mapper.master.ApplyLoanInfoZhuDaiMapper">
<resultMap id="LoanInfoResultMap" type="cn.quantgroup.report.domain.baihang.ApplyLoanInfoZhuDai">
<result column="recordId" jdbcType="VARCHAR" property="record_id"/>
<result column="reqID" jdbcType="VARCHAR" property="req_id"/>
<result column="opCode" jdbcType="VARCHAR" property="op_code"/>
<result column="uploadTs" jdbcType="VARCHAR" property="upload_ts"/>
<result column="isFinTechAgencyBusiness" jdbcType="INTEGER" property="is_fin_tech_agency_business"/>
<result column="applyDate" jdbcType="VARCHAR" property="apply_date"/>
<result column="applyId" jdbcType="VARCHAR" property="apply_id"/>
<result column="applyType" jdbcType="INTEGER" property="apply_type"/>
<result column="name" jdbcType="VARCHAR" property="name"/>
<result column="idType" jdbcType="INTEGER" property="id_type"/>
<result column="pid" jdbcType="VARCHAR" property="pid"/>
<result column="mobile" jdbcType="VARCHAR" property="mobile"/>
<result column="emailAddress" jdbcType="VARCHAR" property="email_address"/>
<result column="eduBackground" jdbcType="INTEGER" property="edu_background"/>
<result column="degree" jdbcType="INTEGER" property="degree"/>
<result column="guaranteeType" jdbcType="INTEGER" property="guarantee_type"/>
<result column="loanPurpose" jdbcType="INTEGER" property="loan_purpose"/>
<result column="customType" jdbcType="INTEGER" property="custom_type"/>
<result column="applyAmount" jdbcType="DECIMAL" property="apply_amount"/>
<result column="businessOrgCreditCode" jdbcType="VARCHAR" property="business_org_credit_code"/>
<result column="livingCondition" jdbcType="INTEGER" property="living_condition"/>
<result column="marriageStatus" jdbcType="INTEGER" property="marriage_status"/>
<result column="spouseName" jdbcType="VARCHAR" property="spouse_name"/>
<resultMap id="applyLoanInfoZhuDaiMap" type="cn.quantgroup.report.domain.baihang.ApplyLoanInfoZhuDai">
<result property="recordId" jdbcType="VARCHAR" column="record_id"/>
<result property="reqID" jdbcType="VARCHAR" column="req_id"/>
<result property="opCode" jdbcType="VARCHAR" column="op_code"/>
<result property="uploadTs" jdbcType="VARCHAR" column="upload_ts"/>
<result property="isFinTechAgencyBusiness" jdbcType="INTEGER" column="is_fin_tech_agency_business"/>
<result property="applyDate" jdbcType="VARCHAR" column="apply_date"/>
<result property="applyId" jdbcType="VARCHAR" column="apply_id"/>
<result property="applyType" jdbcType="INTEGER" column="apply_type"/>
<result property="name" jdbcType="VARCHAR" column="name"/>
<result property="idType" jdbcType="INTEGER" column="id_type"/>
<result property="pid" jdbcType="VARCHAR" column="pid"/>
<result property="mobile" jdbcType="VARCHAR" column="mobile"/>
<result property="emailAddress" jdbcType="VARCHAR" column="email_address"/>
<result property="eduBackground" jdbcType="INTEGER" column="edu_background"/>
<result property="degree" jdbcType="INTEGER" column="degree"/>
<result property="guaranteeType" jdbcType="INTEGER" column="guarantee_type"/>
<result property="loanPurpose" jdbcType="INTEGER" column="loan_purpose"/>
<result property="customType" jdbcType="INTEGER" column="custom_type"/>
<result property="applyAmount" jdbcType="DECIMAL" column="apply_amount"/>
<result property="businessOrgCreditCode" jdbcType="VARCHAR" column="business_org_credit_code"/>
<result property="livingCondition" jdbcType="INTEGER" column="living_condition"/>
<result property="marriageStatus" jdbcType="INTEGER" column="marriage_status"/>
<result property="spouseName" jdbcType="VARCHAR" column="spouse_name"/>
</resultMap>
<select id="saveApplyLoanInfoZhuDaiLog" parameterType="cn.quantgroup.report.domain.baihang.ApplyLoanInfoZhuDai">
......@@ -38,5 +38,11 @@
#{businessOrgCreditCode},#{livingCondition},#{marriageStatus},#{spouseName})
</select>
<select id="findApplyLoanInfoZhuDaiLog" parameterType="java.lang.String" resultMap="applyLoanInfoZhuDaiMap">
select *
from apply_loan_info_zhudai
where req_id = #{reqId,jdbcType=VARCHAR}
</select>
</mapper>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment