🐛 修复计划命令执行报错.
This commit is contained in:
@@ -330,7 +330,16 @@ public class ExecCommandServiceImpl implements ExecCommandService {
|
||||
// 解析参数
|
||||
return schemaList.stream()
|
||||
.collect(Collectors.toMap(ExecParameterSchemaDTO::getName,
|
||||
ExecParameterSchemaDTO::getValue,
|
||||
s -> {
|
||||
Object value = s.getValue();
|
||||
if (value == null) {
|
||||
value = s.getDefaultValue();
|
||||
}
|
||||
if (value == null) {
|
||||
value = Const.EMPTY;
|
||||
}
|
||||
return value;
|
||||
},
|
||||
Functions.right()));
|
||||
}
|
||||
|
||||
|
||||
@@ -5,6 +5,7 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.orion.lang.define.wrapper.DataGrid;
|
||||
import com.orion.lang.utils.Booleans;
|
||||
import com.orion.lang.utils.Strings;
|
||||
import com.orion.lang.utils.collect.Lists;
|
||||
import com.orion.lang.utils.time.cron.Cron;
|
||||
import com.orion.visor.framework.biz.operator.log.core.utils.OperatorLogs;
|
||||
import com.orion.visor.framework.common.constant.ErrorMessage;
|
||||
@@ -163,8 +164,12 @@ public class ExecJobServiceImpl implements ExecJobService {
|
||||
List<Long> hostIdList = execJobHostService.getHostIdByJobId(id);
|
||||
vo.setHostIdList(hostIdList);
|
||||
// 查询主机列表
|
||||
List<HostDO> hostList = hostDAO.selectBatchIds(hostIdList);
|
||||
vo.setHostList(HostConvert.MAPPER.toList(hostList));
|
||||
if (!Lists.isEmpty(hostIdList)) {
|
||||
List<HostDO> hostList = hostDAO.selectBatchIds(hostIdList);
|
||||
vo.setHostList(HostConvert.MAPPER.toList(hostList));
|
||||
} else {
|
||||
vo.setHostList(Lists.empty());
|
||||
}
|
||||
return vo;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user