Merge pull request #2345 from Antoniano1963/main

feat:提高请求超时时间的范围,创建关联数据集时保留原数据类型
This commit is contained in:
taojinlong 2022-06-07 17:43:16 +08:00 committed by GitHub
commit ba5832b58f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
8 changed files with 13 additions and 4 deletions

View File

@ -67,6 +67,12 @@ public class SystemParameterController {
@RequiresPermissions("sysparam:read")
@PostMapping("/edit/basic")
public void editBasic(@RequestBody List<SystemParameter> systemParameter) {
int timeout = Integer.parseInt(systemParameter.stream().filter(
parameter -> parameter.getParamKey().equals("basic.frontTimeOut")
).findFirst().get().getParamValue());
if (timeout < 0 || timeout > 300) { //增加了合法性检验
throw new NumberFormatException("Timeout Range Error!");
}
systemParameterService.editBasic(systemParameter);
}

View File

@ -63,6 +63,7 @@ public class MysqlQueryProvider extends QueryProvider {
case "MEDIUMINT":
case "INTEGER":
case "BIGINT":
case "LONG": //增加了LONG类型
return 2;// 整型
case "FLOAT":
case "DOUBLE":

View File

@ -64,6 +64,7 @@ public class MysqlQueryProvider extends QueryProvider {
case "MEDIUMINT":
case "INTEGER":
case "BIGINT":
case "LONG": //增加了LONG类型
return 2;// 整型
case "FLOAT":
case "DOUBLE":

View File

@ -1633,6 +1633,7 @@ public class DataSetTableService {
TableUtils.fieldName(field.getTableId() + "_" + field.getDataeaseName()),
tableField.getFieldName())) {
tableField.setRemarks(field.getName());
tableField.setFieldType(field.getType()); //将原有的type赋值给新创建的数据列
break;
}
}

View File

@ -643,7 +643,7 @@ export default {
login_type: 'Default login type',
empty_front: 'If empty then default value is 10s',
empty_msg: 'If empty then default value is 30 days',
front_error: 'Valid ranger [0 - 100]',
front_error: 'Valid ranger [0 - 300]', //修改了提示信息
msg_error: 'Valid ranger [1 - 365]',
SMTP_port: 'SMTP Port',
SMTP_account: 'SMTP Account',

View File

@ -645,7 +645,7 @@ export default {
login_type: '默認登錄方式',
empty_front: '為空則默認取值10秒',
empty_msg: '為空則默認取值30天',
front_error: '請填寫0-100正整數',
front_error: '請填寫0-300正整數', //修改了提示信息
msg_error: '請填寫1-365正整數',
SMTP_port: 'SMTP端口',
SMTP_account: 'SMTP賬戶',

View File

@ -646,7 +646,7 @@ export default {
login_type: '默认登录方式',
empty_front: '为空则默认取10秒',
empty_msg: '为空则默认取30天',
front_error: '请填写0-100正整数',
front_error: '请填写0-300正整数', //修改了提示信息
msg_error: '请填写1-365正整数',
SMTP_port: 'SMTP端口',
SMTP_account: 'SMTP账户',

View File

@ -86,7 +86,7 @@ export default {
rules: {
frontTimeOut: [
{
pattern: '^([0-9]{1,2}|100)$',
pattern: '^([0-9]|\\b[1-9]\\d\\b|\\b[1-2]\\d\\d\\b|\\b300\\b)$', //0-300
message: this.$t('system_parameter_setting.front_error'),
trigger: 'blur'
}