service
public List<DemoVO> queryNum(DemoDTO dto) {
List<DemoVO> list = baseMapper.queryNum(dto);
List<DemoVO> result = new ArrayList<>();
int queryRange = dto.getQueryRange();
if (queryRange == 0 || queryRange == 1){
if (list.size() != 1) {
result.add(DemoVO.getTemp(LocalDate.now().minusDays(1).toString()));
}
} else if (queryRange == 2) {
if (list.size() != dto.getQueryDay()) {
LocalDate now = LocalDate.now();
String startDate = now.minusDays(Long.parseLong(dto.getQueryDay() - 1 + "")).toString();
String endDate = now.toString();
result = this.completeData(1, startDate, endDate, list);
}
} else if (queryRange == 3) {
LocalDate now = LocalDate.now();
int day = now.getDayOfMonth();
if (list.size() != day) {
String startDate = now.minusDays(Long.parseLong(day - 1 + "")).toString();
String endDate = now.toString();
result = this.completeData(1, startDate, endDate, list);
}
} else {
YearMonth now = YearMonth.now();
int month = now.getMonthValue();
if (list.size(