| 
					
				 | 
			
			
				@@ -323,7 +323,7 @@ public class StudentPaymentOrderServiceImpl extends BaseServiceImpl<Long, Studen 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         Date date = new Date(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        if (payingOrders.size() == 0) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        if (CollectionUtils.isEmpty(payingOrders)) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             return; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				          
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -352,7 +352,7 @@ public class StudentPaymentOrderServiceImpl extends BaseServiceImpl<Long, Studen 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     @Override 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    @Transactional 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    @Transactional(rollbackFor = Exception.class) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     public OrderCancelModel updateOrderStatus(Date date, StudentPaymentOrder payingOrder) throws Exception { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     	 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         /*HfMerchantConfig hfMerchantConfig = hfMerchantConfigService.queryByTenantId(payingOrder.getTenantId(), payingOrder.getPaymentChannel()); 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -690,7 +690,7 @@ public class StudentPaymentOrderServiceImpl extends BaseServiceImpl<Long, Studen 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     private void closeOrders(List<String> orderNoList) throws Exception { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        if (orderNoList.size() == 0) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        if (CollectionUtils.isEmpty(orderNoList)) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             return; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -700,15 +700,19 @@ public class StudentPaymentOrderServiceImpl extends BaseServiceImpl<Long, Studen 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         List<StudentPaymentOrder> ordersOverTime = findOrdersOverTime(orderNoList, DealStatusEnum.ING, beforeDate); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         for (StudentPaymentOrder order : ordersOverTime) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            BasePaymentService paymentService = paymentServiceContext.getPaymentService(order.getPaymentChannel() + "_" + order.getTenantId()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            if (paymentService == null) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                log.error("关闭订单失败,支付渠道[{}]不支持,订单编号{}", order.getPaymentChannel(), order.getOrderNo()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             try { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                PaymentClose close = paymentService.close(order.getTransNo(), "超时未支付关闭", order.getOrderNo()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 TenantContextHolder.setTenantId(order.getTenantId()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                order.setStatus(DealStatusEnum.FAILED); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                order.setMemo("超时未支付关闭"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                order.setStatus(CLOSE); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                order.setMemo(close.getMsg()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 callOrderCallBack(order); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 TenantContextHolder.clearTenantId(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             } catch (Exception e) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 e.printStackTrace(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                continue; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 |