Interface WalletMovementRepository
- All Superinterfaces:
org.springframework.data.repository.CrudRepository<WalletMovement,,Integer> org.springframework.data.jpa.repository.JpaRepository<WalletMovement,,Integer> org.springframework.data.repository.PagingAndSortingRepository<WalletMovement,,Integer> org.springframework.data.repository.query.QueryByExampleExecutor<WalletMovement>,org.springframework.data.repository.Repository<WalletMovement,Integer>
@Repository
public interface WalletMovementRepository
extends org.springframework.data.jpa.repository.JpaRepository<WalletMovement,Integer>
Repository for queries for Product movement Skyline.
-
Method Summary
Modifier and TypeMethodDescriptionfindAllByUserIdAndWalletProduct(String userId, String walletProduct) Select registers by user id.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, findAll, findAll, findAllById, flush, getById, getOne, getReferenceById, saveAll, saveAllAndFlush, saveAndFlushMethods 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
-
findAllByUserIdAndWalletProduct
@Query("SELECT wm FROM WalletMovement wm WHERE wm.userId.id = :userId AND wm.walletProduct.id = :walletProduct ORDER BY wm.insertDate DESC") Optional<List<WalletMovement>> findAllByUserIdAndWalletProduct(@Param("userId") String userId, @Param("walletProduct") String walletProduct) Select registers by user id.- Parameters:
userId- name for backoffice.walletProduct- associated product- Returns:
- new list product movement object from database
-