修改bug

This commit is contained in:
gongtianyi
2024-06-20 16:22:56 +08:00
parent 4dd8ed7a0d
commit e29636522d
6 changed files with 19 additions and 19 deletions

View File

@ -68,7 +68,7 @@ public interface ENSOImpactMapper {
* @param year
* @return
*/
ENSOYearEventCorrespondingEntity ensoYearEventCorresponding(@Param("year") String year);
List<ENSOYearEventCorrespondingEntity> ensoYearEventCorresponding(@Param("year") String year,@Param("dq")String dq);
/**
* ENSO事件与年份对应关系
@ -85,7 +85,7 @@ public interface ENSOImpactMapper {
* @param type
* @return
*/
ENSOEventRateEntity ensoEventRate(@Param("type") String type,
List<ENSOEventRateEntity> ensoEventRate(@Param("type") String type,
@Param("zone") String zone,
@Param("event") String event);

View File

@ -54,7 +54,7 @@ public interface ENSOImpactService {
* @param year
* @return
*/
ENSOYearEventCorrespondingEntity ensoYearEventCorresponding(String year);
ENSOYearEventCorrespondingEntity ensoYearEventCorresponding(String year,String qd);
/**
* 四类ENSO事件空间分布统计

View File

@ -76,14 +76,14 @@ public class ENSOImpactImpl implements ENSOImpactService {
}
@Override
public ENSOYearEventCorrespondingEntity ensoYearEventCorresponding(String year) {
return ensoImpactMapper.ensoYearEventCorresponding(year);
public ENSOYearEventCorrespondingEntity ensoYearEventCorresponding(String year,String qd) {
return ensoImpactMapper.ensoYearEventCorresponding(year,qd).get(0);
}
@Override
public ENSOEventRateEntity ensoEventRate(String type, String zone, String year) {
String event = ensoImpactMapper.ensoYearEventCorresponding(year).getEvent();
return ensoImpactMapper.ensoEventRate(type, zone, event);
String event = ensoImpactMapper.ensoYearEventCorresponding(year,null).get(0).getEvent();
return ensoImpactMapper.ensoEventRate(type, zone, event).get(0);
}
@Override

View File

@ -125,7 +125,7 @@
<select id="ensoYearEventCorresponding" resultMap="ENSO_Year_Event_Corresponding">
select id, year, event, event_en
from enso_year_event_corresponding
where year = #{year}
where year = #{year} <if test="dq!=null and dq!=''"> and event like '${dq}%'</if>
</select>
<select id="ensoEventYearCorresponding" resultMap="ENSO_Year_Event_Corresponding">