Package org.jeecgframework.web.system.pojo.base

Examples of org.jeecgframework.web.system.pojo.base.TSRoleUser


  }

  protected void saveRoleUser(TSUser user, String roleidstr) {
    String[] roleids = roleidstr.split(",");
    for (int i = 0; i < roleids.length; i++) {
      TSRoleUser rUser = new TSRoleUser();
      TSRole role = systemService.getEntity(TSRole.class, roleids[i]);
      rUser.setTSRole(role);
      rUser.setTSUser(user);
      systemService.save(rUser);

    }
  }
View Full Code Here


    TSRole manager = commonDao.findByProperty(TSRole.class, "roleCode",
        "manager").get(0);
    List<TSUser> user = commonDao.loadAll(TSUser.class);
    for (int i = 0; i < user.size(); i++) {
      if (user.get(i).getEmail() != null) {
        TSRoleUser roleuser = new TSRoleUser();
        roleuser.setTSUser(user.get(i));
        roleuser.setTSRole(manager);
        commonDao.saveOrUpdate(roleuser);
      } else {
        TSRoleUser roleuser = new TSRoleUser();
        roleuser.setTSUser(user.get(i));
        roleuser.setTSRole(admin);
        commonDao.saveOrUpdate(roleuser);
      }
      if (user.get(i).getSignatureFile() != null) {
        TSRoleUser roleuser = new TSRoleUser();
        roleuser.setTSUser(user.get(i));
        roleuser.setTSRole(admin);
        commonDao.saveOrUpdate(roleuser);
      }
    }

  }
View Full Code Here

TOP

Related Classes of org.jeecgframework.web.system.pojo.base.TSRoleUser

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.