Commit 4dccb4b9 authored by 张辰's avatar 张辰

帖子删除返回友好

parent eeee44b2
...@@ -56,8 +56,6 @@ public class ThemeQo implements Serializable { ...@@ -56,8 +56,6 @@ public class ThemeQo implements Serializable {
@ApiModelProperty(value = "当前用户是否关注该作者") @ApiModelProperty(value = "当前用户是否关注该作者")
public boolean follow; public boolean follow;
@ApiModelProperty(value = "认证机构") @ApiModelProperty(value = "认证机构")
private String authOrg; private String authOrg;
......
...@@ -447,7 +447,7 @@ public class ThemeManager { ...@@ -447,7 +447,7 @@ public class ThemeManager {
// 查询正文 // 查询正文
public CommonResp<ThemeQo> getThemeDetail(String themeId, String userId) { public CommonResp<ThemeQo> getThemeDetail(String themeId, String userId) {
ThemeEntity themeEntity = themeService.queryByThemeId(themeId); ThemeEntity themeEntity = themeService.queryByThemeIdIgnoreDelete(themeId);
if (themeEntity == null) { if (themeEntity == null) {
throw new BizException("找不到帖子id:" + themeId); throw new BizException("找不到帖子id:" + themeId);
} }
......
...@@ -76,6 +76,12 @@ public class ThemeService { ...@@ -76,6 +76,12 @@ public class ThemeService {
.eq(ThemeEntity::getDeleteTag, DeleteTagEnum.NOT_DELETED.getCode())); .eq(ThemeEntity::getDeleteTag, DeleteTagEnum.NOT_DELETED.getCode()));
} }
//根据id返回主题详情(未删)
public ThemeEntity queryByThemeIdIgnoreDelete(String themeId) {
return themeMapper.selectOne(new LambdaQueryWrapper<ThemeEntity>()
.eq(ThemeEntity::getThemeId, themeId));
}
//根据用户id查询主题list //根据用户id查询主题list
public List<ThemeEntity> queryThemesByUserIdCreateDesc(String userId, String lastId, Integer pageSize) { public List<ThemeEntity> queryThemesByUserIdCreateDesc(String userId, String lastId, Integer pageSize) {
LambdaQueryWrapper<ThemeEntity> queryWrapper = new LambdaQueryWrapper<ThemeEntity>() LambdaQueryWrapper<ThemeEntity> queryWrapper = new LambdaQueryWrapper<ThemeEntity>()
......
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