@ -336,13 +336,13 @@ public class RiskBusinessServiceImpl implements RiskBusinessService, ManagerTodo
event . put ( "result_type" , RiskResultTypeEnum . ALREADY_HANDLED . getResultType ( ) ) ;
event . put ( "result_type" , RiskResultTypeEnum . ALREADY_HANDLED . getResultType ( ) ) ;
}
}
riskEventMapper . update ( event ) ;
riskEventMapper . update ( event ) ;
if ( event . getIntValue ( "is_send_client" ) = = 1 ) {
sendAppRiskMessage ( event ) ;
}
} catch ( Exception e ) {
} catch ( Exception e ) {
throw new EmailException ( "Email Sending Failed" , e ) ;
throw new EmailException ( "Email Sending Failed" , e ) ;
}
}
} ) ;
} ) ;
if ( event . getIntValue ( "order_type" ) = = 3 ) {
sendAppRiskMessage ( event ) ;
}
}
}
private void sendAppRiskMessage ( JSONObject event ) {
private void sendAppRiskMessage ( JSONObject event ) {
@ -501,16 +501,21 @@ public class RiskBusinessServiceImpl implements RiskBusinessService, ManagerTodo
ctx . setVariable ( "royalpay_order_type" , event . getIntValue ( "royalpay_order_type" ) ) ;
ctx . setVariable ( "royalpay_order_type" , event . getIntValue ( "royalpay_order_type" ) ) ;
ctx . setVariable ( "warning_order_type" , event . getIntValue ( "warning_order_type" ) ) ;
ctx . setVariable ( "warning_order_type" , event . getIntValue ( "warning_order_type" ) ) ;
ctx . setVariable ( "description" , event . getString ( "description" ) ) ;
ctx . setVariable ( "description" , event . getString ( "description" ) ) ;
//String[] orderIds = event.getString("order_ids").split(",");
ctx . setVariable ( "is_send_client" , event . getIntValue ( "is_send_client" ) ) ;
String [ ] realOrderIds = event . getString ( "real_order_ids" ) . split ( "," ) ;
String realOrderIdsStr = event . getString ( "real_order_ids" ) ;
String [ ] realOrderIds = { } ;
if ( StringUtils . isNotBlank ( realOrderIdsStr ) ) {
realOrderIds = event . getString ( "real_order_ids" ) . split ( "," ) ;
}
List < JSONObject > orders = new ArrayList ( ) ;
List < JSONObject > orders = new ArrayList ( ) ;
int isSendClient = event . getIntValue ( "is_send_client" ) ;
switch ( event . getIntValue ( "order_type" ) ) {
switch ( event . getIntValue ( "order_type" ) ) {
case 1 :
case 1 :
case 2 :
case 2 :
for ( String orderId : realOrderIds ) {
for ( String orderId : realOrderIds ) {
JSONObject order = orderMapper . findOrderById ( orderId , client . getIntValue ( "client_id" ) ) ;
JSONObject order = orderMapper . findOrderById ( orderId , client . getIntValue ( "client_id" ) ) ;
if ( order = = null ) {
if ( order = = null ) {
throw new BadRequestException ( "Order: " + orderId + " not exists" ) ;
throw new BadRequestException ( "Order: " + orderId + " not exists" ) ;
}
}
orders . add ( order ) ;
orders . add ( order ) ;
}
}
@ -543,8 +548,12 @@ public class RiskBusinessServiceImpl implements RiskBusinessService, ManagerTodo
// ctx.setVariable("files",attachList);
// ctx.setVariable("files",attachList);
case 4 :
case 4 :
ctx . setVariable ( "title" , "RoyalPay风控调查 — " + client . getString ( "short_name" ) ) ;
ctx . setVariable ( "title" , "RoyalPay风控调查 — " + client . getString ( "short_name" ) ) ;
ctx . setVariable ( "emailsCcs" , bdEmails ) ;
ctx . setVariable ( "emailsTos" , bdEmails ) ;
if ( isSendClient = = 1 ) {
ctx . setVariable ( "emailsTos" , clientEmails ) ;
ctx . setVariable ( "emailsTos" , clientEmails ) ;
ctx . setVariable ( "emailsCcs" , bdEmails ) ;
}
break ;
break ;
}
}
return ctx ;
return ctx ;