1.修改求职者生日验证及参数验证
This commit is contained in:
@@ -49,7 +49,7 @@ public class AppUser extends BaseEntity
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "生日", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
@ApiModelProperty("生日")
|
||||
private LocalDate birthDate;
|
||||
private String birthDate;
|
||||
|
||||
@Excel(name = "学历 对应字典education")
|
||||
@ApiModelProperty("学历 对应字典education")
|
||||
|
||||
@@ -203,4 +203,20 @@ public class DateUtils extends org.apache.commons.lang3.time.DateUtils
|
||||
.atZone(ZONE_ID)
|
||||
.toLocalDateTime();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param dateStr 日期字符串(需符合yyyy-MM-dd格式)
|
||||
* @return 转换后的Date对象,转换失败则返回null
|
||||
*/
|
||||
public static Date stringToDateWithYmd(String dateStr,String format) {
|
||||
if (dateStr == null || dateStr.trim().isEmpty()) {
|
||||
return null;
|
||||
}
|
||||
try {
|
||||
return new SimpleDateFormat(format).parse(dateStr);
|
||||
} catch (ParseException e) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user