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

18 lines
509 B
Java

package com.lovenav.service.serviceImpl;
import com.lovenav.dao.CommentDao;
import com.lovenav.entity.Comment;
import com.lovenav.service.CommentService;
import org.springframework.beans.factory.annotation.Autowired;
public class CommentServiceImpl implements CommentService {
private CommentDao commentDao;
// 点赞++
public int AddLikeCount(Comment comment){
comment.setLikeCount(comment.getLikeCount()+1);
return commentDao.updateByPrimaryKeySelective(comment);
}
}