bug
This commit is contained in:
parent
f8b9f1bfee
commit
d63f4abbcd
@ -77,11 +77,13 @@ public class ApplicationServiceImpl implements ApplicationService {
|
||||
|
||||
//prompt使用量+1
|
||||
Long promptId = application.getPromptId();
|
||||
PromptTemplatesRespVO promptTemplates = promptTemplatesService.getPromptTemplates(promptId);
|
||||
PromptTemplatesDO promptTemplatesDO = new PromptTemplatesDO();
|
||||
promptTemplatesDO.setUseCount(promptTemplates.getUseCount() == null?1:promptTemplates.getUseCount() + 1);
|
||||
promptTemplatesDO.setId(promptTemplates.getId());
|
||||
promptTemplatesService.updatePromptTemplatesById(promptTemplatesDO);
|
||||
if(promptId != null){
|
||||
PromptTemplatesRespVO promptTemplates = promptTemplatesService.getPromptTemplates(promptId);
|
||||
PromptTemplatesDO promptTemplatesDO = new PromptTemplatesDO();
|
||||
promptTemplatesDO.setUseCount(promptTemplates.getUseCount() == null?1:promptTemplates.getUseCount() + 1);
|
||||
promptTemplatesDO.setId(promptTemplates.getId());
|
||||
promptTemplatesService.updatePromptTemplatesById(promptTemplatesDO);
|
||||
}
|
||||
// 返回
|
||||
return application.getId();
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user