-
数据库设计0查看全部
-
数据库设计查看全部
-
权限设计与实现查看全部
-
所用技术啊查看全部
-
所用技术查看全部
-
权限细分查看全部
-
public class AjaxResult implements Serializable{ public static final Integer AJAX_STATUS_CODE_SUCCESS = 0; public static final Integer AJAX_STATUS_CODE_WARN = 1; public static final Integer AJAX_STATUS_CODE_ERROR = 2; private Integer statusCode; private String message; public AjaxResult(){ super(); } public static AjaxResult success(){ AjaxResult ajaxResult = new AjaxResult(); ajaxResult.setStatusCode(AJAX_STATUS_CODE_SUCCESS); ajaxResult.setMessage("操作成功!"); return ajaxResult; } public static AjaxResult error(){ AjaxResult ajaxResult = new AjaxResult(); ajaxResult.setStatusCode(AJAX_STATUS_CODE_ERROR); return ajaxResult; } public static AjaxResult warn(){ AjaxResult ajaxResult = new AjaxResult(); ajaxResult.setStatusCode(AJAX_STATUS_CODE_WARN); return ajaxResult; } public AjaxResult(Integer statusCode, String message) { this.statusCode = statusCode; this.message = message; } //省略get/set方法 }查看全部
-
public class NodeAttribute { private String url; private Long id; public NodeAttribute(String url, Long id) { this.url = url; this.id = id; } public String getUrl() { return url; } public void setUrl(String url) { this.url = url; } public Long getId() { return id; } public void setId(Long id) { this.id = id; } }查看全部
-
public class Tree { private List<Node> nodes = new LinkedList<Node>(); private Node root = null;//根节点 public Tree(List<Function> functions){ for(Function function:functions){ Node node = new Node(function.getId(),function.getParentId(),function.getName(),"open", new NodeAttribute(null==function.getUrl()?"":function.getUrl(),function.getId()), function.getSerialNum()); nodes.add(node); if(node.getId()==0){ root = node; } } } public List<Node> build(){ buildTree(root); List<Node> result = new ArrayList<Node>(); result.add(root); return result; } private void buildTree(Node parent){ Node node = null; for(Iterator<Node> ite=nodes.iterator();ite.hasNext();){ node = ite.next(); if(Objects.equals(node.getParentId(), parent.getId())){ parent.getChildren().add(node); buildTree(node); } } } }查看全部
-
import java.util.LinkedList; import java.util.List; public class Node implements Comparable<Node> { private Long id; private Long parentId; private String text; private String state; private NodeAttribute attributes; private List<Node> children = new LinkedList<Node>(); private Integer order;//节点的状态 public Node(Long id, Long parentId, String text, String state, NodeAttribute attributes,Integer order) { this.id = id; this.parentId = parentId; this.text = text; this.state = state; this.attributes = attributes; this.order = order; } //省略get/set方法 public int compareTo(Node o) { if(order>o.order){ return 1; } if(order<o.order){ return -1; } return 0; } }查看全部
-
插入数据返回自动生成的ID查看全部
-
权限控制方式: 1:URL控制 2:code : apache shrio; spring: security查看全部
-
页面的菜单树、用户的信息、用户权限需要缓冲查看全部
-
DTO (Data Transfer Object)数据传输对象 : 控制层与页面之间的数据展示,需要传输多个实体类时,把这些实体类包装成一个实体类,方便传输。查看全部
-
dto查看全部
举报
0/150
提交
取消