添加点赞++功能
This commit is contained in:
22
src/main/java/com/lovenav/controller/CommentComtroller.java
Normal file
22
src/main/java/com/lovenav/controller/CommentComtroller.java
Normal 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);
|
||||
}
|
||||
|
||||
|
||||
}
|
Reference in New Issue
Block a user