|
@@ -328,11 +328,28 @@ public class TableServiceCmdService {
|
|
|
* @return com.boman.common.core.web.domain.AjaxResult
|
|
|
*/
|
|
|
public AjaxResult getTableQuery(BaseTableSaveDTO condition) {
|
|
|
+ GenTable genTable = getTableFromRedisByTableName(RedisKey.TABLE_INFO, condition.getTable());
|
|
|
+ List<GenTableColumn> columns = genTable.getColumns();
|
|
|
JSONObject jsonObject = new JSONObject();
|
|
|
- jsonObject.put(FormDataConstant.QUERY_LIST, getQueryParam(condition));
|
|
|
+ // 查询字段
|
|
|
+ ArrayList<GenTableColumn> queryList = Lists.newArrayListWithCapacity(16);
|
|
|
+ for (GenTableColumn column : columns) {
|
|
|
+ if (GenTableColumn.IS_QUERY.equalsIgnoreCase(column.getIsQuery())) {
|
|
|
+ String dictType = column.getDictType();
|
|
|
+ if (ObjectUtils.isNotEmpty(dictType)) {
|
|
|
+ List<SysDictData> sysDictData1 = remoteDictDataService.listByType(dictType);
|
|
|
+ column.setSysDictData(sysDictData1);
|
|
|
+ }
|
|
|
+
|
|
|
+ queryList.add(column);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ jsonObject.put(FormDataConstant.QUERY_LIST, queryList);
|
|
|
// genTable.getMenuRole() 暂时数据库没有数据,
|
|
|
- jsonObject.put(FormDataConstant.BUTTON_LIST, getButton(condition));
|
|
|
- jsonObject.put(FormDataConstant.TABLE_HEAD_LIST, getTableHead(condition));
|
|
|
+ jsonObject.put(FormDataConstant.BUTTON_LIST, Strings.nullToEmpty(genTable.getMenuRole()));
|
|
|
+
|
|
|
+ jsonObject.put(FormDataConstant.TABLE_HEAD_LIST, getTableHeadList(genTable));
|
|
|
return AjaxResult.success(jsonObject);
|
|
|
}
|
|
|
|