lige
2024-01-26 62a3b99ee38ac963fd7d0d8e411bf9c3827e2946
ltkj-admin/src/main/java/com/ltkj/web/controller/system/TjCustomerController.java
@@ -80,7 +80,6 @@
    public AjaxResult getInfoByIdCard(@RequestParam @ApiParam(value = "客户身份证号") String cusIdcard) {
        if (!"".equals(cusIdcard) && cusIdcard != null) {
            //判断身份证号格式是否正确
            // TODO: 2023/2/10  判断身份证号格式是否正确
//            if(cusIdcard.length()==18){
//                if (! MatchUtils.isIdCard(cusIdcard)) {
//                    return AjaxResult.error("身份证号码错误");
@@ -293,9 +292,10 @@
        if(null !=tjCustomer.getIdType()){
            if(tjCustomer.getIdType().equals("1")){
                b = MatchUtils.isIdCard(cusIdcard);
            }else {
                b = MatchUtils.cardValidate(cusIdcard, tjCustomer.getIdType());
            }
//            else {
//                b = MatchUtils.cardValidate(cusIdcard, tjCustomer.getIdType());
//            }
        }else {
            return AjaxResult.error("请选择证件类型");
        }
@@ -320,7 +320,9 @@
        String substring = cusIdcard.substring(cusIdcard.length() - 6);
        substring = DigestUtils.md5DigestAsHex(substring.getBytes());
        tjCustomer.setCusPassword(substring);
        tjCustomer.setCusBrithday(DateUtil.parse(MatchUtils.getBirthDayByIdCard(tjCustomer.getCusIdcard()), "yyyy-MM-dd"));
        if(tjCustomer.getIdType().equals("1")){
            tjCustomer.setCusBrithday(DateUtil.parse(MatchUtils.getBirthDayByIdCard(tjCustomer.getCusIdcard()), "yyyy-MM-dd"));
        }
        tjCustomer.setCusNumber(0L);
        if (tjCustomerService.save(tjCustomer)) {
            return AjaxResult.success(tjCustomer);