jiangping
2024-05-11 3a0712a70ab0f97b4190842c33d27ba8d0d6cec3
server/service/src/main/java/com/doumee/core/utils/Constants.java
@@ -156,6 +156,7 @@
    }
    public static long getAgeByIdCard(String idCard){
        try {
        int birthYear = Integer.parseInt(idCard.substring(6, 10));
        int birthMonth = Integer.parseInt(idCard.substring(10, 12));
        int birthDay = Integer.parseInt(idCard.substring(12, 14));
@@ -167,7 +168,10 @@
        }catch (Exception e){
            throw new BusinessException(ResponseStatus.BAD_REQUEST.getCode(),"身份证号码错误:"+idCard);
        }
        }catch (Exception e){
        }
        return 0;
    }