예제 #1
0
 protected void setEntity(User user) {
   user.setName(p("userName"));
   user.setDisplayName(p("userDisplayName"));
   user.setEmployee(AdminHelper.toEmployee(p("employee")));
   // 修改时不改变密码
   if (StringUtils.isNotEmpty(p("password"))) {
     user.setPassword(Tools.encodePassword(p("password")));
   }
 }
예제 #2
0
 public String resetPassword() throws Exception {
   boolean flag = userService.resetPassword(getId(), Tools.encodePassword(p("password")));
   jo.put("success", flag);
   return render(jo);
 }