@Action( value = "update_setting", results = { @Result( name = SUCCESS, type = Constants.RESULT_NAME_REDIRECT_ACTION, params = {"actionName", "setting"}), @Result(name = INPUT, type = Constants.RESULT_NAME_TILES, location = ".initUpdate_teacher") }) public String updateUserInfo() { BaseUser _user = baseUserDao.findById(getSessionUserId()); if (user.getNickName() != null) _user.setNickName(this.user.getNickName()); if (user.getCardId() != null) _user.setCardId(this.user.getCardId()); if (user.getPic() != null) _user.setPic(this.user.getPic()); if (user.getUserName() != null) _user.setUserName(user.getUserName()); if (StringUtils.isNotBlank(user.getSelfDescription())) { _user.setSelfDescription(user.getSelfDescription()); } _user.setSexy(user.getSexy()); UserAccountInfo userAccountInfoForSave = this.userAccountInfoDao.findByUserId(this.getSessionUserId()); userAccountInfoForSave.setBankName(this.getUserAccountInfo().getBankName()); userAccountInfoForSave.setDisposeName(this.getUserAccountInfo().getDisposeName()); userAccountInfoForSave.setBankAccount(this.getUserAccountInfo().getBankAccount()); userAccountInfoForSave.setUser(_user); userAccountInfoDao.persist(userAccountInfoForSave); baseUserDao.persistAbstract(_user); this.setUser(_user); this.setUserAccountInfo(userAccountInfoForSave); this.setUserToSession(_user); setUserOrg(_user); return SUCCESS; }
@Action( value = "setting", results = { @Result( name = SUCCESS, type = Constants.RESULT_NAME_TILES, location = ".initUpdate_teacher") }) public String initUpdate() { user = baseUserDao.findById(getSessionUserId()); userAccountInfo = userAccountInfoDao.findByUserId(this.getSessionUserId()); return SUCCESS; }