|  |  | @@ -20,6 +20,7 @@ import com.iformall.service.pay.service.pay.PayAdapterService; | 
		
	
		
			
			|  |  |  | import com.iformall.service.pay.service.pay.entity.PayAdapterResult; | 
		
	
		
			
			|  |  |  | import com.iformall.service.pay.service.pay.entity.PayQueryAdapterResult; | 
		
	
		
			
			|  |  |  | import com.iformall.service.pay.service.share.PayShareAdapterService; | 
		
	
		
			
			|  |  |  | import com.iformall.utils.DateUtils; | 
		
	
		
			
			|  |  |  | import lombok.extern.slf4j.Slf4j; | 
		
	
		
			
			|  |  |  | import org.slf4j.Logger; | 
		
	
		
			
			|  |  |  | import org.slf4j.LoggerFactory; | 
		
	
	
		
			
				|  |  | @@ -153,6 +154,7 @@ public class ProductOrderServiceImpl implements ProductOrderService { | 
		
	
		
			
			|  |  |  | productOrder.setPaymentTime(result.getPayTime()); | 
		
	
		
			
			|  |  |  | productOrder.setPayWay(result.getWay()); | 
		
	
		
			
			|  |  |  | productOrder.setOrderStatus(productOrderStatus); | 
		
	
		
			
			|  |  |  | productOrder.setIsOrderStatus(EnumProductOrderStatus.ORDER_STATUS_PENDING_PAYMENT.getCode()); | 
		
	
		
			
			|  |  |  | productOrder.setUpdateDate(new Date()); | 
		
	
		
			
			|  |  |  | int num = productOrderMapper.orderPayUpdStatus(productOrder); | 
		
	
		
			
			|  |  |  | 
 | 
		
	
	
		
			
				|  |  | @@ -234,4 +236,37 @@ public class ProductOrderServiceImpl implements ProductOrderService { | 
		
	
		
			
			|  |  |  | 
 | 
		
	
		
			
			|  |  |  | } | 
		
	
		
			
			|  |  |  | 
 | 
		
	
		
			
			|  |  |  | @Override | 
		
	
		
			
			|  |  |  | public void handldTimeOut(Long id) { | 
		
	
		
			
			|  |  |  | ProductOrder productOrder = productOrderMapper.selectById(id); | 
		
	
		
			
			|  |  |  | if(productOrder == null){ | 
		
	
		
			
			|  |  |  | return; | 
		
	
		
			
			|  |  |  | } | 
		
	
		
			
			|  |  |  | if(!EnumProductOrderStatus.ORDER_STATUS_PENDING_PAYMENT.getCode().equals(productOrder.getOrderStatus())){ | 
		
	
		
			
			|  |  |  | return; | 
		
	
		
			
			|  |  |  | } | 
		
	
		
			
			|  |  |  | Date hourDateBefore = DateUtils.getHourDateBefore(1, new Date()); | 
		
	
		
			
			|  |  |  | if(productOrder.getCreateDate().after(hourDateBefore)){ | 
		
	
		
			
			|  |  |  | 
 | 
		
	
		
			
			|  |  |  | } | 
		
	
		
			
			|  |  |  | PayAdapterService payAdapterService = payServiceFactory.getPayAdapterService(productOrder.getPayVendor()); | 
		
	
		
			
			|  |  |  | EnumProductOrderPayVendor payVendoEnum = EnumProductOrderPayVendor.getEnum(productOrder.getPayVendor()); | 
		
	
		
			
			|  |  |  | 
 | 
		
	
		
			
			|  |  |  | WxAppinfo appinfo = wxAppinfoService.getProjectCAppInfoFromRedis(productOrder.getProjectType(), payVendoEnum.getPlat()); | 
		
	
		
			
			|  |  |  | WxPayAccount payAccount = wxPayAccountService.getByIdFromRedis(appinfo.getPayId()); | 
		
	
		
			
			|  |  |  | ResultData resultData = handleProductOrderByQuery(appinfo,payAccount,productOrder,payAdapterService); | 
		
	
		
			
			|  |  |  | if(ResultData.SUCCESS != resultData.code){ | 
		
	
		
			
			|  |  |  | return; | 
		
	
		
			
			|  |  |  | } | 
		
	
		
			
			|  |  |  | if(!EnumProductOrderStatus.ORDER_STATUS_PENDING_PAYMENT.getCode().equals(productOrder.getProfitSharing())){ | 
		
	
		
			
			|  |  |  | return; | 
		
	
		
			
			|  |  |  | } | 
		
	
		
			
			|  |  |  | 
 | 
		
	
		
			
			|  |  |  | productOrder.setOrderStatus(EnumProductOrderStatus.ORDER_STATUS_OVERTIME_CANCEL.getCode()); | 
		
	
		
			
			|  |  |  | productOrder.setIsOrderStatus(EnumProductOrderStatus.ORDER_STATUS_PENDING_PAYMENT.getCode()); | 
		
	
		
			
			|  |  |  | productOrder.setUpdateDate(new Date()); | 
		
	
		
			
			|  |  |  | int num = productOrderMapper.orderPayUpdStatus(productOrder); | 
		
	
		
			
			|  |  |  | 
 | 
		
	
		
			
			|  |  |  | } | 
		
	
		
			
			|  |  |  | 
 | 
		
	
		
			
			|  |  |  | } |