Commit 80a2ac11 by zhangxingmin

push

parent a1183e83
......@@ -75,6 +75,7 @@ public enum CommonEnum {
UID_TYPE_PREMIUM_RECONCILIATION("premium_reconciliation","保费对账记录表"),
UID_TYPE_PREMIUM_REMITTANCE("premium_remittance","保费对账-汇款记录表"),
UID_TYPE_PREMIUM_REMITTANCE_FILE("premium_remittance_file","保费对账-汇款记录附件表"),
UID_TYPE_REL_OBJECT_CERTIFICATE("rel_object_certificate","对象证件关系表"),
//作用域枚举
SCOPE_SYS("1","系统级(全局)"),
......
......@@ -54,6 +54,6 @@ public class ChineseTextConverter {
}
public static void main(String[] args) {
System.out.println(traditionalToSimplified("大學或以上"));
System.out.println(simplifiedToTraditional("联络电话"));
}
}
\ No newline at end of file
......@@ -7,6 +7,7 @@ import com.fasterxml.jackson.databind.JsonDeserializer;
import java.io.IOException;
import java.time.LocalDateTime;
import java.time.format.DateTimeFormatter;
import java.time.format.DateTimeParseException;
public class CustomLocalDateTimeDeserializer extends JsonDeserializer<LocalDateTime> {
......@@ -20,11 +21,17 @@ public class CustomLocalDateTimeDeserializer extends JsonDeserializer<LocalDateT
return null;
}
// 如果字符串长度只有10(即"yyyy-MM-dd"),则拼接" 00:00:00"
if (text.length() == 10) {
text = text + " 00:00:00";
}
try {
// 先尝试解析完整的时间格式
return LocalDateTime.parse(text, DATE_TIME_FORMATTER);
} catch (DateTimeParseException e1) {
try {
// 如果失败,尝试解析日期格式并添加时间
return LocalDateTime.parse(text + " 00:00:00", DATE_TIME_FORMATTER);
} catch (DateTimeParseException e2) {
// 如果都失败,抛出异常
throw new IOException("Failed to parse LocalDateTime from: " + text, e2);
}
}
}
}
\ No newline at end of file
......@@ -60,8 +60,8 @@ public class RandomStringGenerator {
// String random32 = generate(32, false);
// System.out.println("32位: " + random32);
for (int i = 0; i < 6; i++) {
System.out.println(generateBizId16("client_user"));
for (int i = 0; i < 9; i++) {
System.out.println(generateBizId16("cffp_poster"));
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment