修改bug
This commit is contained in:
parent
e29636522d
commit
fb972249dc
@ -79,8 +79,9 @@ public class ENSOImpactController {
|
|||||||
@ApiOperation(value = "四类ENSO事件空间分布统计", httpMethod = "GET")
|
@ApiOperation(value = "四类ENSO事件空间分布统计", httpMethod = "GET")
|
||||||
public AjaxResult ensoEventRate(@RequestParam(value = "type") String type,
|
public AjaxResult ensoEventRate(@RequestParam(value = "type") String type,
|
||||||
@RequestParam(value = "zone") String zone,
|
@RequestParam(value = "zone") String zone,
|
||||||
@RequestParam(value = "year") String year) {
|
@RequestParam(value = "year") String year,
|
||||||
ENSOEventRateEntity ensoEventRateEntity = ensoImpactService.ensoEventRate(type, zone, year);
|
@RequestParam(value = "dq",required = false) String dq) {
|
||||||
|
ENSOEventRateEntity ensoEventRateEntity = ensoImpactService.ensoEventRate(type, zone, year,dq);
|
||||||
return AjaxResult.success(ensoEventRateEntity);
|
return AjaxResult.success(ensoEventRateEntity);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -115,7 +115,7 @@ public class SecurityConfig extends WebSecurityConfigurerAdapter
|
|||||||
.antMatchers("/*/api-docs").anonymous()
|
.antMatchers("/*/api-docs").anonymous()
|
||||||
.antMatchers("/druid/**").anonymous()
|
.antMatchers("/druid/**").anonymous()
|
||||||
// // 除上面外的所有请求全部需要鉴权认证
|
// // 除上面外的所有请求全部需要鉴权认证
|
||||||
.anyRequest().authenticated()
|
//.anyRequest().authenticated()
|
||||||
.and()
|
.and()
|
||||||
.headers().frameOptions().disable();
|
.headers().frameOptions().disable();
|
||||||
httpSecurity.logout().logoutUrl("/logout").logoutSuccessHandler(logoutSuccessHandler);
|
httpSecurity.logout().logoutUrl("/logout").logoutSuccessHandler(logoutSuccessHandler);
|
||||||
|
@ -63,7 +63,7 @@ public interface ENSOImpactService {
|
|||||||
* @param year
|
* @param year
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
ENSOEventRateEntity ensoEventRate(String type,String zone,String year);
|
ENSOEventRateEntity ensoEventRate(String type,String zone,String year,String dq);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 特定年份异常占比
|
* 特定年份异常占比
|
||||||
|
@ -81,9 +81,9 @@ public class ENSOImpactImpl implements ENSOImpactService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public ENSOEventRateEntity ensoEventRate(String type, String zone, String year) {
|
public ENSOEventRateEntity ensoEventRate(String type, String zone, String year,String dq) {
|
||||||
String event = ensoImpactMapper.ensoYearEventCorresponding(year,null).get(0).getEvent();
|
String event = ensoImpactMapper.ensoYearEventCorresponding(year,dq).get(0).getEvent();
|
||||||
return ensoImpactMapper.ensoEventRate(type, zone, event).get(0);
|
return ensoImpactMapper.ensoEventRate(type, zone, event).size()==0?null:ensoImpactMapper.ensoEventRate(type, zone, event).get(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
Loading…
Reference in New Issue
Block a user