提交 761f4dae 编写于 作者: 夏天。。's avatar 夏天。。

时空胶囊接口后台管理员管理接口

上级 d9423e57
......@@ -23,7 +23,7 @@ public class SwaggerConfig extends BaseSwaggerConfig {
.apiBasePackage("com.mobius.modules")
.title("Mobius前台")
.description("MMobius前台管理接口文档")
.contactName("hzd")
.contactName("mobius")
.version("1.0")
.enableSecurity(false)
.build();
......
......@@ -37,6 +37,7 @@ public class LmsDraftLetterServiceImpl implements LmsDraftLetterService {
LmsLetterContent content = new LmsLetterContent();
BeanUtil.copyProperties(saveLetterContentVO, content);
final Long contentId = saveLetterContentVO.getContentId();
final UmsUser currentUser = userService.getCurrentUser();
if (contentId != null) {
content.setId(contentId);
//如果前端传入id不为空,这里设置的值就不为null,然后要查询一下数据库,确保传入的id是正确的,才能继续接下去的操作
......@@ -44,7 +45,6 @@ public class LmsDraftLetterServiceImpl implements LmsDraftLetterService {
if (null == contentFound) {
throw new ApiException("未找到信件内容id对应的信件内容");
}
final UmsUser currentUser = userService.getCurrentUser();
contentFound.setContent(saveLetterContentVO.getContent());
contentFound.setTitle(saveLetterContentVO.getTitle());
contentFound.setIsDraft(isDraft);
......@@ -56,6 +56,7 @@ public class LmsDraftLetterServiceImpl implements LmsDraftLetterService {
}
} else {
content.setIsDraft(isDraft);
content.setUserId(currentUser.getId());
if (letterContentService.save(content)) {
return content.getId();
} else {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册