添加点赞++功能

This commit is contained in:
sjm
2023-12-20 17:22:56 +08:00
parent a001f2f05f
commit 09165ec608
4 changed files with 127 additions and 0 deletions

View File

@@ -0,0 +1,22 @@
package com.lovenav.controller;
import com.lovenav.entity.Comment;
import com.lovenav.service.CommentService;
import com.lovenav.service.serviceImpl.CommentServiceImpl;
import org.springframework.stereotype.Component;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
@RestController
public class CommentComtroller {
private CommentServiceImpl commentServiceImpl;
@PostMapping(value= "/AddLikeCount",produces="application/json;charset=UTF-8")
public int AddLikeCount(@RequestBody Comment comment) {
return commentServiceImpl.AddLikeCount(comment);
}
}