From f2c268683c416d4c54ebe6153a8e744fca4c19e5 Mon Sep 17 00:00:00 2001 From: shahaibo <1023316923@qq.com> Date: Tue, 3 Jun 2025 15:05:40 +0800 Subject: [PATCH] =?UTF-8?q?TASK:collection=20sort=EF=BC=9B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ai/da/service/impl/LLMServiceImpl.java | 24 +++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/src/main/java/com/ai/da/service/impl/LLMServiceImpl.java b/src/main/java/com/ai/da/service/impl/LLMServiceImpl.java index f7313d63..1e59c5ba 100644 --- a/src/main/java/com/ai/da/service/impl/LLMServiceImpl.java +++ b/src/main/java/com/ai/da/service/impl/LLMServiceImpl.java @@ -2,7 +2,9 @@ package com.ai.da.service.impl; import com.ai.da.common.constant.CommonConstant; import com.ai.da.common.context.UserContext; +import com.ai.da.common.enums.CollectionLevel1TypeEnum; import com.ai.da.common.response.PageBaseResponse; +import com.ai.da.common.response.PageResponse; import com.ai.da.common.response.Response; import com.ai.da.common.security.jwt.JWTTokenHelper; import com.ai.da.common.utils.MinioUtil; @@ -65,6 +67,10 @@ public class LLMServiceImpl implements LLMService { @Resource private DesignService designService; private final ExecutorService executor = Executors.newCachedThreadPool(); + @Resource + private CollectionElementMapper collectionElementMapper; + @Resource + private CollectionElementRelModelMapper collectionElementRelModelMapper; @Override public SseEmitter stream(String prompt, Long projectParamId, String fileUrl, List imageUrlList, String token, Boolean enableThinking, String process) { @@ -455,6 +461,24 @@ public class LLMServiceImpl implements LLMService { SysFile sysFile = sysFileService.getOneBySex(styleName, workspace.getSex(), workspace.getAgeGroup()); + CollectionElement collectionElement = new CollectionElement(); + collectionElement.setAccountId(userHolder.getId()); + collectionElement.setProjectId(project.getId()); + collectionElement.setLevel1Type(CollectionLevel1TypeEnum.MODEL.getRealName()); +// collectionElement.setLevel2Type(board.getLevel2Type()); + collectionElement.setName(sysFile.getName()); + collectionElement.setUrl(sysFile.getUrl()); +// collectionElement.setHasPin(board.getIsPin()); + collectionElement.setMd5(sysFile.getMd5()); + collectionElement.setCreateDate(new Date()); + collectionElement.setHasPin((byte) 0); + collectionElementMapper.insert(collectionElement); + CollectionElementRelModel collectionElementRelModel = new CollectionElementRelModel(); + collectionElementRelModel.setCollectionElementId(collectionElement.getId()); + collectionElementRelModel.setRelationId(sysFile.getId()); + collectionElementRelModel.setRelationType("System"); + collectionElementRelModelMapper.insert(collectionElementRelModel); + if (workspace.getSex().equals(Sex.FEMALE.getValue())) { workspace.setMannequinFemaleId(sysFile.getId()); workspace.setMannequinFemaleType("System");