Commit a84e09cc by 周晓航

【华莱士】需求查看过去三个月的订单

parent 220288db
......@@ -753,17 +753,13 @@ public class OrderServiceImpl implements Orderservice {
if (endDate == null) {
return ResponseUtil.error(ResponseResult.ORDER_QUERYORDER_ERROR.getCode(), "查询订单结束时间格式不正确");
}
if (isQueryEs(queryOrderVo.getQueryOrderStatus()) && queryOrderEs) {
Date startDateEs = DateUtil.convert2Date(startDateStr, "yyyy-MM-dd");
Date endDateEs = DateUtil.convert2Date(new Date(), "yyyy-MM-dd");
if (startDateEs.getTime() < DateUtil.addMonths(endDateEs, -3).getTime()) {
return ResponseUtil.error(ResponseResult.ORDER_QUERYORDER_ERROR.getCode(), "只能查询3个月内的订单信息");
}
} else {
if (startDate.getTime() < DateUtil.addMonths(new Date(), -4).getTime()) {
Date checkStartDate = DateUtil.convert2Date(startDateStr, "yyyy-MM-dd");
Date checkEndDate = DateUtil.convert2Date(new Date(), "yyyy-MM-dd");
if (checkStartDate.getTime() < DateUtil.addMonths(checkEndDate, -3).getTime()) {
return ResponseUtil.error(ResponseResult.ORDER_QUERYORDER_ERROR.getCode(), "只能查询3个月内的订单信息");
}
}
String userId = userLoginInfoDto.getMemberId();
QueryOrderDto queryOrderDto = BeanUtil.convertBean(queryOrderVo, QueryOrderDto::new);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment