Browse Source

显示文本处理

master
郑根木 2 years ago
parent
commit
d533c5b2ff
1 changed files with 5 additions and 0 deletions
  1. +5
    -0
      smtweb-framework/core/src/main/java/cc/smtweb/framework/core/db/EntityHelper.java

+ 5
- 0
smtweb-framework/core/src/main/java/cc/smtweb/framework/core/db/EntityHelper.java View File

@@ -59,6 +59,7 @@ public class EntityHelper {
ModelTable table = ModelTableCache.getInstance().getByName(tableName); ModelTable table = ModelTableCache.getInstance().getByName(tableName);
if (table == null) return; if (table == null) return;
loadBeanLink(table, bean, mapFieldAlias); loadBeanLink(table, bean, mapFieldAlias);
setFieldDisplayText(table, bean, mapFieldAlias);
} }


private static void loadBeanLink(ModelTable table, SwMap bean, Map<String, String> mapFieldAlias) { private static void loadBeanLink(ModelTable table, SwMap bean, Map<String, String> mapFieldAlias) {
@@ -118,10 +119,14 @@ public class EntityHelper {
} }


public static void loadBeanText(String tableName, List<SwMap> listData, Map<String, String> mapFieldAlias) { public static void loadBeanText(String tableName, List<SwMap> listData, Map<String, String> mapFieldAlias) {
if (listData.isEmpty()) return;
//添加关联字段值 //添加关联字段值
ModelTable table = ModelTableCache.getInstance().getByName(tableName); ModelTable table = ModelTableCache.getInstance().getByName(tableName);
if (table == null) return; if (table == null) return;
loadBeanLink(table, listData, mapFieldAlias); loadBeanLink(table, listData, mapFieldAlias);
for (SwMap bean: listData) {
setFieldDisplayText(table, bean, mapFieldAlias);
}
} }


/** /**


Loading…
Cancel
Save