@ -30,6 +30,8 @@ import org.apache.http.client.methods.HttpPost;
import org.apache.http.entity.StringEntity ;
import org.apache.http.impl.client.CloseableHttpClient ;
import org.apache.http.util.EntityUtils ;
import org.slf4j.Logger ;
import org.slf4j.LoggerFactory ;
import org.springframework.stereotype.Service ;
import org.springframework.transaction.annotation.Isolation ;
import org.springframework.transaction.annotation.Propagation ;
@ -41,10 +43,13 @@ import java.math.BigDecimal;
import java.math.RoundingMode ;
import java.text.SimpleDateFormat ;
import java.util.* ;
import java.util.concurrent.TimeUnit ;
@Service ( "outRechargeOrderService" )
public class OutRechargeOrderServiceImpl implements OutRechargeOrderService {
private static final Logger log = LoggerFactory . getLogger ( OutRechargeOrderServiceImpl . class ) ;
@Resource
private OutRechargeOrderMapper outRechargeOrderMapper ;
@ -141,7 +146,7 @@ public class OutRechargeOrderServiceImpl implements OutRechargeOrderService {
DateUtil . format ( MapUtils . getString ( map , "createTimeE" ) , "yyyy-MM-dd HH:mm:ss" ) ) ;
}
example . setOrderByClause ( "create_timed desc " ) ;
example . setOrderByClause ( "create_timed ASC " ) ;
return outRechargeOrderMapper . selectByExample ( example ) ;
}
@ -729,7 +734,7 @@ public class OutRechargeOrderServiceImpl implements OutRechargeOrderService {
// 查询充值产品
OutRechargePriceModel outRechargePrice = outRechargePriceService . findById ( outRechargeOrder . getGoodsId ( ) , null ) ;
System . out . println ( "话费定时任务 -> 需要重新充值:开始" ) ;
// 查询充值子订单
Map < String , Object > childOrderMap = new HashMap < > ( ) ;
@ -756,8 +761,8 @@ public class OutRechargeOrderServiceImpl implements OutRechargeOrderService {
// 查询充值子订单
Map < String , Object > childOrderMap103 = new HashMap < > ( ) ;
childOrderMap . put ( "parent_order_id" , outRechargeOrder . getId ( ) ) ;
childOrderMap . put ( "status" , 103 ) ;
childOrderMap103 . put ( "parent_order_id" , outRechargeOrder . getId ( ) ) ;
childOrderMap103 . put ( "status" , 103 ) ;
List < OutRechargeChildOrder > childOrderList103 = outRechargeChildOrderService . getListRechargeChildOrder ( childOrderMap103 ) ;
if ( childOrderList103 . size ( ) > 0 ) {
@ -785,12 +790,12 @@ public class OutRechargeOrderServiceImpl implements OutRechargeOrderService {
for ( String s : rechargePlatform ) {
// 尖椒充值
System . out . println ( "话费定时任务 -> 需要重新充值:尖椒开始" ) ;
if ( s . equals ( "1" ) & & type = = 1 ) {
object . put ( "out_order_id" , orderNo ) ;
object . put ( "amount" , outRechargePrice . getRechargePrice ( ) ) ;
object . put ( "mobile" , outRechargeOrder . getRechargeContent ( ) ) ;
object . put ( "notifyUrl" , CommonSysConst . getSysConfig ( ) . getJjNotifyUrl ( ) ) ;
System . out . println ( "outRechargeOrder-----------------------------------------------------------------------------------------------------------------------------------------------------" + outRechargePrice . getRechargeType ( ) ) ;
if ( outRechargeOrder . getRechargeType ( ) = = 1 ) {
object . put ( "is_fast" , 1 ) ;
}
@ -806,12 +811,12 @@ public class OutRechargeOrderServiceImpl implements OutRechargeOrderService {
}
// 龙阅充值
if ( s . equals ( "2" ) & & type = = 2 ) {
System . out . println ( "话费定时任务 -> 需要重新充值:龙阅开始" ) ;
object . put ( "out_trade_num" , orderNo ) ;
object . put ( "product_id" , outRechargePrice . getGoodsId ( ) ) ;
object . put ( "mobile" , outRechargeOrder . getRechargeContent ( ) ) ;
object . put ( "notifyUrl" , CommonSysConst . getSysConfig ( ) . getLyNotifyUrl ( ) ) ;
JSONObject returnObject = RechargeConfig . rechargeOrderByLy ( object ) ;
System . out . println ( "龙阅请求回调地址---------------------" + CommonSysConst . getSysConfig ( ) . getLyNotifyUrl ( ) ) ;
object . put ( "return_content" , returnObject ) ;
if ( returnObject ! = null & & returnObject . getLong ( "errno" ) = = 0 ) {
childOrder . setStatus ( 102 ) ;
@ -852,6 +857,7 @@ public class OutRechargeOrderServiceImpl implements OutRechargeOrderService {
outRechargeOrder . setRechargeStatus ( 204 ) ;
}
outRechargeOrderService . updateOrder ( outRechargeOrder ) ;
System . out . println ( "话费定时任务 -> 需要重新充值:结束" ) ;
}
@Override