mirror of
https://github.com/dataease/dataease.git
synced 2026-05-15 13:32:18 +08:00
fix: 编辑sql时,默认值不生效
This commit is contained in:
@@ -139,7 +139,7 @@ public class DatasetDataManage {
|
||||
} else {
|
||||
// parser sql params and replace default value
|
||||
String s = new String(Base64.getDecoder().decode(tableInfoDTO.getSql()));
|
||||
String originSql = new SqlparserUtils().handleVariableDefaultValue(s, datasetTableDTO.getSqlVariableDetails(), false, false, null, datasourceRequest.getIsCross(), datasourceRequest.getDsList(), pluginManage, getUserEntity());
|
||||
String originSql = new SqlparserUtils().handleVariableDefaultValue(s, datasetTableDTO.getSqlVariableDetails(), true, false, null, datasourceRequest.getIsCross(), datasourceRequest.getDsList(), pluginManage, getUserEntity());
|
||||
originSql = provider.replaceComment(originSql);
|
||||
// add sql table schema
|
||||
|
||||
|
||||
@@ -269,14 +269,15 @@ const closeSqlNode = () => {
|
||||
changeSqlId.value.length === 1
|
||||
) {
|
||||
currentNode.value = state.nodeList[0]
|
||||
const { datasourceId, id, info, tableName } = currentNode.value
|
||||
const { datasourceId, id, info, tableName, sqlVariableDetails } = currentNode.value
|
||||
getTableField({
|
||||
datasourceId,
|
||||
id,
|
||||
info,
|
||||
tableName,
|
||||
type: 'sql',
|
||||
isCross: isCross.value
|
||||
isCross: isCross.value,
|
||||
sqlVariableDetails: sqlVariableDetails
|
||||
}).then(res => {
|
||||
const idOriginNameMap = allfields.value.reduce((pre, next) => {
|
||||
pre[`${next.datasetTableId}${next.originName}`] = next.id
|
||||
|
||||
Reference in New Issue
Block a user