Compare commits
2 Commits
69d1d91f5e
...
ee67d1ae8f
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ee67d1ae8f | ||
|
|
a20e92d7bf |
@@ -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;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user