forked from github/dataease
fix: excel 替换、追加不生效
This commit is contained in:
parent
fcc7430343
commit
718585f3a0
@ -53,6 +53,7 @@ import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Propagation;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
@ -146,6 +147,7 @@ public class DataSetTableService {
|
||||
}
|
||||
}
|
||||
|
||||
@Transactional(propagation = Propagation.NOT_SUPPORTED)
|
||||
@DeCleaner(value = DePermissionType.DATASET, key = "sceneId")
|
||||
public void saveExcel(DataSetTableRequest datasetTable) throws Exception {
|
||||
List<String> datasetIdList = new ArrayList<>();
|
||||
@ -357,7 +359,7 @@ public class DataSetTableService {
|
||||
public List<DatasetTable> list(List<String> datasetIds) {
|
||||
DatasetTableExample example = new DatasetTableExample();
|
||||
example.createCriteria().andIdIn(datasetIds);
|
||||
return datasetTableMapper.selectByExample(example);
|
||||
return datasetTableMapper.selectByExampleWithBLOBs(example);
|
||||
}
|
||||
|
||||
public List<DataSetTableDTO> listAndGroup(DataSetTableRequest dataSetTableRequest) {
|
||||
|
@ -432,7 +432,8 @@ public class ExtractDataService {
|
||||
}
|
||||
|
||||
private void extractApiData(DatasetTable datasetTable, Datasource datasource, List<DatasetTableField> datasetTableFields, String extractType) throws Exception {
|
||||
List<ApiDefinition> lists = new Gson().fromJson(datasource.getConfiguration(), new TypeToken<ArrayList<ApiDefinition>>(){}.getType());
|
||||
List<ApiDefinition> lists = new Gson().fromJson(datasource.getConfiguration(), new TypeToken<ArrayList<ApiDefinition>>() {
|
||||
}.getType());
|
||||
lists = lists.stream().filter(item -> item.getName().equalsIgnoreCase(new Gson().fromJson(datasetTable.getInfo(), DataTableInfoDTO.class).getTable())).collect(Collectors.toList());
|
||||
if (CollectionUtils.isEmpty(lists)) {
|
||||
throw new Exception("未找到API数据表");
|
||||
|
Loading…
Reference in New Issue
Block a user