This commit is contained in:
ire 2025-01-04 10:09:36 +08:00
parent 08c8134a3b
commit 5507813152

View File

@ -1,5 +1,6 @@
package cn.iocoder.yudao.module.llm.service.prompttemplates;
import cn.iocoder.yudao.framework.common.exception.ErrorCode;
import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils;
import cn.iocoder.yudao.module.llm.controller.admin.prompttemplatesbackup.vo.PromptTemplatesBackupSaveReqVO;
import cn.iocoder.yudao.module.llm.dal.dataobject.application.ApplicationDO;
@ -258,7 +259,7 @@ public class PromptTemplatesServiceImpl implements PromptTemplatesService {
for (String tagId : tagIds) {
labelNameList.add(labelMap.get(Long.parseLong(tagId)));
}
// respVO.setTagIds(tagIds);
respVO.setTagIds(tagIds);
respVO.setTagNames(labelNameList);
}
} catch(Exception e) {
@ -330,6 +331,9 @@ public class PromptTemplatesServiceImpl implements PromptTemplatesService {
if(templatesDo == null) {
throw exception(PROMPT_TEMPLATES_NOT_EXISTS);
}
if(templatesDo.getBackupId() != null && templatesDo.getBackupId() != 0){
throw exception(new ErrorCode(500,"已存在备份,不能再备份"));
}
this.promptTemplatesBackupService.isBackup(updateReqVO.getId());
PromptTemplatesBackupSaveReqVO templatesBackupDo = BeanUtils.toBean(templatesDo, PromptTemplatesBackupSaveReqVO.class);
templatesBackupDo.setId(null);