Commit 23f52828 authored by 刘基明's avatar 刘基明

转发返回

parent 31ec71c4
...@@ -68,7 +68,7 @@ public class ThemeController { ...@@ -68,7 +68,7 @@ public class ThemeController {
@ApiOperation("转发主题") @ApiOperation("转发主题")
@PostMapping(value = "/forward") @PostMapping(value = "/forward")
@ResponseBody @ResponseBody
public CommonResp forwardTheme(@Validated @RequestBody ForwardThemeReq forwardThemeReq) { public CommonResp<CreateThemeResp> forwardTheme(@Validated @RequestBody ForwardThemeReq forwardThemeReq) {
String userId = userHolder.getUserId(); String userId = userHolder.getUserId();
themeManager.forward(forwardThemeReq, userId); themeManager.forward(forwardThemeReq, userId);
return CommonResp.success(); return CommonResp.success();
......
...@@ -209,7 +209,7 @@ public class ThemeManager { ...@@ -209,7 +209,7 @@ public class ThemeManager {
} }
//转发 //转发
public void forward(ForwardThemeReq req, String userId) { public CreateThemeResp forward(ForwardThemeReq req, String userId) {
ThemeEntity targetTheme = themeService.queryByThemeId(req.getFormerThemeId()); ThemeEntity targetTheme = themeService.queryByThemeId(req.getFormerThemeId());
ThemeEntity newTheme = ThemeEntity.builder() ThemeEntity newTheme = ThemeEntity.builder()
.content(JsonUtil.toJson(req.getContent())) .content(JsonUtil.toJson(req.getContent()))
...@@ -226,6 +226,7 @@ public class ThemeManager { ...@@ -226,6 +226,7 @@ public class ThemeManager {
//修改 //修改
themeService.update(newTheme, req.getEditThemeId()); themeService.update(newTheme, req.getEditThemeId());
} }
return CreateThemeResp.builder().themeId(newTheme.getThemeId()).build();
} }
......
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