From 9057425fa1472e48d79f7f8608ea80267e224135 Mon Sep 17 00:00:00 2001 From: 潘志宝 <979469083@qq.com> Date: 星期三, 25 九月 2024 14:14:37 +0800 Subject: [PATCH] pre --- iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/mpk/service/impl/ProjectModelServiceImpl.java | 17 ++++++++++++++++- 1 files changed, 16 insertions(+), 1 deletions(-) diff --git a/iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/mpk/service/impl/ProjectModelServiceImpl.java b/iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/mpk/service/impl/ProjectModelServiceImpl.java index 943aa45..4f5521d 100644 --- a/iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/mpk/service/impl/ProjectModelServiceImpl.java +++ b/iailab-module-model/iailab-module-model-biz/src/main/java/com/iailab/module/model/mpk/service/impl/ProjectModelServiceImpl.java @@ -4,15 +4,17 @@ import com.iailab.framework.common.service.impl.CrudServiceImpl; import com.iailab.framework.common.util.object.ConvertUtils; import com.iailab.module.model.mpk.dao.ProjectModelDao; +import com.iailab.module.model.mpk.dto.MpkFileDTO; import com.iailab.module.model.mpk.dto.ProjectModelDTO; import com.iailab.module.model.mpk.entity.ProjectModelEntity; import com.iailab.module.model.mpk.service.ProjectModelService; -import org.apache.commons.collections.CollectionUtils; import org.apache.commons.lang3.StringUtils; import org.springframework.stereotype.Service; +import java.util.ArrayList; import java.util.List; import java.util.Map; +import java.util.UUID; /** * @description: @@ -34,6 +36,19 @@ } @Override + public void create(List<MpkFileDTO> models, String projectId) { + List<ProjectModelEntity> list = new ArrayList<>(models.size()); + for (MpkFileDTO model : models) { + ProjectModelEntity projectModel = new ProjectModelEntity(); + projectModel.setId(UUID.randomUUID().toString()); + projectModel.setProjectId(projectId); + projectModel.setModelId(model.getId()); + list.add(projectModel); + } + baseDao.insert(list); + } + + @Override public QueryWrapper<ProjectModelEntity> getWrapper(Map<String, Object> params){ String id = (String)params.get("id"); String projectId = (String)params.get("projectId"); -- Gitblit v1.9.3