提交 2ace1cbb authored 作者: 吕昊泽's avatar 吕昊泽
上级 00e7b5f3
......@@ -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);
}
......
......@@ -640,7 +640,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',
......
......@@ -642,7 +642,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賬戶',
......
......@@ -643,7 +643,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账户',
......
......@@ -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)$',
message: this.$t('system_parameter_setting.front_error'),
trigger: 'blur'
}
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论