示例#1
0
 /** 用户注册 */
 public void register(WebRequest request, WebResponse response) {
   User user = request.parameterToEntity(User.class);
   user.setRegistDt(new Date());
   user.setStatus(SystemConstant.STATUS_AVAILABLE);
   userService.save(user);
 }
示例#2
0
 /** 检查帐户是否可用 */
 public void accountAvailable(WebRequest request, WebResponse response) {
   User user = new User();
   user.setUsername(request.getParameter("username"));
   response.write(String.valueOf(userService.accountAvailable(user)));
 }