コード例 #1
0
 public void Process()
 {
     try
     {
         List <OnlineOrder> models = OnlineOrderServices.QueryBySyncPayResultFail();
         foreach (var item in models)
         {
             int index = item.SyncResultTimes == 0?0:item.SyncResultTimes - 1;
             if (index > 5)
             {
                 continue;
             }
             if (item.LastSyncResultTime.AddSeconds(IntervalTime[index]) < DateTime.Now)
             {
                 OnlineOrderServices.AgainSyncPayResult(item.OrderID, item.RealPayTime);
             }
         }
     }
     catch (Exception ex) {
         ExceptionsServices.AddExceptionToDbAndTxt("Background", "后台工作线程同步处理支付结果失败", ex, LogFrom.WeiXin);
     }
 }