夏文涛 2 years ago
parent
commit
6bbdf34169
1 changed files with 4 additions and 1 deletions
  1. 4 1
      mhotel/src/com/happy/service/impl/BookImplService.java

+ 4 - 1
mhotel/src/com/happy/service/impl/BookImplService.java

@@ -212,8 +212,11 @@ public class BookImplService implements BookService {
 
 
         HotelDict respTime = hotelDictService.getById(1000011001);//响应时间
         HotelDict respTime = hotelDictService.getById(1000011001);//响应时间
         HotelDict operate = hotelDictService.getById(1000011002);//响应时间 1自动接单 2自动拒单
         HotelDict operate = hotelDictService.getById(1000011002);//响应时间 1自动接单 2自动拒单
-        String sqlx = " and create_time <= DATE_SUB(NOW(), INTERVAL " + respTime.getName() + " MINUTE) and order_status = 2 ";
+        String sqlx = " and create_time <= DATE_SUB(NOW(), INTERVAL " + respTime.getName() + " MINUTE) and order_status = 2 and hotel_is_order = 1";
         List<Booking> bookings = bookDao.queryList(sqlx);
         List<Booking> bookings = bookDao.queryList(sqlx);
+
+        System.out.println("自动接单,订单编号"+bookings.stream().map(Booking::getOrderNum)+";拼接条件:"+sqlx);
+
         AtomicInteger n = new AtomicInteger();
         AtomicInteger n = new AtomicInteger();
         if ("1".equals(operate.getName())){
         if ("1".equals(operate.getName())){
             bookings.forEach(booking -> {
             bookings.forEach(booking -> {