提交 b66e56a0 authored 作者: lvwei's avatar lvwei

--no commit message

上级 c83ef8b5
......@@ -47,4 +47,9 @@ public class CommentController {
return CallBack.success(commentService.pageComment(pageParam));
}
@ApiOperation("删除评论")
@GetMapping(ResourceRequestPath.DELETE_OID)
public CallBack<Boolean> delete(@PathVariable Integer oid) {
return CallBack.success(commentService.delete(oid));
}
}
......@@ -35,5 +35,14 @@ public interface CommentService extends BaseService<Comment, Integer> {
* @date: 2019年4月20日 上午10:41:30
*/
PageInfo<FgCommentVo> pageComment(PageParam pageParam);
/**
* 删除评论
* @param oid
* @return
* @author lw
* @date: 2019年5月13日 上午9:32:26
*/
Boolean delete(Integer oid);
}
......@@ -106,10 +106,17 @@ public class CommentServiceImpl extends BaseServiceImpl<Comment, Integer> implem
} catch (Exception e) {
logger.error("评论:" + comment.getId() + "获取评论(根据用户)异常\n" + e.getMessage());
}
fgCommentVo.setStatusZh(CommentStatusEnum.getName(fgCommentVo.getStatus()));
return fgCommentVo;
}).collect(Collectors.toList());
return new PageInfo<FgCommentVo>(fgCommentVos);
}
@Override
public Boolean delete(Integer oid) {
commentMapper.deleteByPrimaryKey(oid);
return true;
}
}
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论