From da7a4d799034ca244467665827bae91ca3c0252c Mon Sep 17 00:00:00 2001
From: 龚焕茏 <2842157468@qq.com>
Date: 星期五, 16 八月 2024 10:31:55 +0800
Subject: [PATCH] feat:数据中心展示
---
ycl-server/src/main/java/com/ycl/platform/service/impl/PlatformServiceImpl.java | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)
diff --git a/ycl-server/src/main/java/com/ycl/platform/service/impl/PlatformServiceImpl.java b/ycl-server/src/main/java/com/ycl/platform/service/impl/PlatformServiceImpl.java
index e716c53..a755dc6 100644
--- a/ycl-server/src/main/java/com/ycl/platform/service/impl/PlatformServiceImpl.java
+++ b/ycl-server/src/main/java/com/ycl/platform/service/impl/PlatformServiceImpl.java
@@ -18,6 +18,7 @@
import org.springframework.util.Assert;
import org.springframework.util.CollectionUtils;
+import java.util.Date;
import java.util.List;
import java.util.stream.Collectors;
@@ -43,12 +44,17 @@
public Result add(PlatformForm form) {
Platform entity = PlatformForm.getEntityByForm(form, null);
entity.setParentId(0);
+ Date now = new Date();
+ entity.setCreateTime(now);
+ entity.setUpdateTime(now);
baseMapper.insert(entity);
if (! CollectionUtils.isEmpty(form.getDeployList())) {
List<Platform> childList = form.getDeployList().stream().map(deploy -> {
Platform child = new Platform();
BeanUtils.copyProperties(deploy, child);
child.setParentId(entity.getId());
+ child.setCreateTime(now);
+ child.setUpdateTime(now);
return child;
}).collect(Collectors.toList());
this.saveBatch(childList);
--
Gitblit v1.8.0