[improvement][project]Optimize certain code structures.

This commit is contained in:
jerryjzhang
2024-09-21 18:13:31 +08:00
parent 4193b84e83
commit ae889bb0ae
8 changed files with 26 additions and 68 deletions

View File

@@ -155,10 +155,10 @@ public class SqlUtils {
private Object getValue(Object value) {
if (value instanceof LocalDate) {
LocalDate localDate = (LocalDate) value;
return localDate.format(DateTimeFormatter.ofPattern(DateUtils.DATE_FORMAT));
return localDate.format(DateTimeFormatter.ofPattern(DateUtils.DEFAULT_DATE_FORMAT));
} else if (value instanceof LocalDateTime) {
LocalDateTime localDateTime = (LocalDateTime) value;
return localDateTime.format(DateTimeFormatter.ofPattern(DateUtils.TIME_FORMAT));
return localDateTime.format(DateTimeFormatter.ofPattern(DateUtils.DEFAULT_TIME_FORMAT));
} else if (value instanceof Date) {
Date date = (Date) value;
return DateUtils.format(date);