修改了评论1
This commit is contained in:
parent
872598cffe
commit
1064bc0b84
@ -300,6 +300,9 @@ public class CaseClinicalArticleController {
|
||||
return Response.error();
|
||||
}
|
||||
|
||||
// 是否作者
|
||||
int isAuthor = 0;
|
||||
|
||||
// 获取文章作者数据
|
||||
LambdaQueryWrapper<CaseClinicalArticleAuthorModel> authorQueryWrapper = new LambdaQueryWrapper<>();
|
||||
authorQueryWrapper.eq(CaseClinicalArticleAuthorModel::getArticleId, request.getArticleId());
|
||||
@ -312,10 +315,8 @@ public class CaseClinicalArticleController {
|
||||
}
|
||||
|
||||
// 处理是否本人评论
|
||||
for (UserCommentClinicalArticleDto dto : resultPage.getRecords()) {
|
||||
if (Objects.equals(dto.getUserIden(), caseClinicalDoctor.getDoctorIden())){
|
||||
dto.setIsAuthor(1);
|
||||
}
|
||||
if (Objects.equals(user.getUserIden(), caseClinicalDoctor.getDoctorIden())){
|
||||
isAuthor = 1;
|
||||
}
|
||||
}
|
||||
|
||||
@ -345,6 +346,7 @@ public class CaseClinicalArticleController {
|
||||
resultMap.put("pageSize", resultPage.getSize());
|
||||
resultMap.put("total", resultPage.getTotal());
|
||||
resultMap.put("data", resultPage.getRecords());
|
||||
resultMap.put("is_author", isAuthor);
|
||||
return Response.success(resultMap);
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user