Package org.j2cms.model.user

Examples of org.j2cms.model.user.User


      if(entity.getPassword()==null||entity.getPassword().equals(""))
      {
        Struts2Utils.setAttribute("message2", "密码不能为空!");
        return "add";
      }
      User user = setEntityToUser(new User());
      this.userService.save(user);
      return "toList"
    }
    catch (Exception e) {
      e.printStackTrace();
View Full Code Here


      {
        Struts2Utils.setAttribute("message1", "用户名已经被注册!");
        return "register";
      }else
      {
        User user = new User();
        user.setUsername(this.entity.getUsername());
        user.setCheckState(CheckState.noCheck);//默认未审核
        user.setPassword(new MD532().getMD5(this.entity.getPassword()) );
        userService.save(user);
        return "success";     
      }
    }
    catch (Exception e) {
View Full Code Here

      Article article = new Article();
      article.setTitle(i+"关于J2CMS");
      article.setContent("<p>&nbsp;&nbsp;J2CMS是一款JAVAEE平台的开源内容管理系统.继承java强大、稳定、安全、高效、跨平台等多方面的优点,结合mysql数据库开发. 懂html就能建站,提供最便利、合理的使用方式.<br />");
      article.setAuthor("郭涛");
      article.setOrigin("本站");
      article.setUser(new User(1));
      article.setGroup(new Group(5));
      article.setChannel(new Channel(7));
      article.setReleaseDate(new SimpleDateFormat("yyyy-MM-dd").format(new Date()));
      article.setCommentCount(200+i);
      article.setVisitTotal(100+i);
View Full Code Here

    } catch (RuntimeException e) {
      e.printStackTrace();
    }
  }
  @Test public void save(){
    User user = new User();
    user.setRealName("郭涛");
    user.setUsername("admin");
    user.setPassword("admin");
    user.setAddress("湖北武汉");
    user.setCheckState(CheckState.pass);
    userService.save(user);
  }
View Full Code Here

TOP

Related Classes of org.j2cms.model.user.User

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.