refactor: 智能问数优化 (#17224)

This commit is contained in:
王嘉豪
2025-10-20 12:01:41 +08:00
committed by GitHub
parent 102e33de36
commit 5dffb00347
9 changed files with 6 additions and 18 deletions

View File

@@ -158,7 +158,7 @@ public class DatasetSQLBotManage {
}
public List<DataSQLBotAssistantVO> getDatasourceList(Long dsId, Long datasetId, String dvInfo) {
public List<DataSQLBotAssistantVO> getDatasourceList(Long dsId, Long datasetId) {
TokenUserBO user = Objects.requireNonNull(AuthUtils.getUser());
Long oid = user.getDefaultOid();
Long uid = user.getUserId();
@@ -175,12 +175,6 @@ public class DatasetSQLBotManage {
if (ObjectUtils.isNotEmpty(dsId)) {
queryWrapper.eq("cd.id", dsId);
}
if(ObjectUtils.isNotEmpty(dvInfo)){
List<Long> targetDsGroupIds = extChartViewMapper.findDatasetGroupIdByDvId(dvInfo);
if(CollectionUtils.isNotEmpty(targetDsGroupIds)){
queryWrapper.in("cdg.id", targetDsGroupIds);
}
}
if (ObjectUtils.isEmpty(model)) {
if (!isAdmin) {
return null;

View File

@@ -17,8 +17,8 @@ public class DatasetSQLBotServer implements DataAssistantApi {
@Resource
private DatasetSQLBotManage datasetSQLBotManage;
@Override
public List<DataSQLBotAssistantVO> getDatasourceList(Long dsId, Long datasetId, String dvInfo) {
return datasetSQLBotManage.getDatasourceList(dsId, datasetId,dvInfo);
public List<DataSQLBotAssistantVO> getDatasourceList(Long dsId, Long tableId) {
return datasetSQLBotManage.getDatasourceList(dsId, tableId);
}
@Override

View File

@@ -65,10 +65,7 @@ const themeAttrChange = (custom, property, value) => {
}
merge(viewInfo['customAttr'], tmpValue)
} else {
console.log('viewInfo=' + JSON.stringify(viewInfo['customAttr']))
console.log('value=' + JSON.stringify(value))
merge(viewInfo['customAttr'], value)
console.log('merge=' + JSON.stringify(viewInfo['customAttr']))
}
} else {
Object.keys(value).forEach(function (key) {

View File

@@ -1503,7 +1503,6 @@ export const dvMainStore = defineStore('dataVisualization', {
})
})
element.linkageFilters = currentFilters
console.log('===test===' + JSON.stringify(element.linkageFilters))
},
clearPanelLinkageInfo() {

View File

@@ -215,7 +215,6 @@ const switchTab = (name: string) => {
activeName.value = name || 'simple'
}
const autoCallback = (param: any) => {
console.log(param)
activeName.value = param.activeName || 'simple'
preheat.value = param.preheat
if (param.loadingText) {

View File

@@ -43,7 +43,7 @@ const loadSqlbotInfo = () => {
}
const loadSqlbotPage = () => {
const scriptId = `sqlbot-assistant-float-script-${state.assistantId}`
const scriptId = `sqlbot-assistant-float-script-${state.id}`
const exitsScript = document.getElementById(scriptId)
if (exitsScript && window['sqlbot_assistant_handler']) {
mountedEmbeddedPage()

View File

@@ -70,7 +70,6 @@ const mountedEmbeddedPage = () => {
}
const tempTimer = setTimeout(() => {
if (window['sqlbot_embedded_handler']) {
console.log('===test===111')
window['sqlbot_embedded_handler'].mounted('#dataease-v2-embedded-sqlbot', {
embeddedId: state.id,
online: true,

View File

@@ -10,7 +10,7 @@ import java.util.List;
public interface DataAssistantApi {
@GetMapping("/datasource")
List<DataSQLBotAssistantVO> getDatasourceList(@RequestParam(required = false) Long dsId, @RequestParam(required = false) Long datasetId, @RequestParam(required = false) String dvInfo);
List<DataSQLBotAssistantVO> getDatasourceList(@RequestParam(required = false) Long dsId, @RequestParam(required = false) Long tableId);
@GetMapping("/dataset/{dvInfo}")
List<DataSQLBotDatasetVO> getDatasetList(@PathVariable String dvInfo);

View File

@@ -7,7 +7,7 @@ import java.io.Serializable;
@Data
public class DataSQLBotDatasetVO implements Serializable {
private Long tableId;
private String tableId;
private String tableName;