From 55fbf527317eca0969a108831983a7b69e727939 Mon Sep 17 00:00:00 2001 From: 许鹏程 <1821349743@qq.com> Date: 星期四, 15 八月 2024 18:37:30 +0800 Subject: [PATCH] commit udpate --- src/main/java/com/product/face/entity/FaceListEntity.java | 81 +++++++++++++++++++++++++++++++++++++++- 1 files changed, 78 insertions(+), 3 deletions(-) diff --git a/src/main/java/com/product/face/entity/FaceListEntity.java b/src/main/java/com/product/face/entity/FaceListEntity.java index 047830c..c846e53 100644 --- a/src/main/java/com/product/face/entity/FaceListEntity.java +++ b/src/main/java/com/product/face/entity/FaceListEntity.java @@ -1,5 +1,6 @@ package com.product.face.entity; +import com.alibaba.fastjson.JSON; import com.google.common.collect.Lists; import com.google.common.collect.Maps; import com.product.admin.config.CmnConst; @@ -13,6 +14,7 @@ import com.product.core.entity.FieldSetEntity; import com.product.core.spring.context.SpringBeanUtil; import com.product.core.spring.context.SpringMVCContextHolder; +import com.product.face.config.FaceConst; import com.product.module.sys.entity.SystemUser; import com.product.util.BaseUtil; @@ -54,6 +56,31 @@ * 琛ㄥ悕 */ private String tableName; + + /** + * 鏄惁鏄剧ず鏍� + */ + private String treeShow; + + /** + * 鏍戞暟鎹簮绫诲瀷 + */ + private String treeDataType; + + /** + * 鏁版嵁婧� + */ + private String treeDataSource; + + /** + * 鏍憀abel key + */ + private String treeLabelKey; + + /** + * 鏍憊alue key + */ + private String treeValueKey; /** * 鑾峰彇琛ㄥ悕 @@ -147,6 +174,50 @@ this.faceFields = faceFields; } + public void setTableName(String tableName) { + this.tableName = tableName; + } + + public String getTreeShow() { + return treeShow; + } + + public void setTreeShow(String treeShow) { + this.treeShow = treeShow; + } + + public String getTreeDataType() { + return treeDataType; + } + + public void setTreeDataType(String treeDataType) { + this.treeDataType = treeDataType; + } + + public String getTreeDataSource() { + return treeDataSource; + } + + public void setTreeDataSource(String treeDataSource) { + this.treeDataSource = treeDataSource; + } + + public String getTreeLabelKey() { + return treeLabelKey; + } + + public void setTreeLabelKey(String treeLabelKey) { + this.treeLabelKey = treeLabelKey; + } + + public String getTreeValueKey() { + return treeValueKey; + } + + public void setTreeValueKey(String treeValueKey) { + this.treeValueKey = treeValueKey; + } + /** * 鑾峰彇鍙傜収鏉′欢 * @@ -217,12 +288,15 @@ } //瀛楁鍚嶇О String fieldName = faceField.getFieldName(); + if (!StringUtils.isEmpty(fieldName)) { + fieldName.trim(); + } if (aliasField != null && !StringUtils.isEmpty(fieldName)) { List<String> fieldAlias = aliasField.get(getTableName() + "." + fieldName); if (fieldAlias != null && fieldAlias.size() > 0) { String alias = fieldAlias.get(0); if (!StringUtils.isEmpty(alias)) { - fieldName = alias; + fieldName = alias.trim(); } } } @@ -244,7 +318,7 @@ } FieldSetEntity ff = prompt.getFieldSetEntity(0); StringBuilder p = new StringBuilder(); - p.append(getFieldName(tableAlias, fieldName)).append("` in ").append(" ( SELECT `").append(ff.getString("value_field")).append("` FROM ").append(ff.getString("source_table")); + p.append(getFieldName(tableAlias, fieldName)).append(" in ").append(" ( SELECT ").append(ff.getString("value_field")).append(" FROM ").append(ff.getString("source_table")); p.append(" WHERE ").append(ff.getString("view_fields")).append(" like concat('%','~val~','%') )"); filters.add(p.toString()); continue; @@ -258,7 +332,7 @@ //鑾峰彇redis 璧峰key String faceListKey = SystemFaceService.FACE_LIST_KEY; //閲嶆柊鏀惧叆redis - RedisUtil.set(faceListKey + getUuid(), this); + RedisUtil.set(faceListKey + getUuid(), JSON.parseObject(JSON.toJSONString(this), com.product.admin.entity.FaceListEntity.class)); return maps; } @@ -351,4 +425,5 @@ } + } -- Gitblit v1.9.2