修改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

@ -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);
}

View File

@ -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

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">