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 Summary
Modifier and TypeMethodDescriptionfindByMemberIDAndProductID(Integer memberID, Integer productID) findByProductProductIDAndNotifyStatus(Integer productID, Integer notifyStatus) findProductsByMemberAndFavoriteCount(Integer memberID, Integer favoriteCount) voidupdateFavoriteCount(Integer memberID, Integer productID, Integer favoriteCount) voidupdateNotifyStatus(Integer memberID, Integer productID, Integer notifyStatus) Methods inherited from interface org.springframework.data.repository.CrudRepository
count, delete, deleteAll, deleteAll, deleteAllById, deleteById, existsById, findById, saveMethods inherited from interface org.springframework.data.jpa.repository.JpaRepository
deleteAllByIdInBatch, deleteAllInBatch, deleteAllInBatch, deleteInBatch, findAll, findAll, flush, getById, getOne, getReferenceById, saveAllAndFlush, saveAndFlushMethods inherited from interface org.springframework.data.repository.ListCrudRepository
findAll, findAllById, saveAllMethods inherited from interface org.springframework.data.repository.ListPagingAndSortingRepository
findAllMethods inherited from interface org.springframework.data.repository.PagingAndSortingRepository
findAllMethods inherited from interface org.springframework.data.repository.query.QueryByExampleExecutor
count, exists, findAll, findBy, findOne
-
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)
-