| | |
| | | package com.moral.api.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.moral.api.entity.CityAqiMonthly; |
| | | import com.moral.api.mapper.CityAqiMonthlyMapper; |
| | | import com.moral.api.service.CityAqiMonthlyService; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | @Service |
| | | public class CityAqiMonthlyServiceImpl extends ServiceImpl<CityAqiMonthlyMapper, CityAqiMonthly> implements CityAqiMonthlyService { |
| | | |
| | | @Autowired |
| | | CityAqiMonthlyMapper cityAqiMonthlyMapper; |
| | | |
| | | @Override |
| | | public List<CityAqiMonthly> getCityAqiMonthByRegionCodeAndTime(Integer regionCode, Date startDate, Date endDate) { |
| | | QueryWrapper<CityAqiMonthly> queryWrapper = new QueryWrapper<>(); |
| | | queryWrapper.eq("city_code",regionCode); |
| | | queryWrapper.between("time",startDate,endDate); |
| | | return cityAqiMonthlyMapper.selectList(queryWrapper); |
| | | } |
| | | } |