Browse Source

新生账号激活bug修复

dzx 4 months ago
parent
commit
764066f554

+ 7 - 1
src/main/java/com/xjrsoft/module/banding/service/impl/BandingTaskServiceImpl.java

@@ -679,6 +679,12 @@ public class BandingTaskServiceImpl extends MPJBaseServiceImpl<BandingTaskMapper
 
         // 将字符串解析为LocalDate对象
         DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyyMMdd");
-        return LocalDate.parse(birthdayString, formatter);
+
+        try {
+            LocalDate parse = LocalDate.parse(birthdayString, formatter);
+            return parse;
+        }catch (Exception e){
+            throw new MyException("身份证号填写错误,无法提取出生日期");
+        }
     }
 }