Search in sources :

Example 1 with ServerDeployLogPO

use of com.ibeiliao.deployment.admin.po.deploy.ServerDeployLogPO in project Corgi by kevinYin.

the class DeployLogServiceImpl method batchSaveServerDeployLog.

@Override
public void batchSaveServerDeployLog(List<ServerCollectLog> logs) {
    if (CollectionUtils.isEmpty(logs)) {
        return;
    }
    rebuildServerDeployId(logs);
    List<ServerDeployLogPO> poList = new ArrayList<>();
    Date now = new Date();
    for (ServerCollectLog log : logs) {
        ServerDeployLogPO po = new ServerDeployLogPO();
        po.setServerDeployId(log.getId());
        po.setShellLog(log.getContent());
        po.setCreateTime(now);
        poList.add(po);
    }
    int rows = serverDeployLogDao.batchInsert(poList);
    logger.info("成功保存{}条shell日志记录", rows);
}
Also used : ServerCollectLog(com.ibeiliao.deployment.common.vo.ServerCollectLog) ServerDeployLogPO(com.ibeiliao.deployment.admin.po.deploy.ServerDeployLogPO)

Aggregations

ServerDeployLogPO (com.ibeiliao.deployment.admin.po.deploy.ServerDeployLogPO)1 ServerCollectLog (com.ibeiliao.deployment.common.vo.ServerCollectLog)1