| | |
| | | user.setPhone(form.getPhone()); |
| | | user.setRealName(form.getRealName()); |
| | | user.setSex(form.getSex()); |
| | | DateFormat fmt =new SimpleDateFormat("yyyy-MM-dd"); |
| | | try { |
| | | user.setBirthDay(fmt.parse(form.getBirthDay())); |
| | | } catch (ParseException e) { |
| | | throw new RuntimeException(e); |
| | | if (StringUtils.hasText(form.getBirthDay())) { |
| | | DateFormat fmt =new SimpleDateFormat("yyyy-MM-dd"); |
| | | try { |
| | | user.setBirthDay(fmt.parse(form.getBirthDay())); |
| | | } catch (ParseException e) { |
| | | throw new RuntimeException(e); |
| | | } |
| | | } |
| | | user.setLastUpdatePasswordTime(new Date()); |
| | | userMapper.insert(user); |