补充了数据填报方法
This commit is contained in:
parent
475f8ae9c7
commit
abf14fc7ba
@ -1,15 +1,21 @@
|
||||
package io.gisbi.dataset.server;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import io.gisbi.api.dataset.DatasetDataApi;
|
||||
import io.gisbi.api.dataset.dto.*;
|
||||
import io.gisbi.api.dataset.dto.BaseTreeNodeDTO;
|
||||
import io.gisbi.api.dataset.dto.EnumValueRequest;
|
||||
import io.gisbi.api.dataset.dto.MultFieldValuesRequest;
|
||||
import io.gisbi.api.dataset.dto.PreviewSqlDTO;
|
||||
import io.gisbi.api.dataset.union.DatasetGroupInfoDTO;
|
||||
import io.gisbi.api.dataset.dto.EnumObj;
|
||||
import io.gisbi.dataset.dao.auto.entity.CoreDatasetTable;
|
||||
import io.gisbi.dataset.dao.auto.entity.CoreDatasetTableField;
|
||||
import io.gisbi.dataset.manage.DatasetDataManage;
|
||||
import io.gisbi.extensions.datasource.dto.DatasetTableDTO;
|
||||
import io.gisbi.extensions.datasource.dto.DatasetTableFieldDTO;
|
||||
import io.gisbi.utils.LogUtil;
|
||||
import jakarta.annotation.Resource;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
@ -96,4 +102,56 @@ public class DatasetDataServer implements DatasetDataApi {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
@GetMapping("getTablesByAppId")
|
||||
public List<Map<String,Object>> getTablesByAppId(String appid) throws Exception {
|
||||
List<Map<String,Object>> result = datasetDataManage.getTablesByAppId(appid);
|
||||
return result;
|
||||
}
|
||||
@GetMapping("getFieldsByTableId")
|
||||
public Map<String, Object> getFieldsByTableId(Long datasourceId,String tablename) throws Exception {
|
||||
Map<String, Object> result = datasetDataManage.getFieldsByTableId(datasourceId,tablename);
|
||||
return result;
|
||||
}
|
||||
@PostMapping("addTableData")
|
||||
public boolean addTableData(Long datasourceId, @RequestParam("tableData") String tableData) throws Exception {
|
||||
boolean result = datasetDataManage.addTableData(
|
||||
datasourceId,
|
||||
tableData
|
||||
);
|
||||
return result;
|
||||
}
|
||||
|
||||
@PostMapping("getTableDataByPk")
|
||||
public Map<String, Object> getTableDataByPk(Long datasourceId,@RequestParam("whereJson") String whereJson) throws Exception {
|
||||
Map<String, Object> result=datasetDataManage.getTableDataByPk(
|
||||
datasourceId,
|
||||
whereJson
|
||||
);
|
||||
return result;
|
||||
}
|
||||
@PostMapping("updateTableData")
|
||||
public boolean updateTableData(Long datasourceId, @RequestParam("tableData") String tableData) throws Exception {
|
||||
boolean result = datasetDataManage.updateTableData(
|
||||
datasourceId,
|
||||
tableData
|
||||
);
|
||||
return result;
|
||||
}
|
||||
@PostMapping("deleteTableData")
|
||||
public boolean deleteTableData(Long datasourceId, @RequestParam("whereJson") String whereJson) throws Exception {
|
||||
boolean result = datasetDataManage.deleteTableData(
|
||||
datasourceId,
|
||||
whereJson
|
||||
);
|
||||
return result;
|
||||
}
|
||||
@PostMapping("queryTableDataPaged")
|
||||
public Page<Map<String, Object>> queryTableDataPaged(Long datasourceId, @RequestParam("queryJson") String queryJson) throws Exception {
|
||||
Page<Map<String, Object>> result = datasetDataManage.queryTableDataPaged(
|
||||
datasourceId,
|
||||
queryJson
|
||||
);
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user