From 193f290729968952aba5bcb949b5d1f572bea304 Mon Sep 17 00:00:00 2001
From: 无关风月 <443237572@qq.com>
Date: 星期三, 05 十一月 2025 09:04:26 +0800
Subject: [PATCH] bug修改
---
cloud-server-other/src/main/java/com/dsh/other/service/impl/SiteServiceImpl.java | 23 +++++++++++++++++++----
1 files changed, 19 insertions(+), 4 deletions(-)
diff --git a/cloud-server-other/src/main/java/com/dsh/other/service/impl/SiteServiceImpl.java b/cloud-server-other/src/main/java/com/dsh/other/service/impl/SiteServiceImpl.java
index 89d94a6..1bb2d1f 100644
--- a/cloud-server-other/src/main/java/com/dsh/other/service/impl/SiteServiceImpl.java
+++ b/cloud-server-other/src/main/java/com/dsh/other/service/impl/SiteServiceImpl.java
@@ -281,6 +281,7 @@
querySiteTimes.setSelectCount(0);
querySiteTimes.setSelectMaxCount(site.getWalkinCapacity());
querySiteTimes.setIsReserve(0);
+ querySiteTimes.setTimeAfter(0);
querySiteTimes.setCashPrice(tSitePrice.getCashPrice());
querySiteTimes.setCoinPrice(tSitePrice.getCoinPrice());
String temp = tSitePrice.getStartTime().substring(0, tSitePrice.getStartTime().length() - 3) + "-" + tSitePrice.getEndTime().substring(0, tSitePrice.getEndTime().length() - 3);
@@ -313,6 +314,11 @@
count++;
}
}
+ if (querySiteTimes.getSelectable() == 1&&end.before(now)){
+ querySiteTimes.setSelectable(0);
+ querySiteTimes.setTimeAfter(1);
+
+ }
querySiteTimes.setSelectCount(count);
if (flag == 0 && querySiteTimes.getSelectable() == 1) {
// 当前时间段还没有预约
@@ -321,10 +327,19 @@
System.err.println("预约人数" + count);
System.err.println("最大散客容纳数" + walkinCapacity);
if (walkinCapacity <= count) {
- // 不可预约 也不能散客
- System.err.println("不可预约 也不能散客");
- querySiteTimes.setSelectable(0);
- querySiteTimes.setIsReserve(0);
+ if (targetAudience==1 && walkinCapacity!=0){
+ // 不可预约
+ System.err.println("不可预约 也不能散客");
+ querySiteTimes.setSelectable(0);
+ querySiteTimes.setIsReserve(0);
+ }else if (targetAudience==2){
+ // 不能散客
+ System.err.println("不可预约 也不能散客");
+ querySiteTimes.setSelectable(0);
+ querySiteTimes.setIsReserve(0);
+ }else{
+ querySiteTimes.setSelectable(1);
+ }
}else{
if (targetAudience==2){
// 散客只能预约当前时间段
--
Gitblit v1.7.1