You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
34 lines
1.1 KiB
34 lines
1.1 KiB
package com.mh.system.mapper; |
|
|
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
|
import com.mh.common.core.domain.dto.WeatherDataDTO; |
|
import com.mh.common.core.domain.entity.WeatherData; |
|
import org.apache.ibatis.annotations.Mapper; |
|
import org.apache.ibatis.annotations.Param; |
|
import org.apache.ibatis.annotations.Select; |
|
|
|
import java.util.List; |
|
|
|
/** |
|
* @author LJF |
|
* @version 1.0 |
|
* @project EEMCS |
|
* @description 天气服务mapper |
|
* @date 2025-03-30 11:03:51 |
|
*/ |
|
@Mapper |
|
public interface WeatherDataMapper extends BaseMapper<WeatherData> { |
|
|
|
@Select("select * from weather_data where report_time::date = #{date}::date order by report_time desc limit 1") |
|
WeatherData selectWeatherDataByDate(@Param("date") String date); |
|
|
|
@Select("select " + |
|
" * " + |
|
"from " + |
|
" vw_weather_daily_summary " + |
|
"where " + |
|
" weather_date between date(#{startTime}) and date(#{endTime}) " + |
|
"order by " + |
|
" weather_date ") |
|
List<WeatherDataDTO> getWeatherTemp(@Param("startTime") String startTime, @Param("endTime") String endTime); |
|
}
|
|
|