修改bug
This commit is contained in:
parent
4dd8ed7a0d
commit
e29636522d
@ -70,8 +70,8 @@ public class ENSOImpactController {
|
|||||||
|
|
||||||
@RequestMapping(value = "/ensoYearEventCorresponding", method = {RequestMethod.GET})
|
@RequestMapping(value = "/ensoYearEventCorresponding", method = {RequestMethod.GET})
|
||||||
@ApiOperation(value = "年份与ENSO事件对应关系", httpMethod = "GET")
|
@ApiOperation(value = "年份与ENSO事件对应关系", httpMethod = "GET")
|
||||||
public AjaxResult ensoYearEventCorresponding(@RequestParam(value = "year") String year) {
|
public AjaxResult ensoYearEventCorresponding(@RequestParam(value = "year") String year,@RequestParam(value = "dq",required = false)String qd) {
|
||||||
ENSOYearEventCorrespondingEntity ensoYearEventCorrespondingEntity = ensoImpactService.ensoYearEventCorresponding(year);
|
ENSOYearEventCorrespondingEntity ensoYearEventCorrespondingEntity = ensoImpactService.ensoYearEventCorresponding(year,qd);
|
||||||
return AjaxResult.success(ensoYearEventCorrespondingEntity);
|
return AjaxResult.success(ensoYearEventCorrespondingEntity);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -56,15 +56,15 @@ public class SysLoginService
|
|||||||
*/
|
*/
|
||||||
public String login(String username, String password, String code)
|
public String login(String username, String password, String code)
|
||||||
{
|
{
|
||||||
CaptchaVO captchaVO = new CaptchaVO();
|
// CaptchaVO captchaVO = new CaptchaVO();
|
||||||
captchaVO.setCaptchaVerification(code);
|
// captchaVO.setCaptchaVerification(code);
|
||||||
ResponseModel response = captchaService.verification(captchaVO);
|
// ResponseModel response = captchaService.verification(captchaVO);
|
||||||
if (!response.isSuccess())
|
// if (!response.isSuccess())
|
||||||
{
|
// {
|
||||||
AsyncManager.me().execute(AsyncFactory.recordLogininfor(username, Constants.LOGIN_FAIL,
|
// AsyncManager.me().execute(AsyncFactory.recordLogininfor(username, Constants.LOGIN_FAIL,
|
||||||
MessageUtils.message("user.jcaptcha.error")));
|
// MessageUtils.message("user.jcaptcha.error")));
|
||||||
throw new CaptchaException();
|
// throw new CaptchaException();
|
||||||
}
|
// }
|
||||||
// 用户验证
|
// 用户验证
|
||||||
Authentication authentication = null;
|
Authentication authentication = null;
|
||||||
try
|
try
|
||||||
|
@ -68,7 +68,7 @@ public interface ENSOImpactMapper {
|
|||||||
* @param year
|
* @param year
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
ENSOYearEventCorrespondingEntity ensoYearEventCorresponding(@Param("year") String year);
|
List<ENSOYearEventCorrespondingEntity> ensoYearEventCorresponding(@Param("year") String year,@Param("dq")String dq);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* ENSO事件与年份对应关系
|
* ENSO事件与年份对应关系
|
||||||
@ -85,7 +85,7 @@ public interface ENSOImpactMapper {
|
|||||||
* @param type
|
* @param type
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
ENSOEventRateEntity ensoEventRate(@Param("type") String type,
|
List<ENSOEventRateEntity> ensoEventRate(@Param("type") String type,
|
||||||
@Param("zone") String zone,
|
@Param("zone") String zone,
|
||||||
@Param("event") String event);
|
@Param("event") String event);
|
||||||
|
|
||||||
|
@ -54,7 +54,7 @@ public interface ENSOImpactService {
|
|||||||
* @param year
|
* @param year
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
ENSOYearEventCorrespondingEntity ensoYearEventCorresponding(String year);
|
ENSOYearEventCorrespondingEntity ensoYearEventCorresponding(String year,String qd);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 四类ENSO事件空间分布统计
|
* 四类ENSO事件空间分布统计
|
||||||
|
@ -76,14 +76,14 @@ public class ENSOImpactImpl implements ENSOImpactService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public ENSOYearEventCorrespondingEntity ensoYearEventCorresponding(String year) {
|
public ENSOYearEventCorrespondingEntity ensoYearEventCorresponding(String year,String qd) {
|
||||||
return ensoImpactMapper.ensoYearEventCorresponding(year);
|
return ensoImpactMapper.ensoYearEventCorresponding(year,qd).get(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public ENSOEventRateEntity ensoEventRate(String type, String zone, String year) {
|
public ENSOEventRateEntity ensoEventRate(String type, String zone, String year) {
|
||||||
String event = ensoImpactMapper.ensoYearEventCorresponding(year).getEvent();
|
String event = ensoImpactMapper.ensoYearEventCorresponding(year,null).get(0).getEvent();
|
||||||
return ensoImpactMapper.ensoEventRate(type, zone, event);
|
return ensoImpactMapper.ensoEventRate(type, zone, event).get(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -125,7 +125,7 @@
|
|||||||
<select id="ensoYearEventCorresponding" resultMap="ENSO_Year_Event_Corresponding">
|
<select id="ensoYearEventCorresponding" resultMap="ENSO_Year_Event_Corresponding">
|
||||||
select id, year, event, event_en
|
select id, year, event, event_en
|
||||||
from enso_year_event_corresponding
|
from enso_year_event_corresponding
|
||||||
where year = #{year}
|
where year = #{year} <if test="dq!=null and dq!=''"> and event like '${dq}%'</if>
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="ensoEventYearCorresponding" resultMap="ENSO_Year_Event_Corresponding">
|
<select id="ensoEventYearCorresponding" resultMap="ENSO_Year_Event_Corresponding">
|
||||||
|
Loading…
Reference in New Issue
Block a user