[update] Prompt模版备份详情获取修改
This commit is contained in:
parent
8594dfbffb
commit
fbdd3274ae
@ -1,33 +1,20 @@
|
||||
package cn.iocoder.yudao.module.llm.controller.admin.prompttemplatesbackup;
|
||||
|
||||
import cn.iocoder.yudao.module.llm.controller.admin.prompttemplates.vo.PromptTemplatesSaveReqVO;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import javax.annotation.Resource;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import io.swagger.v3.oas.annotations.Parameter;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
|
||||
import javax.validation.constraints.*;
|
||||
import javax.validation.*;
|
||||
import javax.servlet.http.*;
|
||||
import java.util.*;
|
||||
import java.io.IOException;
|
||||
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
import cn.iocoder.yudao.framework.common.pojo.CommonResult;
|
||||
import cn.iocoder.yudao.framework.common.util.object.BeanUtils;
|
||||
|
||||
import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
|
||||
|
||||
import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils;
|
||||
|
||||
import cn.iocoder.yudao.framework.apilog.core.annotation.ApiAccessLog;
|
||||
import static cn.iocoder.yudao.framework.apilog.core.enums.OperateTypeEnum.*;
|
||||
|
||||
import cn.iocoder.yudao.module.llm.controller.admin.prompttemplatesbackup.vo.*;
|
||||
import cn.iocoder.yudao.module.llm.dal.dataobject.prompttemplatesbackup.PromptTemplatesBackupDO;
|
||||
import cn.iocoder.yudao.module.llm.service.prompttemplatesbackup.PromptTemplatesBackupService;
|
||||
|
||||
@Tag(name = "管理后台 - Prompt模板备份")
|
||||
|
@ -139,9 +139,10 @@ public class PromptTemplatesBackupServiceImpl implements PromptTemplatesBackupSe
|
||||
if(templatesDO == null) {
|
||||
return null;
|
||||
}
|
||||
|
||||
PromptTemplatesBackupRespVO promptTemplates = BeanUtils.toBean(templatesDO, PromptTemplatesBackupRespVO.class);
|
||||
List<PromptTemplatesTagsDO> tagDOList = this.promptTemplatesTagsMapper
|
||||
.selectList("prompt_template_id", id);
|
||||
.selectList("prompt_template_id", templatesDO.getSrcId());
|
||||
if(tagDOList!=null && !tagDOList.isEmpty()) {
|
||||
List<String> tagIds = tagDOList.stream()
|
||||
.map(p->p.getTagId().toString())
|
||||
@ -149,7 +150,7 @@ public class PromptTemplatesBackupServiceImpl implements PromptTemplatesBackupSe
|
||||
promptTemplates.setTagIds(tagIds);
|
||||
}
|
||||
List<PromptTemplatesApplicationsDO> applicationDOList = this.promptTemplatesApplicationsMapper
|
||||
.selectList("prompt_template_id", id);
|
||||
.selectList("prompt_template_id", templatesDO.getSrcId());
|
||||
if(applicationDOList!=null && !applicationDOList.isEmpty()) {
|
||||
List<String> applicationIds = applicationDOList.stream()
|
||||
.map(p->p.getApplicationId().toString())
|
||||
|
Loading…
x
Reference in New Issue
Block a user