@ -69,7 +69,6 @@ public class HighRechargeOrderSchedule {
List < OutRechargeChildOrder > childOrderList = rechargeChildOrderService . getListRechargeChildOrder ( childOrderMap ) ;
System . out . println ( "话费定时任务 -> 判断是否存在已支付订单:订单id:" + order . getId ( ) ) ;
if ( childOrderList . size ( ) = = 0 ) {
Date rechargeTime = order . getCreateTimed ( ) ;
Date currentTime = new Date ( ) ;
@ -77,11 +76,9 @@ public class HighRechargeOrderSchedule {
// 充值时间小于72
if ( hours < 72 ) {
System . out . println ( "话费定时任务 -> 请求慢充:订单id:" + order . getId ( ) ) ;
outRechargeOrderService . pollRequest ( order ) ;
continue ;
}
System . out . println ( "话费定时任务 -> 退款任务" + order . getId ( ) ) ;
outRechargeOrderService . refundOrder ( order . getId ( ) , childOrderList . get ( 0 ) ) ;
}
@ -139,7 +136,7 @@ public class HighRechargeOrderSchedule {
outRechargeOrderService . refundOrder ( outRechargeOrder . getId ( ) , childOrder ) ;
} else {
// -1取消,0充值中 ,1充值成功,2充值失败,3部分成功
if ( objectData . getInteger ( "state" ) = = 2 ) {
if ( objectData . getInteger ( "state" ) = = 2 | | objectData . getInteger ( "state" ) = = - 1 ) {
outRechargeOrderService . refundOrder ( outRechargeOrder . getId ( ) , childOrder ) ;
} else if ( objectData . getInteger ( "state" ) = = 1 ) {
outRechargeOrderService . completeOrder ( outRechargeOrder , childOrder ) ;
@ -159,8 +156,8 @@ public class HighRechargeOrderSchedule {
JSONObject objectData ;
for ( Object objects : objectJSONArray ) {
objectData = ( JSONObject ) objects ;
// -1取消,0充值中 ,1充值成功,2充值失败,3部分成功
if ( objectData . getInteger ( "status" ) = = 2 ) {
// 充值中1成功2失败3已取消4部分充值5缓存订单
if ( objectData . getInteger ( "status" ) = = 2 | | objectData . getInteger ( "status" ) = = 3 ) {
outRechargeOrderService . refundOrder ( outRechargeOrder . getId ( ) , childOrder ) ;
} else if ( objectData . getInteger ( "status" ) = = 1 ) {
outRechargeOrderService . completeOrder ( outRechargeOrder , childOrder ) ;