Browse Source

修改未来七天预约接口,修改计算订单金额接口

liu 1 year ago
parent
commit
be6945bd70

+ 2 - 0
src/main/java/com/template/controller/HouseNumberStateController.java

@@ -578,6 +578,8 @@ public class HouseNumberStateController implements HouseNumberStateAPI {
                 LocalDateTime now = LocalDateTime.now();
                 LocalDateTime now = LocalDateTime.now();
                 if (now.isAfter(start)) {
                 if (now.isAfter(start)) {
                     localDateTime= now;
                     localDateTime= now;
+                }else {
+                    localDateTime=start.plusDays(i);
                 }
                 }
             }else {
             }else {
                 localDateTime = start.plusDays(i);
                 localDateTime = start.plusDays(i);

+ 1 - 1
src/main/java/com/template/model/mqtt/MqttConfiguration.java

@@ -1,6 +1,5 @@
 package com.template.model.mqtt;
 package com.template.model.mqtt;
 
 
-import lombok.Data;
 import lombok.Getter;
 import lombok.Getter;
 import lombok.Setter;
 import lombok.Setter;
 import org.springframework.beans.factory.annotation.Value;
 import org.springframework.beans.factory.annotation.Value;
@@ -37,5 +36,6 @@ public class MqttConfiguration {
  
  
     @Value("${mqtt.qos}")
     @Value("${mqtt.qos}")
     private int qos;
     private int qos;
+
     
     
 }
 }

+ 3 - 2
src/main/java/com/template/services/impl/HouseOrderServiceImpl.java

@@ -120,10 +120,11 @@ public class HouseOrderServiceImpl extends ServiceImpl<HouseOrderMapper, HouseOr
             List<HousePrice> housePrices1 = housePriceService.getDatePrice(localDate1, houseId);
             List<HousePrice> housePrices1 = housePriceService.getDatePrice(localDate1, houseId);
 
 
             if ("4".equals(department)) {
             if ("4".equals(department)) {
-                LocalDateTime endS = dateTime1.plusDays(i + 1);
+                LocalDateTime startS = dateTime1.withHour(0).withMinute(0).withSecond(0);
+                LocalDateTime endS = dateTime1.withHour(23).withMinute(59).withSecond(59);
                 LambdaQueryWrapper<ClassSchedule> wrapperCS = new LambdaQueryWrapper<>();
                 LambdaQueryWrapper<ClassSchedule> wrapperCS = new LambdaQueryWrapper<>();
                 wrapperCS.eq(ClassSchedule::getJsgh, users.getCardNumber())
                 wrapperCS.eq(ClassSchedule::getJsgh, users.getCardNumber())
-                        .between(ClassSchedule::getDateTime, dateTime1, endS);
+                        .between(ClassSchedule::getDateTime, startS, endS);
                 List<ClassSchedule> scheduleList = classScheduleService.list(wrapperCS);
                 List<ClassSchedule> scheduleList = classScheduleService.list(wrapperCS);
 
 
                 if (ObjectUtils.isEmpty(scheduleList)) {
                 if (ObjectUtils.isEmpty(scheduleList)) {