diff --git a/eladmin-system/src/main/java/cn/ysk/cashier/mybatis/service/impl/TbPointsExchangeRecordServiceImpl.java b/eladmin-system/src/main/java/cn/ysk/cashier/mybatis/service/impl/TbPointsExchangeRecordServiceImpl.java index 00071ce7..ccb65cda 100644 --- a/eladmin-system/src/main/java/cn/ysk/cashier/mybatis/service/impl/TbPointsExchangeRecordServiceImpl.java +++ b/eladmin-system/src/main/java/cn/ysk/cashier/mybatis/service/impl/TbPointsExchangeRecordServiceImpl.java @@ -250,7 +250,7 @@ public class TbPointsExchangeRecordServiceImpl extends ServiceImpl= 5")); + .last("and TIMESTAMPDIFF(MINUTE, NOW(), create_time) >= 5")); } } \ No newline at end of file diff --git a/eladmin-system/src/main/java/cn/ysk/cashier/mybatis/service/impl/TbShopTableBookingServiceImpl.java b/eladmin-system/src/main/java/cn/ysk/cashier/mybatis/service/impl/TbShopTableBookingServiceImpl.java index a5980aba..281c63cd 100644 --- a/eladmin-system/src/main/java/cn/ysk/cashier/mybatis/service/impl/TbShopTableBookingServiceImpl.java +++ b/eladmin-system/src/main/java/cn/ysk/cashier/mybatis/service/impl/TbShopTableBookingServiceImpl.java @@ -261,10 +261,16 @@ public class TbShopTableBookingServiceImpl extends ServiceImpl summary(Integer shopId, String[] phoneNos) { - List> list = baseMapper.summaryByPhoneNos(shopId, Arrays.asList(phoneNos)); - Map result = new HashMap<>(phoneNos.length); + List phoneNoList = Arrays.asList(phoneNos).stream().distinct().collect(Collectors.toList()); + List> splits = CollUtil.split(phoneNoList, 10); + List> list = new ArrayList<>(); + for (List split : splits) { + List> subList = baseMapper.summaryByPhoneNos(shopId, split); + list.addAll(subList); + } + Map result = new HashMap<>(phoneNoList.size()); for (String phoneNo : phoneNos) { - Map fillData = new HashMap<>(2); + Map fillData = new HashMap<>(3); fillData.put("consumeOrders", 0); fillData.put("cancelOrders", 0); fillData.put("phoneNumber", phoneNo); @@ -279,7 +285,7 @@ public class TbShopTableBookingServiceImpl extends ServiceImpllambdaUpdate() .set(TbShopTableBooking::getStatus, 999) .eq(TbShopTableBooking::getStatus, 20) - .last("and TIMESTAMPDIFF(MINUTE, booking_time, NOW()) >= timeout_minute")); + .last("and TIMESTAMPDIFF(MINUTE, NOW(), booking_time) >= timeout_minute")); } @Override @@ -288,7 +294,7 @@ public class TbShopTableBookingServiceImpl extends ServiceImpllambdaUpdate() .set(TbShopTableBooking::getStatus, -1) .eq(TbShopTableBooking::getStatus, 999) - .last("and TIMESTAMPDIFF(MINUTE, booking_time, NOW()) >= timeout_minute+15")); + .last("and TIMESTAMPDIFF(MINUTE, NOW(), booking_time) >= timeout_minute+15")); } } \ No newline at end of file