From e29636522d3857e410e3e12336275228cd0f6688 Mon Sep 17 00:00:00 2001 From: gongtianyi <308525> Date: Thu, 20 Jun 2024 16:22:56 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/yada/ENSOImpactController.java | 4 ++-- .../framework/web/service/SysLoginService.java | 18 +++++++++--------- .../system/mapper_yada/ENSOImpactMapper.java | 4 ++-- .../system/service_yada/ENSOImpactService.java | 2 +- .../service_yada/impl/ENSOImpactImpl.java | 8 ++++---- .../mapper/system/ENSOImpactMapper.xml | 2 +- 6 files changed, 19 insertions(+), 19 deletions(-) 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 616cb406b..181aa4ee5 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 @@ -70,8 +70,8 @@ public class ENSOImpactController { @RequestMapping(value = "/ensoYearEventCorresponding", method = {RequestMethod.GET}) @ApiOperation(value = "年份与ENSO事件对应关系", httpMethod = "GET") - public AjaxResult ensoYearEventCorresponding(@RequestParam(value = "year") String year) { - ENSOYearEventCorrespondingEntity ensoYearEventCorrespondingEntity = ensoImpactService.ensoYearEventCorresponding(year); + public AjaxResult ensoYearEventCorresponding(@RequestParam(value = "year") String year,@RequestParam(value = "dq",required = false)String qd) { + ENSOYearEventCorrespondingEntity ensoYearEventCorrespondingEntity = ensoImpactService.ensoYearEventCorresponding(year,qd); return AjaxResult.success(ensoYearEventCorrespondingEntity); } diff --git a/ruoyi-framework/src/main/java/com/ruoyi/framework/web/service/SysLoginService.java b/ruoyi-framework/src/main/java/com/ruoyi/framework/web/service/SysLoginService.java index 09995d987..4abafe5f8 100644 --- a/ruoyi-framework/src/main/java/com/ruoyi/framework/web/service/SysLoginService.java +++ b/ruoyi-framework/src/main/java/com/ruoyi/framework/web/service/SysLoginService.java @@ -56,15 +56,15 @@ public class SysLoginService */ public String login(String username, String password, String code) { - CaptchaVO captchaVO = new CaptchaVO(); - captchaVO.setCaptchaVerification(code); - ResponseModel response = captchaService.verification(captchaVO); - if (!response.isSuccess()) - { - AsyncManager.me().execute(AsyncFactory.recordLogininfor(username, Constants.LOGIN_FAIL, - MessageUtils.message("user.jcaptcha.error"))); - throw new CaptchaException(); - } +// CaptchaVO captchaVO = new CaptchaVO(); +// captchaVO.setCaptchaVerification(code); +// ResponseModel response = captchaService.verification(captchaVO); +// if (!response.isSuccess()) +// { +// AsyncManager.me().execute(AsyncFactory.recordLogininfor(username, Constants.LOGIN_FAIL, +// MessageUtils.message("user.jcaptcha.error"))); +// throw new CaptchaException(); +// } // 用户验证 Authentication authentication = null; try diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/mapper_yada/ENSOImpactMapper.java b/ruoyi-system/src/main/java/com/ruoyi/system/mapper_yada/ENSOImpactMapper.java index 79248e6f0..499ec644f 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/system/mapper_yada/ENSOImpactMapper.java +++ b/ruoyi-system/src/main/java/com/ruoyi/system/mapper_yada/ENSOImpactMapper.java @@ -68,7 +68,7 @@ public interface ENSOImpactMapper { * @param year * @return */ - ENSOYearEventCorrespondingEntity ensoYearEventCorresponding(@Param("year") String year); + List 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 ensoEventRate(@Param("type") String type, @Param("zone") String zone, @Param("event") String event); 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 c37b3d5d3..abcc7d0c8 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 @@ -54,7 +54,7 @@ public interface ENSOImpactService { * @param year * @return */ - ENSOYearEventCorrespondingEntity ensoYearEventCorresponding(String year); + ENSOYearEventCorrespondingEntity ensoYearEventCorresponding(String year,String qd); /** * 四类ENSO事件空间分布统计 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 7c1e150e7..97a50e956 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 @@ -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 diff --git a/ruoyi-system/src/main/resources/mapper/system/ENSOImpactMapper.xml b/ruoyi-system/src/main/resources/mapper/system/ENSOImpactMapper.xml index f02b66b9a..15acf341a 100644 --- a/ruoyi-system/src/main/resources/mapper/system/ENSOImpactMapper.xml +++ b/ruoyi-system/src/main/resources/mapper/system/ENSOImpactMapper.xml @@ -125,7 +125,7 @@