新增了评论1
This commit is contained in:
parent
f719a1d347
commit
fcf9ca6744
@ -315,6 +315,7 @@ public class CaseClinicalArticleController {
|
|||||||
dto.setUserIden(null);
|
dto.setUserIden(null);
|
||||||
|
|
||||||
// 获取次级评论
|
// 获取次级评论
|
||||||
|
if (request.getIsHaveSubComment() == 1){
|
||||||
if (dto.getRootId() == null){
|
if (dto.getRootId() == null){
|
||||||
List<UserCommentClinicalArticleDto> subComments = userCommentClinicalArticleDao.getClinicalArticleCommentList(
|
List<UserCommentClinicalArticleDto> subComments = userCommentClinicalArticleDao.getClinicalArticleCommentList(
|
||||||
dto.getArticleId(),
|
dto.getArticleId(),
|
||||||
@ -325,6 +326,7 @@ public class CaseClinicalArticleController {
|
|||||||
dto.setSubComment(subComments);
|
dto.setSubComment(subComments);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
resultMap.put("page", resultPage.getCurrent());
|
resultMap.put("page", resultPage.getCurrent());
|
||||||
resultMap.put("pageSize", resultPage.getSize());
|
resultMap.put("pageSize", resultPage.getSize());
|
||||||
|
|||||||
@ -7,6 +7,7 @@ import com.example.caseData.common.Response;
|
|||||||
import com.example.caseData.dao.*;
|
import com.example.caseData.dao.*;
|
||||||
import com.example.caseData.dto.T;
|
import com.example.caseData.dto.T;
|
||||||
import com.example.caseData.dto.caseClinicalVideo.CaseClinicalVideoDto;
|
import com.example.caseData.dto.caseClinicalVideo.CaseClinicalVideoDto;
|
||||||
|
import com.example.caseData.dto.userCommentClinicalArticle.UserCommentClinicalArticleDto;
|
||||||
import com.example.caseData.dto.userCommentClinicalVideo.UserCommentClinicalVideoDto;
|
import com.example.caseData.dto.userCommentClinicalVideo.UserCommentClinicalVideoDto;
|
||||||
import com.example.caseData.exception.BusinessException;
|
import com.example.caseData.exception.BusinessException;
|
||||||
import com.example.caseData.model.*;
|
import com.example.caseData.model.*;
|
||||||
@ -313,6 +314,7 @@ public class CaseClinicalVideoController {
|
|||||||
dto.setUserIden(null);
|
dto.setUserIden(null);
|
||||||
|
|
||||||
// 获取次级评论
|
// 获取次级评论
|
||||||
|
if (request.getIsHaveSubComment() == 1){
|
||||||
if (dto.getRootId() == null){
|
if (dto.getRootId() == null){
|
||||||
List<UserCommentClinicalVideoDto> subComments = userCommentClinicalVideoDao.getClinicalVideoCommentList(
|
List<UserCommentClinicalVideoDto> subComments = userCommentClinicalVideoDao.getClinicalVideoCommentList(
|
||||||
dto.getVideoId(),
|
dto.getVideoId(),
|
||||||
@ -323,6 +325,7 @@ public class CaseClinicalVideoController {
|
|||||||
dto.setSubComment(subComments);
|
dto.setSubComment(subComments);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
resultMap.put("page", resultPage.getCurrent());
|
resultMap.put("page", resultPage.getCurrent());
|
||||||
resultMap.put("pageSize", resultPage.getSize());
|
resultMap.put("pageSize", resultPage.getSize());
|
||||||
|
|||||||
@ -29,6 +29,10 @@ public class getClinicalArticleCommentPage {
|
|||||||
@JsonProperty("root_id")
|
@JsonProperty("root_id")
|
||||||
private String rootId;
|
private String rootId;
|
||||||
|
|
||||||
|
// 是否需要子评论(0:否 1:是)
|
||||||
|
@JsonProperty("is_have_sub_comment")
|
||||||
|
private Integer isHaveSubComment;
|
||||||
|
|
||||||
// ✅ 校验分页参数
|
// ✅ 校验分页参数
|
||||||
public void validateForPage() {
|
public void validateForPage() {
|
||||||
// 如果 page 为空,设为默认值 1
|
// 如果 page 为空,设为默认值 1
|
||||||
|
|||||||
@ -25,6 +25,10 @@ public class getClinicalVideoCommentPage {
|
|||||||
@JsonProperty("root_id")
|
@JsonProperty("root_id")
|
||||||
private String rootId;
|
private String rootId;
|
||||||
|
|
||||||
|
// 是否需要子评论(0:否 1:是)
|
||||||
|
@JsonProperty("is_have_sub_comment")
|
||||||
|
private Integer isHaveSubComment;
|
||||||
|
|
||||||
// ✅ 校验分页参数
|
// ✅ 校验分页参数
|
||||||
public void validateForPage() {
|
public void validateForPage() {
|
||||||
// 如果 page 为空,设为默认值 1
|
// 如果 page 为空,设为默认值 1
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user