This commit is contained in:
Leo
2025-12-04 15:47:39 +08:00
parent 570fcb0b93
commit a20e92d7bf

View File

@@ -58,7 +58,7 @@ public class SocialMediaPromptController {
templateInfo.put("key", key); templateInfo.put("key", key);
templateInfo.put("description", TEMPLATE_DESCRIPTIONS.get(key)); templateInfo.put("description", TEMPLATE_DESCRIPTIONS.get(key));
String template = getTemplate(key); String template = getTemplateFromRedis(key);
templateInfo.put("template", template); templateInfo.put("template", template);
templateInfo.put("isDefault", template == null); templateInfo.put("isDefault", template == null);
@@ -92,7 +92,7 @@ public class SocialMediaPromptController {
return response; return response;
} }
String template = getTemplate(key); String template = getTemplateFromRedis(key);
Map<String, Object> data = new HashMap<>(); Map<String, Object> data = new HashMap<>();
data.put("key", key); data.put("key", key);
data.put("description", TEMPLATE_DESCRIPTIONS.get(key)); data.put("description", TEMPLATE_DESCRIPTIONS.get(key));
@@ -202,7 +202,7 @@ public class SocialMediaPromptController {
/** /**
* 从 Redis 获取模板 * 从 Redis 获取模板
*/ */
private String getTemplate(String key) { private String getTemplateFromRedis(String key) {
if (redisTemplate == null) { if (redisTemplate == null) {
return null; return null;
} }