| | |
| | | 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("请选择证件类型"); |
| | | } |
| | |
| | | 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); |