forked from github/dataease
fix: 修复系统变量显示问题
This commit is contained in:
parent
a366d8d39c
commit
dab153631d
@ -12,10 +12,12 @@ import io.dataease.engine.constant.DeTypeConstants;
|
||||
import io.dataease.exception.DEException;
|
||||
import io.dataease.exportCenter.dao.auto.entity.CoreExportTask;
|
||||
import io.dataease.exportCenter.dao.auto.mapper.CoreExportTaskMapper;
|
||||
import io.dataease.system.manage.SysParameterManage;
|
||||
import io.dataease.utils.*;
|
||||
import io.dataease.visualization.server.DataVisualizationServer;
|
||||
import io.dataease.websocket.WsMessage;
|
||||
import io.dataease.websocket.WsService;
|
||||
import io.dataease.xpack.base.log.dao.auto.entity.XpackLog;
|
||||
import jakarta.annotation.PostConstruct;
|
||||
import jakarta.annotation.Resource;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
@ -50,6 +52,8 @@ public class ExportCenterManage {
|
||||
private CoreChartViewMapper coreChartViewMapper;
|
||||
@Autowired
|
||||
private WsService wsService;
|
||||
@Resource
|
||||
private SysParameterManage sysParameterManage;
|
||||
|
||||
@Value("${export.dataset.limit:100000}")
|
||||
private int limit;
|
||||
@ -417,6 +421,21 @@ public class ExportCenterManage {
|
||||
|
||||
private static final String LOG_RETENTION = "30";
|
||||
|
||||
public void cleanLog() {
|
||||
String key = "basic.exportFileLiveTime";
|
||||
String val = sysParameterManage.singleVal(key);
|
||||
if (StringUtils.isBlank(val)) {
|
||||
DEException.throwException("未获取到文件保留时间");
|
||||
}
|
||||
QueryWrapper<CoreExportTask> queryWrapper = new QueryWrapper<>();
|
||||
long expTime = Long.parseLong(val) * 24L * 3600L * 1000L;
|
||||
long threshold = System.currentTimeMillis() - expTime;
|
||||
queryWrapper.lt("export_time", threshold);
|
||||
exportTaskMapper.selectList(queryWrapper).forEach(coreExportTask -> {
|
||||
delete(coreExportTask.getId());
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
@ -2222,6 +2222,7 @@ export default {
|
||||
dsExecuteTime: '数据源检测频率',
|
||||
frontTimeOut: '请求超时时间(秒)',
|
||||
logLiveTime: '操作日志保留时间(天)',
|
||||
exportFileLiveTime: '后台导出文件保留时间(天)',
|
||||
platformOid: '第三方平台用户组织',
|
||||
platformRid: '第三方平台用户角色',
|
||||
pwdStrategy: '开启密码策略',
|
||||
|
@ -125,6 +125,15 @@ const edit = (list, orgOptions, roleOptions) => {
|
||||
}
|
||||
]
|
||||
}
|
||||
if (pkey === 'basic.exportFileLiveTime') {
|
||||
rule[pkey.split('.')[1]] = [
|
||||
{
|
||||
required: true,
|
||||
message: t('common.require'),
|
||||
trigger: ['blur', 'change']
|
||||
}
|
||||
]
|
||||
}
|
||||
item['label'] = `setting_${pkey}`
|
||||
item['pkey'] = pkey.split('.')[1]
|
||||
let pval = item.pval
|
||||
@ -301,6 +310,19 @@ defineExpose({
|
||||
/>
|
||||
</el-select>
|
||||
</div>
|
||||
<div v-else-if="item.pkey === 'exportFileLiveTime'">
|
||||
<el-input-number
|
||||
v-model="state.form[item.pkey]"
|
||||
autocomplete="off"
|
||||
step-strictly
|
||||
class="text-left edit-all-line"
|
||||
:min="1"
|
||||
:max="4000"
|
||||
:placeholder="t('common.inputText')"
|
||||
controls-position="right"
|
||||
type="number"
|
||||
/>
|
||||
</div>
|
||||
<v-else />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
@ -458,7 +458,7 @@ defineExpose({
|
||||
</div>
|
||||
<el-form-item :label="$t('datasource.query_timeout')" prop="apiQueryTimeout">
|
||||
<el-input v-model="apiItem.apiQueryTimeout" autocomplete="off" type="number" :min="0">
|
||||
<template v-slot:append>{{ $t('panel.second') }}</template>
|
||||
<template v-slot:append>{{ $t('chart.second') }}</template>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
<div class="title-form_primary request-info">
|
||||
|
@ -10,7 +10,9 @@ public class SysVariableDto {
|
||||
private Long id;
|
||||
private String type;
|
||||
private String name;
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
private Long min;
|
||||
@JsonSerialize(using = ToStringSerializer.class)
|
||||
private Long max;
|
||||
private String startTime;
|
||||
private String endTime;
|
||||
|
Loading…
Reference in New Issue
Block a user