Kaynağa Gözat

页面引擎:load无数据时,返回空。

master
郑根木 2 yıl önce
ebeveyn
işleme
ca300ad2f3
2 değiştirilmiş dosya ile 3 ekleme ve 2 silme
  1. +1
    -1
      smtweb-framework/bpm/src/main/java/cc/smtweb/system/bpm/web/engine/dynPage/DynPageLoadHandler.java
  2. +2
    -1
      smtweb-framework/bpm/src/main/java/cc/smtweb/system/bpm/web/engine/dynPage/DynPageProvider.java

+ 1
- 1
smtweb-framework/bpm/src/main/java/cc/smtweb/system/bpm/web/engine/dynPage/DynPageLoadHandler.java Dosyayı Görüntüle

@@ -94,7 +94,7 @@ public class DynPageLoadHandler extends AbstractDynPageHandler {
bean = DynRetBean.createList(getListWorker(filter, pageDataSet).buildListData());
} else if (SwEnum.DatasetType.TREE.value.equals(pageDataSet.type)) {//树类
bean = DynRetBean.createList(SwListData.create(getTreeWorker(filter, pageDataSet).buildData(), 0));
} else {//表类
} else {//表
SwMap data = provider.loadData(filter, pageDataSet);
afterLoadBean(pageDataSet,data);
bean = DynRetBean.createBean(data);


+ 2
- 1
smtweb-framework/bpm/src/main/java/cc/smtweb/system/bpm/web/engine/dynPage/DynPageProvider.java Dosyayı Görüntüle

@@ -24,7 +24,8 @@ public class DynPageProvider extends AbstractCompProvider {
SqlNamedPara sqlPara = DynPageHelper.buildSelectSql(pageDataSet, filter);
SwMap map = DbEngine.getInstance().queryEntityN(sqlPara.sql, sqlPara.mapParas, SwMap.class);
if (map == null) {
throw new BizException("没有找到指定数据(ds=" + pageDataSet.name + ")");
return new SwMap();
//throw new BizException("没有找到指定数据(ds=" + pageDataSet.name + ")");
}
ModelTable masterTable = ModelTableCache.getInstance().get(pageDataSet.masterTable);
EntityHelper.loadBeanText(masterTable.getName(), map, sqlPara.mapFieldAlias);


Yükleniyor…
İptal
Kaydet