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

转发返回

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