风控中台-评分历史增加tran_no字段
This commit is contained in:
parent
272a78f4c4
commit
d5f1d53c84
@ -882,6 +882,7 @@
|
||||
<attribute name="FRAUD_TAKEN_CODE" label="反欺诈人工判定结果" type="STRING" length="50"/>
|
||||
<attribute name="SCORE_RESULT_CODE" label="评分结果" type="STRING" length="50"/>
|
||||
<attribute name="RESULT_TIME" label="异步结果时间" type="STRING" length="50"/>
|
||||
<attribute name="TRAN_NO" label="评分流水号" type="STRING" length="50"/>
|
||||
</attributes>
|
||||
<manager>
|
||||
<managerProperties>
|
||||
|
||||
@ -22,9 +22,11 @@ public class AmpController {
|
||||
Map<String,String> map = new HashMap<String,String>();
|
||||
map.put("flowUnid",flowUnid);
|
||||
map.put("operatorId",operatorId);
|
||||
map.put("tranNo",DateUtils.dateTimeNowAccurate());
|
||||
AmpService as = new AmpServiceImpl(map);
|
||||
Transaction tran = as.transactionDo();
|
||||
String result = resultAnalysis(tran);
|
||||
saveScoreLog(tran,map.get("tranNo"));
|
||||
as.resetFraudTakenCode();
|
||||
return result;
|
||||
}
|
||||
@ -32,7 +34,7 @@ public class AmpController {
|
||||
public String resultAnalysis(Transaction tran){
|
||||
String response = "";
|
||||
String retCode = tran.getMessageEsbHead().getRetCode();
|
||||
saveScoreLog(tran);
|
||||
|
||||
if("000000".equals(retCode)){
|
||||
response = "²Ù×÷³É¹¦£¡";
|
||||
}else{
|
||||
@ -40,7 +42,7 @@ public class AmpController {
|
||||
}
|
||||
return response;
|
||||
}
|
||||
public void saveScoreLog(com.ample.esb.bean.esb.Transaction tran){
|
||||
public void saveScoreLog(com.ample.esb.bean.esb.Transaction tran,String tranNo){
|
||||
BizObjectManager bom = null;
|
||||
try {
|
||||
bom = JBOFactory.getBizObjectManager("jbo.oti.RC_SCORE_LOG");
|
||||
@ -57,6 +59,7 @@ public class AmpController {
|
||||
String retCode = tran.getMessageEsbHead().getRetCode();
|
||||
bo.setAttributeValue("RET_CODE", retCode);
|
||||
bo.setAttributeValue("PROJECT_NO", projectNo);
|
||||
bo.setAttributeValue("TRAN_NO", tranNo);
|
||||
bom.saveObject(bo);
|
||||
} catch (JBOException e) {
|
||||
e.printStackTrace();
|
||||
|
||||
@ -33,9 +33,11 @@ import java.util.*;
|
||||
public class AmpServiceImpl extends EsbCommon implements AmpService {
|
||||
private String flowUnid;
|
||||
private String operatorId;
|
||||
private String tranNo;
|
||||
public AmpServiceImpl(Map<String,String> map){
|
||||
setFlowUnid(map.get("flowUnid"));
|
||||
setOperatorId(map.get("operatorId"));
|
||||
setTranNo(map.get("tranNo"));
|
||||
}
|
||||
public void resetFraudTakenCode(){
|
||||
BizObjectManager bom = null;
|
||||
@ -133,6 +135,7 @@ public class AmpServiceImpl extends EsbCommon implements AmpService {
|
||||
private BizObject boCft;
|
||||
//¾ÏúÉÌÕýʽ±í
|
||||
private BizObject boDi;
|
||||
|
||||
/**
|
||||
* ÍùbeanÀïÃæÌîÖµ
|
||||
* @throws JBOException
|
||||
@ -996,7 +999,7 @@ public class AmpServiceImpl extends EsbCommon implements AmpService {
|
||||
app.setNumber(number);
|
||||
app.setApplicationType("APF");
|
||||
app.setOriginalSystemId("APF");
|
||||
app.setTranNo(DateUtils.dateTimeNowAccurate());
|
||||
app.setTranNo(tranNo);
|
||||
app.setFirstProposalDate(minTime);
|
||||
app.setLastProposalDate(maxTime);
|
||||
app.setFaName(faName);
|
||||
@ -1204,4 +1207,12 @@ public class AmpServiceImpl extends EsbCommon implements AmpService {
|
||||
public void setOperatorId(String operatorId) {
|
||||
this.operatorId = operatorId;
|
||||
}
|
||||
|
||||
public String getTranNo() {
|
||||
return tranNo;
|
||||
}
|
||||
|
||||
public void setTranNo(String tranNo) {
|
||||
this.tranNo = tranNo;
|
||||
}
|
||||
}
|
||||
|
||||
@ -53,4 +53,9 @@ public interface RC_SCORE_LOG {
|
||||
public static final String FRAUD_TAKEN_CODE = "FRAUD_TAKEN_CODE";
|
||||
|
||||
public static final String SCORE_RESULT_CODE = "SCORE_RESULT_CODE";
|
||||
|
||||
/**
|
||||
* Á÷Ë®ºÅ STRING(20)<br>
|
||||
*/
|
||||
public static final String TRAN_NO = "TRAN_NO";
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user