Example #1
0
  /** 更新用户信息. */
  @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);
  }
Example #2
0
 /** 更新登录名. */
 private void updateLoginName(CustomerVO vo, Customer cust) {
   User user = userDao.findByLoginName(cust.getMobPhone());
   if (user != null) {
     userDao.updateLoginName(vo.getMobPhone(), cust.getMobPhone());
   }
 }