diff --git a/rc-service/rc-service-other/other-application/src/main/java/com/red/circle/other/app/command/dynamic/DynamicCommentCmdExe.java b/rc-service/rc-service-other/other-application/src/main/java/com/red/circle/other/app/command/dynamic/DynamicCommentCmdExe.java index 478aa3b4..880c3b7c 100644 --- a/rc-service/rc-service-other/other-application/src/main/java/com/red/circle/other/app/command/dynamic/DynamicCommentCmdExe.java +++ b/rc-service/rc-service-other/other-application/src/main/java/com/red/circle/other/app/command/dynamic/DynamicCommentCmdExe.java @@ -96,7 +96,7 @@ public class DynamicCommentCmdExe { commentListCO.setToUserId(dynamicComment.getToUserId()); commentListCO.setContent(dynamicComment.getContent()); commentListCO.setCreateTime(dynamicComment.getCreateTime()); - commentListCO.setRootCommentId(dynamicComment.getRootCommentId()); + commentListCO.setRootCommentId(Objects.isNull(dynamicComment.getRootCommentId()) ? dynamicComment.getId() : dynamicComment.getRootCommentId()); UserProfile userProfile = userProfileMap.get(dynamicComment.getCreateUser()); if (userProfile != null) {