fix StringUtils依赖
This commit is contained in:
+4
-4
@@ -14,7 +14,7 @@ import java.util.*;
|
|||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
import org.apache.commons.collections4.CollectionUtils;
|
import org.apache.commons.collections4.CollectionUtils;
|
||||||
import org.springframework.util.StringUtils;
|
import org.apache.commons.lang.StringUtils;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 类描述:时间操作定义类
|
* 类描述:时间操作定义类
|
||||||
@@ -605,7 +605,7 @@ public class DateUtils extends PropertyEditorSupport {
|
|||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public void setAsText(String text) throws IllegalArgumentException {
|
public void setAsText(String text) throws IllegalArgumentException {
|
||||||
if (StringUtils.hasText(text)) {
|
if (org.springframework.util.StringUtils.hasText(text)) {
|
||||||
try {
|
try {
|
||||||
if (text.indexOf(":") == -1 && text.length() == 10) {
|
if (text.indexOf(":") == -1 && text.length() == 10) {
|
||||||
setValue(DateUtils.date_sdf.get().parse(text));
|
setValue(DateUtils.date_sdf.get().parse(text));
|
||||||
@@ -685,7 +685,7 @@ public class DateUtils extends PropertyEditorSupport {
|
|||||||
* @Return: boolean
|
* @Return: boolean
|
||||||
*/
|
*/
|
||||||
public static boolean isValidDate(String str){
|
public static boolean isValidDate(String str){
|
||||||
if(org.apache.commons.lang3.StringUtils.isNotBlank(str)){
|
if(StringUtils.isNotBlank(str)){
|
||||||
String dateRegex = "^\\d{4}年\\d{1,2}月\\d{1,2}日";
|
String dateRegex = "^\\d{4}年\\d{1,2}月\\d{1,2}日";
|
||||||
str = str.replace(",",",");
|
str = str.replace(",",",");
|
||||||
String[] strArr = str.split(",");
|
String[] strArr = str.split(",");
|
||||||
@@ -732,6 +732,6 @@ public class DateUtils extends PropertyEditorSupport {
|
|||||||
newStrList.add(newStr);
|
newStrList.add(newStr);
|
||||||
}
|
}
|
||||||
newStrList.sort((t1, t2) -> t1.compareTo(t2)); // 日期增序
|
newStrList.sort((t1, t2) -> t1.compareTo(t2)); // 日期增序
|
||||||
return org.apache.commons.lang3.StringUtils.join(newStrList, ",");
|
return StringUtils.join(newStrList, ",");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user