提交 a26f7a85 authored 作者: Whispa's avatar Whispa

commit commit

上级 cc541734
......@@ -12,12 +12,12 @@ import org.springframework.transaction.annotation.Transactional;
public interface LikeRepository extends PagingAndSortingRepository<PostLike, String> {
Page<PostLike> findAllByPost_Id(String postId, Pageable pageable);
@Query(value = "delete from post_like WHERE user_info_user_id=:userId and post_id=:post",nativeQuery = true)
@Query(value = "delete from post_like_v2 WHERE user_info_user_id=:userId and post_id=:post",nativeQuery = true)
@Modifying
@Transactional
void removeByUser_IdAndPost_Id(@Param("userId") String user_id, @Param("post") String post_id);
@Query(value = "delete from post_like WHERE post_id=:post",nativeQuery = true)
@Query(value = "delete from post_like_v2 WHERE post_id=:post",nativeQuery = true)
@Modifying
@Transactional
void removeByPost_Id(@Param("post") String post_id);
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论