From b06162b2966eea4f092b3edf3032de843059af4b Mon Sep 17 00:00:00 2001 From: cloudroam <cloudroam> Date: 星期四, 12 六月 2025 18:16:10 +0800 Subject: [PATCH] add: 评论开发 --- src/main/java/com/mzl/flower/mapper/film/CommentPoMapper.java | 6 ++++++ 1 files changed, 6 insertions(+), 0 deletions(-) diff --git a/src/main/java/com/mzl/flower/mapper/film/CommentPoMapper.java b/src/main/java/com/mzl/flower/mapper/film/CommentPoMapper.java index 7ea15f3..58496d8 100644 --- a/src/main/java/com/mzl/flower/mapper/film/CommentPoMapper.java +++ b/src/main/java/com/mzl/flower/mapper/film/CommentPoMapper.java @@ -3,7 +3,9 @@ import com.mzl.flower.entity.film.CommentPo; import com.mzl.flower.entity.film.CommentPoExample; import org.apache.ibatis.annotations.Param; +import org.apache.ibatis.annotations.Select; +import java.time.LocalDate; import java.util.List; @@ -99,4 +101,8 @@ int updateByPrimaryKey(CommentPo record); List<CommentPo> selectByArticleId(Integer articleId); + + + @Select("SELECT COUNT(*) FROM film_comments WHERE film_id = #{filmId} AND DATE(create_time) = #{date} and deleted = '0' ") + int countByFilmIdAndDate(Long id, LocalDate yesterday); } \ No newline at end of file -- Gitblit v1.9.3