|
@ -110,6 +110,7 @@ public class UserProjectController { |
|
|
UserProjectEntity userProjectEntity = new UserProjectEntity(); |
|
|
UserProjectEntity userProjectEntity = new UserProjectEntity(); |
|
|
BeanUtil.copyProperties(projectTemplateEntity, userProjectEntity, UserProjectEntity.Fields.status); |
|
|
BeanUtil.copyProperties(projectTemplateEntity, userProjectEntity, UserProjectEntity.Fields.status); |
|
|
userProjectEntity.setId(null); |
|
|
userProjectEntity.setId(null); |
|
|
|
|
|
userProjectEntity.setCustomerId(null); |
|
|
userProjectEntity.setSourceType(ProjectSourceTypeEnum.TEMPLATE); |
|
|
userProjectEntity.setSourceType(ProjectSourceTypeEnum.TEMPLATE); |
|
|
userProjectEntity.setSourceId(projectTemplateEntity.getId()); |
|
|
userProjectEntity.setSourceId(projectTemplateEntity.getId()); |
|
|
userProjectEntity.setKey(IdUtil.fastSimpleUUID()); |
|
|
userProjectEntity.setKey(IdUtil.fastSimpleUUID()); |
|
@ -123,6 +124,7 @@ public class UserProjectController { |
|
|
List<UserProjectItemEntity> userProjectItemEntityList = JsonUtils.jsonToList(JsonUtils.objToJson(projectTemplateItemEntities), UserProjectItemEntity.class); |
|
|
List<UserProjectItemEntity> userProjectItemEntityList = JsonUtils.jsonToList(JsonUtils.objToJson(projectTemplateItemEntities), UserProjectItemEntity.class); |
|
|
userProjectItemEntityList.forEach(item -> { |
|
|
userProjectItemEntityList.forEach(item -> { |
|
|
item.setId(null); |
|
|
item.setId(null); |
|
|
|
|
|
item.setCustomerId(null); |
|
|
item.setProjectKey(userProjectEntity.getKey());}); |
|
|
item.setProjectKey(userProjectEntity.getKey());}); |
|
|
projectItemService.saveBatch(userProjectItemEntityList); |
|
|
projectItemService.saveBatch(userProjectItemEntityList); |
|
|
|
|
|
|
|
|