|
@@ -13,7 +13,6 @@ import com.tourism.webadmin.app.website.vo.TourGroupPurchaseUserVo;
|
|
|
import com.tourism.webadmin.back.model.TourProjectGroupPurchase;
|
|
|
import com.tourism.webadmin.back.model.TourProjectGroupPurchaseDetail;
|
|
|
import com.tourism.webadmin.back.model.TourUser;
|
|
|
-import com.tourism.webadmin.back.model.TourismDatePrice;
|
|
|
import com.tourism.webadmin.back.service.TourOrderService;
|
|
|
import com.tourism.webadmin.back.service.TourProjectGroupPurchaseDetailService;
|
|
|
import com.tourism.webadmin.back.service.TourProjectGroupPurchaseService;
|
|
@@ -21,11 +20,13 @@ import com.tourism.webadmin.back.service.TourismDatePriceService;
|
|
|
import com.tourism.webadmin.back.vo.TourProjectGroupPurchaseVo;
|
|
|
import io.swagger.v3.oas.annotations.tags.Tag;
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
+import org.apache.commons.lang3.StringUtils;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
|
|
|
-import java.math.BigDecimal;
|
|
|
+import java.text.SimpleDateFormat;
|
|
|
import java.time.ZoneId;
|
|
|
+import java.util.Date;
|
|
|
import java.util.List;
|
|
|
import java.util.Map;
|
|
|
|
|
@@ -64,7 +65,16 @@ public class WebsiteProjectGroupPurchaseController {
|
|
|
if (dto != null) {
|
|
|
PageMethod.startPage(dto.getPageNum(), dto.getPageSize(), dto.getCount());
|
|
|
}
|
|
|
-// dto.setSuccess(0);
|
|
|
+
|
|
|
+ // 判断是不是有出发日期查询条件,如果没传,默认查前后30天的数据
|
|
|
+ if(StringUtils.isBlank(dto.getTravelStartTimeStart()) && StringUtils.isBlank(dto.getTravelStartTimeEnd())) {
|
|
|
+ SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
|
|
+ Date startDate = MyDateUtil.addDays(new Date(), -30);
|
|
|
+ Date endDate = MyDateUtil.addDays(new Date(), 30);
|
|
|
+
|
|
|
+ dto.setTravelStartTimeStart(format.format(startDate));
|
|
|
+ dto.setTravelStartTimeEnd(format.format(endDate));
|
|
|
+ }
|
|
|
TourProjectGroupPurchase tourProjectGroupPurchaseFilter = MyModelUtil.copyTo(dto, TourProjectGroupPurchase.class);
|
|
|
MyOrderParam myOrderParam = new MyOrderParam();
|
|
|
// 如果项目id不为空,说明是项目详情中进行查询的,那么按照出发时间正序排序,如果不为空,则是列表页查询的,按照设定的排序规则进行排序
|