|
@@ -1,6 +1,7 @@
|
|
|
package org.springblade.archive.utils;
|
|
|
|
|
|
import com.fasterxml.jackson.databind.ObjectMapper;
|
|
|
+import org.apache.commons.lang.StringUtils;
|
|
|
import org.springblade.common.vo.DataVO;
|
|
|
import org.springblade.manager.entity.ArchiveTree;
|
|
|
|
|
@@ -54,6 +55,13 @@ public class FormulaUtil {
|
|
|
* @return
|
|
|
*/
|
|
|
public static LocalDateTime parseStringToLocalDateTime(String strDate, String pattern) {
|
|
|
+ if (StringUtils.isNotEmpty(strDate)) {
|
|
|
+ strDate = strDate.replace(".", "");
|
|
|
+ strDate = strDate.replace("-","");
|
|
|
+ strDate = strDate.replace("年","");
|
|
|
+ strDate = strDate.replace("月","");
|
|
|
+ strDate = strDate.replace("日","");
|
|
|
+ }
|
|
|
DateTimeFormatter formatter = DateTimeFormatter.ofPattern(pattern);
|
|
|
LocalDate date = LocalDate.parse(strDate, formatter);
|
|
|
return LocalDateTime.of(date, LocalTime.MIN);
|