评论修改

This commit is contained in:
zhn
2022-04-29 16:56:20 +08:00
parent be23f7a176
commit 9881a40a1e
4 changed files with 6 additions and 6 deletions
@@ -67,8 +67,8 @@ public class ProjectCommentEOController extends JeroController<ProjectCommentEO,
@AutoLog(value = "法规清单评论表-列表查询")
@ApiOperation(value="法规清单评论表-列表查询", notes="法规清单评论表-列表查询")
@GetMapping(value = "/list")
public Result<List<ProjectCommentVO>> queryList() {
List<ProjectCommentVO> list = projectCommentEOService.getInfoList();
public Result<List<ProjectCommentVO>> queryList(ProjectCommentEO projectCommentEO) {
List<ProjectCommentVO> list = projectCommentEOService.getInfoList(projectCommentEO);
return Result.OK(list);
}
@@ -80,7 +80,7 @@ public class ProjectReplyEOController extends JeroController<ProjectReplyEO, IPr
@AutoLog(value = "法规清单回复表-添加")
@ApiOperation(value="法规清单回复表-添加", notes="法规清单回复表-添加")
@PostMapping(value = "/add")
public Result<?> add(ProjectReplyEO projectReplyEO) {
public Result<?> add(@RequestBody ProjectReplyEO projectReplyEO) {
projectReplyEOService.add(projectReplyEO);
return Result.OK("添加成功!");
}
@@ -62,5 +62,5 @@ public interface IProjectCommentEOService extends IService<ProjectCommentEO> {
List<ProjectCommentEO> queryList();
List<ProjectCommentVO> getInfoList();
List<ProjectCommentVO> getInfoList(ProjectCommentEO projectCommentEO);
}
@@ -101,11 +101,11 @@ public class ProjectCommentEOServiceImpl extends ServiceImpl<ProjectCommentEOMap
}
@Override
public List<ProjectCommentVO> getInfoList() {
public List<ProjectCommentVO> getInfoList(ProjectCommentEO projectCommentEOTemp) {
LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
//评论的内容
LambdaQueryWrapper<ProjectCommentEO> wrapper = new LambdaQueryWrapper<>();
wrapper.in(ProjectCommentEO::getCreateBy,sysUser.getUsername());
wrapper.in(ProjectCommentEO::getCreateBy,sysUser.getUsername()).in(ProjectCommentEO::getProjectLibraryId,projectCommentEOTemp.getProjectLibraryId());
List<ProjectCommentEO> projectCommentEOS = this.list(wrapper);
List<String> projectCommentIdList = projectCommentEOS.stream().map(ProjectCommentEO::getId).collect(Collectors.toList());