change
This commit is contained in:
@@ -18,6 +18,8 @@
|
||||
package org.maxkey.entity;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Base64;
|
||||
|
||||
import javax.persistence.Column;
|
||||
import javax.persistence.Entity;
|
||||
import javax.persistence.GeneratedValue;
|
||||
@@ -43,6 +45,7 @@ public class AccountsStrategy extends JpaBaseEntity implements Serializable {
|
||||
@Column
|
||||
private String appId;
|
||||
private byte[] appIcon;
|
||||
private String appIconBase64;
|
||||
@Column
|
||||
private String appName;
|
||||
@Column
|
||||
@@ -185,6 +188,14 @@ public class AccountsStrategy extends JpaBaseEntity implements Serializable {
|
||||
return appIcon;
|
||||
}
|
||||
|
||||
public String getAppIconBase64() {
|
||||
return appIconBase64;
|
||||
}
|
||||
|
||||
public void setAppIconBase64(String appIconBase64) {
|
||||
this.appIconBase64 = appIconBase64;
|
||||
}
|
||||
|
||||
public void setAppIcon(byte[] appIcon) {
|
||||
this.appIcon = appIcon;
|
||||
}
|
||||
@@ -221,6 +232,15 @@ public class AccountsStrategy extends JpaBaseEntity implements Serializable {
|
||||
this.instName = instName;
|
||||
}
|
||||
|
||||
|
||||
public void transIconBase64() {
|
||||
if(this.appIcon !=null) {
|
||||
this.appIconBase64 = "data:image/png;base64," +
|
||||
Base64.getEncoder().encodeToString(appIcon);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
StringBuilder builder = new StringBuilder();
|
||||
|
||||
@@ -84,7 +84,7 @@ public class Synchronizers extends JpaBaseEntity implements Serializable {
|
||||
String modifiedDate;
|
||||
@Column
|
||||
String status;
|
||||
|
||||
@Column
|
||||
String service;
|
||||
|
||||
@Column
|
||||
|
||||
@@ -13,46 +13,56 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
|
||||
package org.maxkey.web.component;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
|
||||
/**
|
||||
* 数控件节点列表
|
||||
* 列表的元素为HashMap<String,Object>
|
||||
* 数控件节点列表 列表的元素为TreeNode
|
||||
*
|
||||
* @author Crystal.Sea
|
||||
*
|
||||
*/
|
||||
public class TreeNodeList {
|
||||
|
||||
ArrayList<HashMap<String,Object>> treeNodeList=new ArrayList<HashMap<String,Object>>();
|
||||
public class TreeAttributes {
|
||||
|
||||
/**
|
||||
* 获取列表
|
||||
* @return treeNodeList
|
||||
*/
|
||||
public ArrayList<HashMap<String, Object>> getTreeNodeList() {
|
||||
return treeNodeList;
|
||||
TreeNode rootNode;
|
||||
|
||||
int nodeCount;
|
||||
|
||||
ArrayList<TreeNode> nodes = new ArrayList<TreeNode>();
|
||||
|
||||
public ArrayList<TreeNode> getNodes() {
|
||||
return nodes;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置节点列表
|
||||
* @param treeNodeList
|
||||
*/
|
||||
public void setTreeNodeList(ArrayList<HashMap<String, Object>> treeNodeList) {
|
||||
this.treeNodeList = treeNodeList;
|
||||
public void setNodes(ArrayList<TreeNode> nodes) {
|
||||
this.nodes = nodes;
|
||||
}
|
||||
|
||||
public TreeNode getRootNode() {
|
||||
return rootNode;
|
||||
}
|
||||
|
||||
public void setRootNode(TreeNode rootNode) {
|
||||
this.rootNode = rootNode;
|
||||
}
|
||||
|
||||
public int getNodeCount() {
|
||||
return nodeCount;
|
||||
}
|
||||
|
||||
public void setNodeCount(int nodeCount) {
|
||||
this.nodeCount = nodeCount;
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增节点到列表
|
||||
*
|
||||
* @param treeNode
|
||||
*/
|
||||
public void addTreeNode(HashMap<String, Object> treeNode) {
|
||||
this.treeNodeList .add(treeNode);
|
||||
public void addNode(TreeNode treeNode) {
|
||||
this.nodes.add(treeNode);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -17,8 +17,6 @@
|
||||
|
||||
package org.maxkey.web.component;
|
||||
|
||||
import java.util.HashMap;
|
||||
|
||||
/**
|
||||
* 数控件的节点 使用HashMap<String,Object> attr存储节点数据.
|
||||
*
|
||||
@@ -26,71 +24,119 @@ import java.util.HashMap;
|
||||
*
|
||||
*/
|
||||
public class TreeNode {
|
||||
String key;
|
||||
String code;
|
||||
String title;
|
||||
|
||||
String codePath;
|
||||
String namePath;
|
||||
|
||||
String parentKey;
|
||||
String parentCode;
|
||||
String parentTitle;
|
||||
|
||||
|
||||
boolean expanded;
|
||||
boolean isLeaf;
|
||||
|
||||
// TreeNode
|
||||
HashMap<String, Object> attr = new HashMap<String, Object>();
|
||||
Object attrs;
|
||||
|
||||
public TreeNode() {
|
||||
super();
|
||||
}
|
||||
|
||||
public TreeNode(String id, String name) {
|
||||
attr.put("id", id);
|
||||
attr.put("name", name);
|
||||
public TreeNode(String key, String title) {
|
||||
this.key = key;
|
||||
this.title = title;
|
||||
}
|
||||
|
||||
public TreeNode(String id, String name, boolean hasChild) {
|
||||
attr.put("id", id);
|
||||
attr.put("name", name);
|
||||
attr.put("isParent", hasChild);
|
||||
}
|
||||
public String getKey() {
|
||||
return key;
|
||||
}
|
||||
|
||||
public TreeNode(String id, String name, String pId) {
|
||||
attr.put("id", id);
|
||||
attr.put("name", name);
|
||||
attr.put("pId", pId);
|
||||
}
|
||||
public void setKey(String key) {
|
||||
this.key = key;
|
||||
}
|
||||
|
||||
public TreeNode(String id, String name, String pId, String url) {
|
||||
attr.put("id", id);
|
||||
attr.put("name", name);
|
||||
attr.put("pId", pId);
|
||||
attr.put("url", url);
|
||||
}
|
||||
public String getCode() {
|
||||
return code;
|
||||
}
|
||||
|
||||
public TreeNode(String id, String name, String pId, String url, String target) {
|
||||
attr.put("id", id);
|
||||
attr.put("name", name);
|
||||
attr.put("pId", pId);
|
||||
attr.put("url", url);
|
||||
attr.put("target", target);
|
||||
}
|
||||
public void setCode(String code) {
|
||||
this.code = code;
|
||||
}
|
||||
|
||||
public void setChecked() {
|
||||
attr.put("checked", true);
|
||||
}
|
||||
public String getTitle() {
|
||||
return title;
|
||||
}
|
||||
|
||||
public void setHasChild() {
|
||||
attr.put("isParent", true);
|
||||
}
|
||||
public void setTitle(String title) {
|
||||
this.title = title;
|
||||
}
|
||||
|
||||
public void setPId(String pId) {
|
||||
attr.put("pId", pId);
|
||||
}
|
||||
public String getCodePath() {
|
||||
return codePath;
|
||||
}
|
||||
|
||||
public void setIcon(String icon) {
|
||||
attr.put("icon", icon);
|
||||
}
|
||||
public void setCodePath(String codePath) {
|
||||
this.codePath = codePath;
|
||||
}
|
||||
|
||||
public HashMap<String, Object> getAttr() {
|
||||
return attr;
|
||||
}
|
||||
public String getNamePath() {
|
||||
return namePath;
|
||||
}
|
||||
|
||||
public void setAttr(String attrName, Object value) {
|
||||
this.attr.put(attrName, value);
|
||||
}
|
||||
public void setNamePath(String namePath) {
|
||||
this.namePath = namePath;
|
||||
}
|
||||
|
||||
public void setAttr(HashMap<String, Object> attr) {
|
||||
this.attr = attr;
|
||||
}
|
||||
public String getParentKey() {
|
||||
return parentKey;
|
||||
}
|
||||
|
||||
public void setParentKey(String parentKey) {
|
||||
this.parentKey = parentKey;
|
||||
}
|
||||
|
||||
public String getParentCode() {
|
||||
return parentCode;
|
||||
}
|
||||
|
||||
public void setParentCode(String parentCode) {
|
||||
this.parentCode = parentCode;
|
||||
}
|
||||
|
||||
public String getParentTitle() {
|
||||
return parentTitle;
|
||||
}
|
||||
|
||||
public void setParentTitle(String parentTitle) {
|
||||
this.parentTitle = parentTitle;
|
||||
}
|
||||
|
||||
public boolean isExpanded() {
|
||||
return expanded;
|
||||
}
|
||||
|
||||
public void setExpanded(boolean expanded) {
|
||||
this.expanded = expanded;
|
||||
}
|
||||
|
||||
public boolean getIsLeaf() {
|
||||
return isLeaf;
|
||||
}
|
||||
|
||||
public void setLeaf(boolean isLeaf) {
|
||||
this.isLeaf = isLeaf;
|
||||
}
|
||||
|
||||
public Object getAttrs() {
|
||||
return attrs;
|
||||
}
|
||||
|
||||
public void setAttrs(Object attrs) {
|
||||
this.attrs = attrs;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user