bug修复

This commit is contained in:
2025-02-05 11:28:50 +08:00
parent 0b861f0e21
commit 7892c0f5cc
21 changed files with 324 additions and 95 deletions

View File

@ -73,6 +73,9 @@ public class TemplateRepository {
return JSONObject.parseObject(redisTemplate.opsForValue().get(String.format(TEMPLATE_CACHE_KEY, templateId)), TemplateRespVO.class);
}
TemplateRespVO template = templateMapper.getById(templateId);
if (template == null) {
return null;
}
if (null == template.getPid() || template.getPid() == 0) {
template.setChildren(templateMapper.getByPid(templateId));
redisTemplate.opsForValue().set(String.format(TEMPLATE_CACHE_KEY, templateId), JSONObject.toJSONString(template));