|
|
@@ -180,13 +180,12 @@ public class BookImplService implements BookService {
|
|
|
|
|
|
@Override
|
|
|
public int updateBookStatus() {
|
|
|
- HotelDict respTime = hotelDictService.getById(1997956735);//响应时间 状态1为10分、2为20分、3为30分
|
|
|
- String times = String.valueOf(respTime.getCode() * 10);
|
|
|
- HotelDict operate = hotelDictService.getById(1997956736);//响应时间 1自动接单 2自动拒单
|
|
|
- String sqlx = " and create_time <= DATE_SUB(NOW(), INTERVAL " + times + " MINUTE) and order_status = 2 ";
|
|
|
+ HotelDict respTime = hotelDictService.getById(1000011001);//响应时间 状态1为10分、2为20分、3为30分
|
|
|
+ HotelDict operate = hotelDictService.getById(1000011002);//响应时间 1自动接单 2自动拒单
|
|
|
+ String sqlx = " and create_time <= DATE_SUB(NOW(), INTERVAL " + respTime.getName() + " MINUTE) and order_status = 2 ";
|
|
|
List<Booking> bookings = bookDao.queryList(sqlx);
|
|
|
AtomicInteger n = new AtomicInteger();
|
|
|
- if (operate.getCode() == 1){
|
|
|
+ if ("1".equals(operate.getName())){
|
|
|
bookings.forEach(booking -> {
|
|
|
List<HouseNumberStatus> list = new ArrayList<>();
|
|
|
//不可入住的房间
|
|
|
@@ -256,7 +255,7 @@ public class BookImplService implements BookService {
|
|
|
ip += "/mhotel/abkchargeback.action";
|
|
|
String finalIp = ip;
|
|
|
bookings.forEach(booking -> {
|
|
|
- Map<String, String> params = new HashMap<String, String>();
|
|
|
+ Map<String, String> params = new HashMap<>();
|
|
|
params.put("bookingId", String.valueOf(booking.getId()));
|
|
|
try {
|
|
|
String msg = HttpUtils.post(finalIp, params);
|