Commit f3c53428 by 陶光胜

配置表

parent 32aa34a3
......@@ -131,9 +131,9 @@ public class CustomSettingApiServiceImpl implements CustomSettingApiService {
@Override
public ServiceResponse<Map<String, Object>> getDetail(String tableName, String searchParams) {
Map<String, Object> map = JSON.parseObject(searchParams, Map.class);
MongoQueryDTO queryDTO = new MongoQueryDTO();
if(MapUtils.isNotEmpty(map)){
if(StringUtils.isNotBlank(searchParams)){
Map<String, Object> map = JSON.parseObject(searchParams, Map.class);
TabTableSetting tableSetting = tableSettingService.getTableSetting(tableName);
if(tableSetting == null){
return ServiceResponse.failure(ErrorCode.PARAMETER_ERROR.getCode(), tableName + "不存在");
......@@ -158,15 +158,16 @@ public class CustomSettingApiServiceImpl implements CustomSettingApiService {
@Override
public ServiceResponse<Page<Map>> page(String tableName, String searchParams, Integer currentPage, Integer pageSize) {
Map<String, Object> map = JSON.parseObject(searchParams, Map.class);
MongoQueryDTO queryDTO = new MongoQueryDTO();
if(MapUtils.isNotEmpty(map)){
if(StringUtils.isNotBlank(searchParams)){
Map<String, Object> map = JSON.parseObject(searchParams, Map.class);
TabTableSetting tableSetting = tableSettingService.getTableSetting(tableName);
if(tableSetting == null){
return ServiceResponse.failure(ErrorCode.PARAMETER_ERROR.getCode(), tableName + "不存在");
}
List<Criteria> criteriaList = getCriteriaList(map, tableSetting);
queryDTO.setCriteria(criteriaList);
}
queryDTO.setDataBaseName(DATABASENAME);
queryDTO.setConllectionName(tableName);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment