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