|
|
@@ -2,8 +2,10 @@ package com.zhongshu.iot.server.core.service.docker;
|
|
|
|
|
|
import cn.hutool.json.JSONArray;
|
|
|
import cn.hutool.json.JSONObject;
|
|
|
+import com.github.microservice.net.ResultContent;
|
|
|
import com.github.microservice.net.ResultMessage;
|
|
|
import com.zhongshu.iot.client.model.docker.*;
|
|
|
+import com.zhongshu.iot.client.type.OperationLogBusType;
|
|
|
import com.zhongshu.iot.server.core.dao.docker.AkSkConfigDao;
|
|
|
import com.zhongshu.iot.server.core.dao.docker.DockerMetaDao;
|
|
|
import com.zhongshu.iot.server.core.dao.docker.DockerMetaLastTimeDao;
|
|
|
@@ -11,10 +13,10 @@ import com.zhongshu.iot.server.core.domain.docker.AkSkConfig;
|
|
|
import com.zhongshu.iot.server.core.domain.docker.DockerMeta;
|
|
|
import com.zhongshu.iot.server.core.domain.docker.DockerMetaLastTime;
|
|
|
import com.zhongshu.iot.server.core.service.base.SuperService;
|
|
|
+import com.zhongshu.iot.server.core.service.user.OperationLogsService;
|
|
|
import com.zhongshu.iot.server.core.util.SecurityUtil;
|
|
|
import com.zhongshu.iot.server.core.util.bean.BeanUtils;
|
|
|
import com.zhongshu.iot.server.core.util.page.PageEntityUtil;
|
|
|
-import com.github.microservice.net.ResultContent;
|
|
|
import jakarta.servlet.http.HttpServletRequest;
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
import org.apache.commons.lang3.ObjectUtils;
|
|
|
@@ -49,6 +51,9 @@ public class DockerMetaService extends SuperService {
|
|
|
@Autowired
|
|
|
private AkSkConfigDao akSkConfigTimeDao;
|
|
|
|
|
|
+ @Autowired
|
|
|
+ private OperationLogsService operationLogsService;
|
|
|
+
|
|
|
/**
|
|
|
* 添加docker元数据
|
|
|
*
|
|
|
@@ -86,6 +91,8 @@ public class DockerMetaService extends SuperService {
|
|
|
}
|
|
|
dockerMetaDao.save(dockerMeta);
|
|
|
updateLastTime(groupCode);
|
|
|
+
|
|
|
+ operationLogsService.addLogs(String.format("编辑或添加了容器信息【%s】", dockerMeta.getName()), OperationLogBusType.DockerMeta, dockerMeta);
|
|
|
return ResultContent.buildSuccess();
|
|
|
}
|
|
|
|
|
|
@@ -102,6 +109,7 @@ public class DockerMetaService extends SuperService {
|
|
|
}
|
|
|
updateLastTime(dockerMeta.getGroupCode());
|
|
|
dockerMetaDao.delete(dockerMeta);
|
|
|
+ operationLogsService.addLogs(String.format("删除了容器信息【%s】", dockerMeta.getName()), OperationLogBusType.DockerMeta, dockerMeta);
|
|
|
return ResultContent.buildSuccess();
|
|
|
}
|
|
|
|