Commit 4fbbc727 authored by liwenbin's avatar liwenbin

你我贷联系人为空不推送流量以及撞库你我贷不返回结果按拒绝处理

parent 43960b1e
...@@ -160,12 +160,28 @@ public class NiwodaiAssetServiceImpl implements INiwodaiAssetService { ...@@ -160,12 +160,28 @@ public class NiwodaiAssetServiceImpl implements INiwodaiAssetService {
loanInfo.setPurpose(NiwodaiCostant.Purpose.CONSUMPTION.name()); loanInfo.setPurpose(NiwodaiCostant.Purpose.CONSUMPTION.name());
vo.setLoanInfo(loanInfo); vo.setLoanInfo(loanInfo);
NiwodaiCostant.Contacts contacts = new NiwodaiCostant.Contacts(); NiwodaiCostant.Contacts contacts = new NiwodaiCostant.Contacts();
contacts.setNameA((String) infoMap.get("firstName")); String firstName = (String) infoMap.get("firstName");
contacts.setPhoneA((String) infoMap.get("firstMobile")); String firstMobile = (String) infoMap.get("firstMobile");
contacts.setRelationshipA(conversRelationship((String)infoMap.get("firstRelation")).name()); String firstRelation = (String)infoMap.get("firstRelation");
contacts.setNameB((String) infoMap.get("secondName")); if (StringUtils.isAnyEmpty(firstName, firstMobile, firstRelation)) {
contacts.setPhoneB((String) infoMap.get("secondMobile")); log.info("你我贷进件审核接口用户联系人1为空, 按拒绝处理, uuid : {}, bizNo : {}, firstName : {}, firstMobile : {}, firstRelation : {}",
contacts.setRelationshipB(conversRelationship((String)infoMap.get("secondRelation")).name()); assetForm.getUuid(), assetForm.getBizNo(), firstName, firstMobile, firstRelation);
return NiwodaiIncomingResponseVO.createRejectVo();
}
contacts.setNameA(firstName);
contacts.setPhoneA(firstMobile);
contacts.setRelationshipA(conversRelationship(firstRelation).name());
String secondName = (String) infoMap.get("secondName");
String secondMobile = (String) infoMap.get("secondMobile");
String secondRelation = (String)infoMap.get("secondRelation");
if (StringUtils.isAnyEmpty(secondName, secondMobile, secondRelation)) {
log.info("你我贷进件审核接口用户联系人2为空, 按拒绝处理, uuid : {}, bizNo : {}, secondName : {}, secondMobile : {}, secondRelation : {}",
assetForm.getUuid(), assetForm.getBizNo(), secondName, secondMobile, secondRelation);
return NiwodaiIncomingResponseVO.createRejectVo();
}
contacts.setNameB(secondName);
contacts.setPhoneB(secondMobile);
contacts.setRelationshipB(conversRelationship(secondRelation).name());
vo.setContacts(contacts); vo.setContacts(contacts);
NiwodaiCostant.CompnayInfo compnayInfo = new NiwodaiCostant.CompnayInfo(); NiwodaiCostant.CompnayInfo compnayInfo = new NiwodaiCostant.CompnayInfo();
compnayInfo.setName(random(NiwodaiCostant.COMPANY_NAMES)); compnayInfo.setName(random(NiwodaiCostant.COMPANY_NAMES));
...@@ -493,13 +509,20 @@ public class NiwodaiAssetServiceImpl implements INiwodaiAssetService { ...@@ -493,13 +509,20 @@ public class NiwodaiAssetServiceImpl implements INiwodaiAssetService {
} }
public static void main(String[] args) { public static void main(String[] args) {
Map<String, Object> data= new HashMap<>(); Map<String, Object> map = new HashMap<>();
Integer age = (Integer)data.get("user_age"); System.out.println((String) map.get("firstName"));
System.out.println(age);
if (age == null || age.intValue() < 22 || age.intValue() > 50) { String str = (String) map.get("riffs");
System.out.println("不要");
} else { switch (str) {
System.out.println("要"); case "asdf" :
System.out.println(1);
break;
default:
System.out.println(2);
break;
} }
} }
} }
...@@ -61,6 +61,12 @@ public class NiwodaiServiceImpl implements INiwodaiService { ...@@ -61,6 +61,12 @@ public class NiwodaiServiceImpl implements INiwodaiService {
if (vo != null && vo.getPass() != null) { if (vo != null && vo.getPass() != null) {
return JSON.parseObject(result, NiwodaiDataImportCheckResponseVO.class); return JSON.parseObject(result, NiwodaiDataImportCheckResponseVO.class);
} }
} else {
// 先临时这么处理, 最后一个抛异常也先不删除了, 你我贷需要修复这个问题
log.info("你我贷准入接口返回结果出现错误, 按拒绝处理, uuid : {}, response : {}", uuid, result);
alarmService.dingtalkAlarm("Warn", "你我贷准入返回结果出现错误", "uuid : " + uuid
+ " , 错误信息 : 3012->你我贷准入接口返回结果异常, response : " + result);
return NiwodaiDataImportCheckResponseVO.createPassFalse();
} }
throw new QGException(QGExceptionType.NIWODAI_PRE_AUDIT_RESULAT_ERROR, result); throw new QGException(QGExceptionType.NIWODAI_PRE_AUDIT_RESULAT_ERROR, result);
} }
...@@ -80,6 +86,7 @@ public class NiwodaiServiceImpl implements INiwodaiService { ...@@ -80,6 +86,7 @@ public class NiwodaiServiceImpl implements INiwodaiService {
return vo; return vo;
} }
} else { } else {
// 下面抛异常的先不删了, 你我贷会修复这个问题
log.info("你我贷进件审核接口返回结果出现错误, 按拒绝处理, uuid : {}, bizNo : {}, result : {}", uuid, requestVO.getOrderId(), result); log.info("你我贷进件审核接口返回结果出现错误, 按拒绝处理, uuid : {}, bizNo : {}, result : {}", uuid, requestVO.getOrderId(), result);
alarmService.dingtalkAlarm("Warn", "你我贷进件返回结果出现错误", "bizNo : " + requestVO.getOrderId() alarmService.dingtalkAlarm("Warn", "你我贷进件返回结果出现错误", "bizNo : " + requestVO.getOrderId()
+ " , uuid : " + uuid + " , 错误信息 : 3013->你我贷进件返回结果异常, response : " + result); + " , uuid : " + uuid + " , 错误信息 : 3013->你我贷进件返回结果异常, response : " + result);
......
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