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

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


    systemService.deleteAllEntitie(roleFunctionList);
    String[] roleFunctions = null;
    if (rolefunction != "") {
      roleFunctions = rolefunction.split(",");
      for (String s : roleFunctions) {
        TSRoleFunction rf = new TSRoleFunction();
        TSFunction f = this.systemService.get(TSFunction.class, Integer.valueOf(s));
        rf.setTSFunction(f);
        rf.setTSRole(role);
        this.systemService.save(rf);
      }
    }
    return "system/role/roleList";
  }
View Full Code Here


   * @param functionid
   * @param ids
   */
  public void savep(String roleid, String functionid, String ids) {
    String hql = "from TRoleFunction t where" + " t.TSRole.id=" + roleid + " " + "and t.TFunction.functionid=" + functionid;
    TSRoleFunction rFunction = systemService.singleResult(hql);
    if (rFunction != null) {
      rFunction.setOperation(ids);
      systemService.saveOrUpdate(rFunction);
    }
  }
View Full Code Here

    List<TSRoleFunction> deleteEntitys = new ArrayList<TSRoleFunction>();
    for (String s : set) {
      if(map.containsKey(s)){
        map.remove(s);
      }else{
        TSRoleFunction rf = new TSRoleFunction();
        TSFunction f = this.systemService.get(TSFunction.class,s);
        rf.setTSFunction(f);
        rf.setTSRole(role);
        entitys.add(rf);
      }
    }
    Collection<TSRoleFunction> collection = map.values();
    Iterator<TSRoleFunction> it = collection.iterator();
View Full Code Here

    cq.eq("TSRole.id",roleId);
    cq.eq("TSFunction.id",functionid);
    cq.add();
    List<TSRoleFunction> rFunctions =systemService.getListByCriteriaQuery(cq,false);
    if (rFunctions.size() > 0) {
      TSRoleFunction roleFunction = rFunctions.get(0);
      roleFunction.setOperation(ids);
      systemService.saveOrUpdate(roleFunction);
    }
  }
View Full Code Here

    cq1.eq("TSRole.id",roleId);
    cq1.eq("TSFunction.id",functionId);
    cq1.add();
    List<TSRoleFunction> rFunctions =systemService.getListByCriteriaQuery(cq1,false);
    if(null!=rFunctions && rFunctions.size()>0){
      TSRoleFunction tsRoleFunction =  rFunctions.get(0);
      tsRoleFunction.setOperation(operationcodes);
      systemService.saveOrUpdate(tsRoleFunction);
    }
    j.setMsg("按钮权限更新成功");
    return j;
  }
View Full Code Here

        "admin").get(0);
    TSRole manager = commonDao.findByProperty(TSRole.class, "roleCode",
        "manager").get(0);
    List<TSFunction> list = commonDao.loadAll(TSFunction.class);
    for (int i = 0; i < list.size(); i++) {
      TSRoleFunction adminroleFunction = new TSRoleFunction();
      TSRoleFunction managerFunction = new TSRoleFunction();
      adminroleFunction.setTSFunction(list.get(i));
      managerFunction.setTSFunction(list.get(i));
      adminroleFunction.setTSRole(admin);
      managerFunction.setTSRole(manager);
      if (list.get(i).getFunctionName().equals("Demo示例")) {
        adminroleFunction.setOperation("add,szqm,");
      }
      commonDao.saveOrUpdate(adminroleFunction);
      commonDao.saveOrUpdate(managerFunction);
View Full Code Here

        String[] opStrings = {};
        List<TSRoleFunction> roleFunctions = findByProperty(TSRoleFunction.class, "TSFunction.id", id);

        if (roleFunctions.size() > 0) {
          for (TSRoleFunction tRoleFunction : roleFunctions) {
            TSRoleFunction roleFunction = tRoleFunction;
            if (roleFunction.getTSRole().getId().toString().equals(treeGridModel.getRoleid())) {
              String bbString = roleFunction.getOperation();
              if (bbString != null) {
                opStrings = bbString.split(",");
                break;
              }
            }
View Full Code Here

    cq1.eq("TSRole.id", role.getId());
    cq1.eq("TSFunction.id", functionId);
    cq1.add();
    List<TSRoleFunction> rFunctions = getListByCriteriaQuery(cq1, false);
    if (null != rFunctions && rFunctions.size() > 0) {
      TSRoleFunction tsRoleFunction = rFunctions.get(0);
      if (null != tsRoleFunction.getOperation()) {
        String[] operationArry = tsRoleFunction.getOperation().split(",");
        for (int i = 0; i < operationArry.length; i++) {
          operationCodes.add(operationArry[i]);
        }
      }
    }
View Full Code Here

      cq1.eq("TSRole.id", role.getId());
      cq1.eq("TSFunction.id", functionId);
      cq1.add();
      List<TSRoleFunction> rFunctions = getListByCriteriaQuery(cq1, false);
      if (null != rFunctions && rFunctions.size() > 0) {
        TSRoleFunction tsRoleFunction = rFunctions.get(0);
        if (null != tsRoleFunction.getOperation()) {
          String[] operationArry = tsRoleFunction.getOperation().split(",");
          for (int i = 0; i < operationArry.length; i++) {
            operationCodes.add(operationArry[i]);
          }
        }
      }
View Full Code Here

TOP

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

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.