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

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


    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);
      }
    }
View Full Code Here


            rs=st.executeQuery(sql7);
            List function = new ArrayList();
            i=1;
            while(rs.next())
            {
                 TSFunction tsFunction = new TSFunction();
                 tsFunction.setId(i+"");
                 tsFunction.setFunctionName(rs.getString("functionName"));
                 tsFunction.setFunctionUrl(rs.getString("functionUrl"));
                 tsFunction.setFunctionLevel(rs.getShort("functionLevel"));
                 tsFunction.setFunctionOrder(rs.getString("functionOrder"));
                 function.add(tsFunction);
                 i++;
            }
            root.put("menu", function);
           
View Full Code Here

  public int compare(Object obj1, Object obj2) {
    String o1 = "";
    String o2 = "";
    if (ignoreCase) {
      TSFunction c1 = (TSFunction) obj1;
      TSFunction c2 = (TSFunction) obj2;
      o1 = c1.getFunctionOrder();
      o2 = c2.getFunctionOrder();
    }
    if (o1 != null && o2 != null) {
      for (int i = 0; i < o1.length(); i++) {
        if (i == o1.length() && i < o2.length()) {
          return -1;
View Full Code Here

          menuKey.append(KEY_SPLIT);
          menuKey.append(autoMenu.level() == null ? "" : autoMenu.level());
          menuKey.append(KEY_SPLIT);
          menuKey.append(autoMenu.url() == null ? "" : autoMenu.url());
         
          TSFunction function = null;
          //判断菜单map的key是否包含当前key,不包含则插入一条菜单数据
          if (!functionMap.containsKey(menuKey.toString())) {
            function = new TSFunction();
            function.setFunctionName(autoMenu.name());
            function.setFunctionIframe(null);
            function.setFunctionLevel(Short.valueOf(autoMenu.level()));
            function.setFunctionOrder(Integer.toString(autoMenu.order()));
            function.setFunctionUrl(autoMenu.url());
            function.setTSFunction(null);
           
            String iconId = autoMenu.icon();
            if (StringUtil.isNotEmpty(iconId)) {
              Object obj = this.get(TSIcon.class, iconId);
              if(obj!=null){
                function.setTSIcon((TSIcon)obj);
              }else{
                function.setTSIcon(null);
              }
            } else {
              function.setTSIcon(null);
            }
            Serializable id = this.save(function);
            function.setId(id.toString());
          } else {
            function = functionMap.get(menuKey.toString());
          }
           
          //获取该类的所有方法
          Method[] methods = clazz.getDeclaredMethods();
          for(Method method : methods){
            //判断当前方法是否设置了菜单操作按钮注解
            if (method.isAnnotationPresent(AutoMenuOperation.class)) {
              AutoMenuOperation autoMenuOperation = method.getAnnotation(AutoMenuOperation.class);
              //操作码必须填写,否则不进行菜单操作按钮的匹配
              if (StringUtil.isNotEmpty(autoMenuOperation.code())) {
                StringBuffer menuOperationKey = new StringBuffer();
                menuOperationKey.append(function == null ? "" : function.getId());
                menuOperationKey.append(KEY_SPLIT);
               
                String code = "";
                //设置code前缀
                if (autoMenuOperation.codeType() == MenuCodeType.TAG) {
View Full Code Here

  // ----------------------------------------------------------------
  // ----------------------------------------------------------------
 
  public void flushRoleFunciton(String id, TSFunction newFunction) {
    TSFunction functionEntity = this.getEntity(TSFunction.class, id);
    if (functionEntity.getTSIcon() == null || !StringUtil.isNotEmpty(functionEntity.getTSIcon().getId())) {
      return;
    }
    TSIcon oldIcon = this.getEntity(TSIcon.class, functionEntity.getTSIcon().getId());
    if (!oldIcon.getIconClas().equals(newFunction.getTSIcon().getIconClas())) {
      // 刷新缓存
      HttpSession session = ContextHolderUtils.getSession();
      TSUser user = ResourceUtil.getSessionUserName();
      List<TSRoleUser> rUsers = this.findByProperty(TSRoleUser.class, "TSUser.id", user.getId());
View Full Code Here

TOP

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

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.