mirror of
https://gitee.com/wkeyuan/DWSurvey.git
synced 2024-11-30 02:58:55 +08:00
防止日期为空符出错
This commit is contained in:
parent
b050992a8b
commit
e71f03123f
@ -15,6 +15,7 @@ import com.key.dwsurvey.service.SurveyReqUrlManager;
|
||||
import com.key.dwsurvey.service.SurveyStyleManager;
|
||||
import com.opensymphony.xwork2.ActionSupport;
|
||||
import org.apache.commons.lang.time.DateUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.apache.struts2.ServletActionContext;
|
||||
import org.apache.struts2.convention.annotation.*;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
@ -197,7 +198,7 @@ public class MySurveyDesignAction extends ActionSupport{
|
||||
}
|
||||
if(ynEndTime!=null && !"".equals(ynEndTime)){
|
||||
surveyDetail.setYnEndTime(Integer.parseInt(ynEndTime));
|
||||
if(endTime!=null){
|
||||
if(StringUtils.isNotEmpty(endTime)){
|
||||
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
||||
surveyDetail.setEndTime(simpleDateFormat.parse(endTime));
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user