diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/yada/ENSOImpactController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/yada/ENSOImpactController.java index 181aa4ee5..b1d9536ce 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/yada/ENSOImpactController.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/yada/ENSOImpactController.java @@ -79,8 +79,9 @@ public class ENSOImpactController { @ApiOperation(value = "四类ENSO事件空间分布统计", httpMethod = "GET") public AjaxResult ensoEventRate(@RequestParam(value = "type") String type, @RequestParam(value = "zone") String zone, - @RequestParam(value = "year") String year) { - ENSOEventRateEntity ensoEventRateEntity = ensoImpactService.ensoEventRate(type, zone, year); + @RequestParam(value = "year") String year, + @RequestParam(value = "dq",required = false) String dq) { + ENSOEventRateEntity ensoEventRateEntity = ensoImpactService.ensoEventRate(type, zone, year,dq); return AjaxResult.success(ensoEventRateEntity); } diff --git a/ruoyi-framework/src/main/java/com/ruoyi/framework/config/SecurityConfig.java b/ruoyi-framework/src/main/java/com/ruoyi/framework/config/SecurityConfig.java index b58af4f19..b31f0f5f6 100644 --- a/ruoyi-framework/src/main/java/com/ruoyi/framework/config/SecurityConfig.java +++ b/ruoyi-framework/src/main/java/com/ruoyi/framework/config/SecurityConfig.java @@ -115,7 +115,7 @@ public class SecurityConfig extends WebSecurityConfigurerAdapter .antMatchers("/*/api-docs").anonymous() .antMatchers("/druid/**").anonymous() // // 除上面外的所有请求全部需要鉴权认证 - .anyRequest().authenticated() + //.anyRequest().authenticated() .and() .headers().frameOptions().disable(); httpSecurity.logout().logoutUrl("/logout").logoutSuccessHandler(logoutSuccessHandler); diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/service_yada/ENSOImpactService.java b/ruoyi-system/src/main/java/com/ruoyi/system/service_yada/ENSOImpactService.java index abcc7d0c8..8542e4cb3 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/system/service_yada/ENSOImpactService.java +++ b/ruoyi-system/src/main/java/com/ruoyi/system/service_yada/ENSOImpactService.java @@ -63,7 +63,7 @@ public interface ENSOImpactService { * @param year * @return */ - ENSOEventRateEntity ensoEventRate(String type,String zone,String year); + ENSOEventRateEntity ensoEventRate(String type,String zone,String year,String dq); /** * 特定年份异常占比 diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/service_yada/impl/ENSOImpactImpl.java b/ruoyi-system/src/main/java/com/ruoyi/system/service_yada/impl/ENSOImpactImpl.java index 97a50e956..ebb68cb5d 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/system/service_yada/impl/ENSOImpactImpl.java +++ b/ruoyi-system/src/main/java/com/ruoyi/system/service_yada/impl/ENSOImpactImpl.java @@ -81,9 +81,9 @@ public class ENSOImpactImpl implements ENSOImpactService { } @Override - public ENSOEventRateEntity ensoEventRate(String type, String zone, String year) { - String event = ensoImpactMapper.ensoYearEventCorresponding(year,null).get(0).getEvent(); - return ensoImpactMapper.ensoEventRate(type, zone, event).get(0); + public ENSOEventRateEntity ensoEventRate(String type, String zone, String year,String dq) { + String event = ensoImpactMapper.ensoYearEventCorresponding(year,dq).get(0).getEvent(); + return ensoImpactMapper.ensoEventRate(type, zone, event).size()==0?null:ensoImpactMapper.ensoEventRate(type, zone, event).get(0); } @Override