Commit f1342095 authored by duanruiming's avatar duanruiming

同比优化

parent 3b121d60
...@@ -334,7 +334,7 @@ public class TrendServiceV2Impl implements TrendServiceV2 { ...@@ -334,7 +334,7 @@ public class TrendServiceV2Impl implements TrendServiceV2 {
LocalDateTime current = vo.getDate(); LocalDateTime current = vo.getDate();
LocalDateTime curDayStart = DateUtil.getLastDayMidNight(current, 0); LocalDateTime curDayStart = DateUtil.getLastDayMidNight(current, 0);
LocalDateTime latDayStart = DateUtil.getLastDayMidNight(current, -7); LocalDateTime latDayStart = DateUtil.getLastDayMidNight(current, -7);
LocalDateTime lastDayEnd = current.plusDays(-1); LocalDateTime lastDayEnd = latDayStart.plusDays(1);
List<StatisticsEventTypeCountTimeVO> currentList = holoEventMapper.selectGreenEventTypeCountTimeList(type, curDayStart, current); List<StatisticsEventTypeCountTimeVO> currentList = holoEventMapper.selectGreenEventTypeCountTimeList(type, curDayStart, current);
List<StatisticsEventTypeCountTimeVO> lastDayList = holoEventMapper.selectGreenEventTypeCountTimeList(type, latDayStart, lastDayEnd); List<StatisticsEventTypeCountTimeVO> lastDayList = holoEventMapper.selectGreenEventTypeCountTimeList(type, latDayStart, lastDayEnd);
setCountDurationRate(currentList, lastDayList); setCountDurationRate(currentList, lastDayList);
...@@ -376,8 +376,8 @@ public class TrendServiceV2Impl implements TrendServiceV2 { ...@@ -376,8 +376,8 @@ public class TrendServiceV2Impl implements TrendServiceV2 {
String type = vo.getType(); String type = vo.getType();
LocalDateTime current = vo.getDate(); LocalDateTime current = vo.getDate();
LocalDateTime curDayStart = DateUtil.getLastDayMidNight(current, 0); LocalDateTime curDayStart = DateUtil.getLastDayMidNight(current, 0);
LocalDateTime latDayStart = DateUtil.getLastDayMidNight(current, -1); LocalDateTime latDayStart = DateUtil.getLastDayMidNight(current, -7);
LocalDateTime lastDayEnd = current.plusDays(-1); LocalDateTime lastDayEnd = latDayStart.plusDays(1);
List<StatisticsEventTypeCountTimeVO> currentList = holoEventMapper.selectCrossEventTypeCountTimeList(type, curDayStart, current); List<StatisticsEventTypeCountTimeVO> currentList = holoEventMapper.selectCrossEventTypeCountTimeList(type, curDayStart, current);
List<StatisticsEventTypeCountTimeVO> lastDayList = holoEventMapper.selectCrossEventTypeCountTimeList(type, latDayStart, lastDayEnd); List<StatisticsEventTypeCountTimeVO> lastDayList = holoEventMapper.selectCrossEventTypeCountTimeList(type, latDayStart, lastDayEnd);
setCountDurationRate(currentList, lastDayList); setCountDurationRate(currentList, lastDayList);
......
...@@ -5,14 +5,11 @@ import net.wanji.common.framework.Constants; ...@@ -5,14 +5,11 @@ import net.wanji.common.framework.Constants;
import net.wanji.common.framework.exception.FeignServiceException; import net.wanji.common.framework.exception.FeignServiceException;
import net.wanji.common.framework.exception.RidException; import net.wanji.common.framework.exception.RidException;
import net.wanji.common.framework.rest.JsonViewObject; import net.wanji.common.framework.rest.JsonViewObject;
import org.apache.catalina.connector.ClientAbortException;
import org.springframework.dao.DuplicateKeyException; import org.springframework.dao.DuplicateKeyException;
import org.springframework.http.HttpStatus;
import org.springframework.http.converter.HttpMessageNotReadableException; import org.springframework.http.converter.HttpMessageNotReadableException;
import org.springframework.validation.FieldError; import org.springframework.validation.FieldError;
import org.springframework.web.bind.MethodArgumentNotValidException; import org.springframework.web.bind.MethodArgumentNotValidException;
import org.springframework.web.bind.annotation.ExceptionHandler; import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.ResponseStatus;
import org.springframework.web.bind.annotation.RestControllerAdvice; import org.springframework.web.bind.annotation.RestControllerAdvice;
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequest;
...@@ -174,10 +171,4 @@ public class GlobalExceptionHandler { ...@@ -174,10 +171,4 @@ public class GlobalExceptionHandler {
return JsonViewObject.newInstance().fail(errorMessage); return JsonViewObject.newInstance().fail(errorMessage);
} }
@ExceptionHandler(value = ClientAbortException.class)
@ResponseStatus(HttpStatus.OK)
public JsonViewObject clientExceptionHandler(ClientAbortException ex) {
log.error("ClientAbortException异常global:{}", ex);
return JsonViewObject.newInstance().success("");
}
} }
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