Interface ProdFavoritesRepo

All Superinterfaces:
org.springframework.data.repository.CrudRepository<ProdFavoritesEntity,ProdFavoritesEntity.ProdFavoriteID>, JpaRepository<ProdFavoritesEntity,ProdFavoritesEntity.ProdFavoriteID>, org.springframework.data.repository.ListCrudRepository<ProdFavoritesEntity,ProdFavoritesEntity.ProdFavoriteID>, org.springframework.data.repository.ListPagingAndSortingRepository<ProdFavoritesEntity,ProdFavoritesEntity.ProdFavoriteID>, org.springframework.data.repository.PagingAndSortingRepository<ProdFavoritesEntity,ProdFavoritesEntity.ProdFavoriteID>, org.springframework.data.repository.query.QueryByExampleExecutor<ProdFavoritesEntity>, org.springframework.data.repository.Repository<ProdFavoritesEntity,ProdFavoritesEntity.ProdFavoriteID>

public interface ProdFavoritesRepo extends JpaRepository<ProdFavoritesEntity,ProdFavoritesEntity.ProdFavoriteID>
Author:
Liang123456123
  • Method Details

    • findByProductProductIDAndNotifyStatus

      List<ProdFavoritesEntity> findByProductProductIDAndNotifyStatus(Integer productID, Integer notifyStatus)
    • findByMemberIDAndProductID

      @Query("SELECT f FROM ProdFavoritesEntity f WHERE f.member.memberID = :memberID AND f.product.productID = :productID") Optional<ProdFavoritesEntity> findByMemberIDAndProductID(@Param("memberID") Integer memberID, @Param("productID") Integer productID)
    • findProductsByMemberAndFavoriteCount

      @Query("SELECT f.product FROM ProdFavoritesEntity f WHERE f.member.memberID = :memberID AND f.favoriteCount = :favoriteCount") List<ProductEntity> findProductsByMemberAndFavoriteCount(@Param("memberID") Integer memberID, @Param("favoriteCount") Integer favoriteCount)
    • updateFavoriteCount

      @Modifying @Query("UPDATE ProdFavoritesEntity f SET f.favoriteCount = :favoriteCount WHERE f.member.memberID = :memberID AND f.product.productID = :productID") void updateFavoriteCount(@Param("memberID") Integer memberID, @Param("productID") Integer productID, @Param("favoriteCount") Integer favoriteCount)
    • updateNotifyStatus

      @Modifying @Query("UPDATE ProdFavoritesEntity f SET f.notifyStatus = :notifyStatus WHERE f.member.memberID = :memberID AND f.product.productID = :productID") void updateNotifyStatus(@Param("memberID") Integer memberID, @Param("productID") Integer productID, @Param("notifyStatus") Integer notifyStatus)