Teacher, the user_id value under the comment should be $Think.session.user_id. If you do that, the user_id of the comment will become the user_id of the published article.
I think it should be in the controller First call the isLogin method in the Base controller to determine whether the user is logged in, and then perform the comment operation. Am I right to say that? Teacher.
Your analysis makes sense, you should just use a set of sessions