/** 更新用户信息. */ @Transactional(readOnly = false) public void updateUserInfo(CustomerVO vo, Customer cust) { if (!cust.getMobPhone().equals(vo.getMobPhone())) { updateLoginName(vo, cust); cust.setMobPhone(vo.getMobPhone()); } if (null != vo.getName()) { cust.setName(vo.getName()); } cust.setLinkman(vo.getLinkman()); cust.setEmail(vo.getEmail()); cust.setQq(vo.getQq()); getDao().save(cust); }
/** 更新登录名. */ private void updateLoginName(CustomerVO vo, Customer cust) { User user = userDao.findByLoginName(cust.getMobPhone()); if (user != null) { userDao.updateLoginName(vo.getMobPhone(), cust.getMobPhone()); } }