fix: 精简模式下 sql 拼接问题

This commit is contained in:
taojinlong 2022-03-25 23:20:27 +08:00
parent 2043788071
commit 8857c99564
6 changed files with 15 additions and 12 deletions

View File

@ -778,8 +778,8 @@ public class MysqlQueryProvider extends QueryProvider {
if (field.getDeExtractType() == 2 || field.getDeExtractType() == 3 || field.getDeExtractType() == 4) {
whereName = originName;
}
} else if (field.getDeType() == 0) {
whereName = String.format(MysqlConstants.CAST, originName, MysqlConstants.VARCHAR);
} else if (field.getDeType() == 0 && field.getDeExtractType() == 0) {
whereName = String.format(MysqlConstants.CAST, originName, MysqlConstants.CHAR);
} else {
whereName = originName;
}
@ -865,8 +865,8 @@ public class MysqlQueryProvider extends QueryProvider {
String cast = String.format(MysqlConstants.CAST, originName, MysqlConstants.DEFAULT_INT_FORMAT) + "/1000";
whereName = String.format(MysqlConstants.FROM_UNIXTIME, cast, MysqlConstants.DEFAULT_DATE_FORMAT);
}
} else if (field.getDeType() == 0) {
whereName = String.format(MysqlConstants.CAST, originName, MysqlConstants.VARCHAR);
} else if (field.getDeType() == 0 && field.getDeExtractType() == 0) {
whereName = String.format(MysqlConstants.CAST, originName, MysqlConstants.CHAR);
} else if (field.getDeType() == 2 || field.getDeType() == 3) {
if (field.getDeExtractType() == 0 || field.getDeExtractType() == 5) {
whereName = String.format(MysqlConstants.CAST, originName, MysqlConstants.DEFAULT_FLOAT_FORMAT);
@ -967,8 +967,8 @@ public class MysqlQueryProvider extends QueryProvider {
String from_unixtime = String.format(MysqlConstants.FROM_UNIXTIME, cast, MysqlConstants.DEFAULT_DATE_FORMAT);
fieldName = String.format(MysqlConstants.DATE_FORMAT, from_unixtime, format);
}
} else if (x.getDeType() == 0) {
fieldName = String.format(MysqlConstants.CAST, originField, MysqlConstants.VARCHAR);
} else if (x.getDeType() == 0 && x.getDeExtractType() == 0) {
fieldName = String.format(MysqlConstants.CAST, originField, MysqlConstants.CHAR);
} else {
fieldName = originField;
}

View File

@ -603,7 +603,7 @@ public class ChartViewService {
} else {
datasourceRequest.setQuery(qp.getSQL(tableName, xAxis, yAxis, fieldCustomFilter, extFilterList, ds, view));
}
// 仪表板有参数不用缓存
// 仪表板有参数不使用缓存
if (!cache || CollectionUtils.isNotEmpty(requestList.getFilter())
|| CollectionUtils.isNotEmpty(requestList.getLinkageFilters())
|| CollectionUtils.isNotEmpty(requestList.getDrill()) || CollectionUtils.isNotEmpty(rowPermissionFields) || fields.size() != columnPermissionFields.size()) {

View File

@ -649,7 +649,8 @@ export default {
account: 'Account cannot be empty',
test_recipients: 'Test recipients',
tip: 'Tip: use as test mail recipient only',
engine_mode_setting: 'Engine Setting'
engine_mode_setting: 'Engine Setting',
kettle_setting: 'Kettle Setting'
},
chart: {
save_snapshot: 'Save Snapshot',

View File

@ -651,7 +651,8 @@ export default {
account: '賬戶不能爲空',
test_recipients: '測試收件人',
tip: '提示:僅用來作爲測試郵件收件人',
engine_mode_setting: '引擎設置'
engine_mode_setting: '引擎設置',
kettle_setting: 'Kettle 設置'
},
chart: {
save_snapshot: '保存縮略圖',

View File

@ -652,7 +652,8 @@ export default {
account: '账户不能为空',
test_recipients: '测试收件人',
tip: '提示:仅用来作为测试邮件收件人',
engine_mode_setting: '引擎设置'
engine_mode_setting: '引擎设置',
kettle_setting: 'Kettle 设置'
},
chart: {
save_snapshot: '保存缩略图',

View File

@ -30,11 +30,11 @@
<simple-mode />
</el-tab-pane>
<el-tab-pane v-if="engineMode==='cluster'" :lazy="true" :label="$t('system_parameter_setting.engine_mode_setting')" name="six">
<el-tab-pane v-if="engineMode==='cluster'" :lazy="true" :label="$t('system_parameter_setting.engine_mode_setting')" name="seven">
<cluster-mode />
</el-tab-pane>
<el-tab-pane :lazy="true" :label="$t('system_parameter_setting.engine_mode_setting')" name="seven">
<el-tab-pane v-if="engineMode==='cluster'" :lazy="true" :label="$t('system_parameter_setting.kettle_setting')" name="eight">
<kettle-setting />
</el-tab-pane>