Files
love-nav/src/main/java/com/lovenav/controller/CommentComtroller.java
2023-12-20 17:22:56 +08:00

23 lines
827 B
Java

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);
}
}