Exemplo n.º 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")));
   }
 }
Exemplo n.º 2
0
 public String resetPassword() throws Exception {
   boolean flag = userService.resetPassword(getId(), Tools.encodePassword(p("password")));
   jo.put("success", flag);
   return render(jo);
 }
Exemplo n.º 3
0
 // 打印到控制台
 private void printLogMsg(String contents) {
   Tools.println(contents);
 }