|  | @@ -14,6 +14,7 @@ import com.yonge.cooleshow.mbg.model.OmsOrder;
 | 
	
		
			
				|  |  |  import com.yonge.cooleshow.mbg.model.OmsOrderExample;
 | 
	
		
			
				|  |  |  import com.yonge.cooleshow.mbg.model.OmsOrderOperateHistory;
 | 
	
		
			
				|  |  |  import com.yonge.cooleshow.admin.service.OmsOrderService;
 | 
	
		
			
				|  |  | +import com.yonge.toolset.base.exception.BizException;
 | 
	
		
			
				|  |  |  import com.yonge.toolset.utils.date.DateUtil;
 | 
	
		
			
				|  |  |  import com.yonge.cooleshow.admin.enums.OrderStatisticalEnum;
 | 
	
		
			
				|  |  |  import org.springframework.beans.factory.annotation.Autowired;
 | 
	
	
		
			
				|  | @@ -84,6 +85,14 @@ public class OmsOrderServiceImpl implements OmsOrderService {
 | 
	
		
			
				|  |  |          record.setStatus(4);
 | 
	
		
			
				|  |  |          OmsOrderExample example = new OmsOrderExample();
 | 
	
		
			
				|  |  |          example.createCriteria().andDeleteStatusEqualTo(0).andIdIn(ids);
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +        List<OmsOrder> omsOrders = orderMapper.selectByExample(example);
 | 
	
		
			
				|  |  | +        long count1 = omsOrders.stream()
 | 
	
		
			
				|  |  | +                               .filter(omsOrder -> omsOrder.getStatus() != 0 && omsOrder.getStatus() != 6)
 | 
	
		
			
				|  |  | +                               .count();
 | 
	
		
			
				|  |  | +        if (count1 != 0) {
 | 
	
		
			
				|  |  | +            throw new BizException("订单不处于待支付状态,不能关闭");
 | 
	
		
			
				|  |  | +        }
 | 
	
		
			
				|  |  |          int count = orderMapper.updateByExampleSelective(record, example);
 | 
	
		
			
				|  |  |          List<OmsOrderOperateHistory> historyList = ids.stream().map(orderId -> {
 | 
	
		
			
				|  |  |              OmsOrderOperateHistory history = new OmsOrderOperateHistory();
 |