|
@@ -16,8 +16,10 @@ import org.apache.http.entity.StringEntity;
|
|
import org.apache.http.impl.client.CloseableHttpClient;
|
|
import org.apache.http.impl.client.CloseableHttpClient;
|
|
import org.apache.http.impl.client.HttpClients;
|
|
import org.apache.http.impl.client.HttpClients;
|
|
import org.apache.http.util.EntityUtils;
|
|
import org.apache.http.util.EntityUtils;
|
|
|
|
+import org.jboss.netty.util.internal.StringUtil;
|
|
import org.springframework.stereotype.Controller;
|
|
import org.springframework.stereotype.Controller;
|
|
import org.springframework.ui.Model;
|
|
import org.springframework.ui.Model;
|
|
|
|
+import org.springframework.util.StringUtils;
|
|
import org.springframework.web.bind.annotation.*;
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
|
|
|
import javax.annotation.Resource;
|
|
import javax.annotation.Resource;
|
|
@@ -26,6 +28,7 @@ import java.util.HashMap;
|
|
import java.util.List;
|
|
import java.util.List;
|
|
import java.util.Map;
|
|
import java.util.Map;
|
|
import java.util.Set;
|
|
import java.util.Set;
|
|
|
|
+import java.util.stream.Collectors;
|
|
|
|
|
|
/**
|
|
/**
|
|
* Created by Admiral on 2018/1/20.
|
|
* Created by Admiral on 2018/1/20.
|
|
@@ -118,6 +121,9 @@ public class OrdinaryController {
|
|
String date = jsonObject.getString("date");
|
|
String date = jsonObject.getString("date");
|
|
List<ReservationVo> list = null;
|
|
List<ReservationVo> list = null;
|
|
list = reservationService.findByRoomId(roomId);
|
|
list = reservationService.findByRoomId(roomId);
|
|
|
|
+ if(!StringUtils.isEmpty(date)){
|
|
|
|
+ list = list.stream().filter(reservationVo->date.equals(reservationVo.getDate())).collect(Collectors.toList());
|
|
|
|
+ }
|
|
return list;
|
|
return list;
|
|
}
|
|
}
|
|
|
|
|