zjh
2025-06-03 37e2d3c73caac445d1d8e229747b439e3719c13b
ltkj-admin/src/main/java/com/ltkj/web/controller/app/CustomerController.java
@@ -121,16 +121,16 @@
        if (!MatchUtils.isMobileNO(tjCustomer.getCusPhone()))
            return AjaxResult.error("手机号错误");
        if (cusIdcard.length() == 18) {
        if (tjCustomer.getIdType().equals("1")) {
            if (!MatchUtils.isIdCard(cusIdcard)) {
                return AjaxResult.error("身份证号码错误");
            }
        }
        if (cusIdcard.length() == 9) {
            if (!MatchUtils.cardValidates(cusIdcard)) {
                return AjaxResult.error("身份证号码错误");
            }
        }
//        if (cusIdcard.length() == 9) {
//            if (!MatchUtils.cardValidates(cusIdcard)) {
//                return AjaxResult.error("身份证号码错误");
//            }
//        }
        LambdaQueryWrapper<TjCustomer> wq = new LambdaQueryWrapper<>();
        wq.eq(TjCustomer::getCusIdcard, cusIdcard);
@@ -146,7 +146,11 @@
        String substring = cusIdcard.substring(cusIdcard.length() - 6);
        substring = DigestUtils.md5DigestAsHex(substring.getBytes());
        tjCustomer.setCusPassword(substring);
        tjCustomer.setCusBrithday(DateUtil.parse(MatchUtils.getBirthDayByIdCard(cusIdcard), "yyyy-MM-dd"));
        try {
            tjCustomer.setCusBrithday(MatchUtils.getBirthDayByIdCard(cusIdcard));
        } catch (Exception e) {
            return AjaxResult.error("身份证号不正确");
        }
        tjCustomer.setCusSex(Long.valueOf(MatchUtils.getSexByIdCard(cusIdcard)));
        tjCustomer.setAge(String.valueOf(MatchUtils.getAgeByIdCard(cusIdcard)));
        tjCustomer.setIdType("1");