Commit 97d39338 authored by 刘基明's avatar 刘基明

編輯

parent 8c40abcc
......@@ -74,20 +74,23 @@ public class ThemeManager {
themeEntity.setAuthorId(userId);
themeEntity.setContent(JsonUtil.toJson(req.getContent()));
//保存附件表
List<ThemeAttachmentEntity> themeAttachments = ConvertUtil.themeReqToAttachmentList(req, themeEntity.getThemeId());
if (StringUtils.isEmpty(req.getEditThemeId())) {
//新建
themeService.insertTheme(themeEntity);
themeAttachmentService.insertList(themeAttachments);
} else {
//修改
themeService.update(themeEntity, req.getEditThemeId());
themeEntity.setThemeId(req.getEditThemeId());
}
//保存附件表
List<ThemeAttachmentEntity> themeAttachments = ConvertUtil.themeReqToAttachmentList(req, themeEntity.getThemeId());
if (StringUtils.isNotEmpty(req.getEditThemeId())) {
//修改需要刪除
themeAttachmentService.deleteByThemeId(req.getEditThemeId());
themeAttachmentService.insertList(themeAttachments);
}
themeAttachmentService.insertList(themeAttachments);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment