Interface NumberSegmentRepository
- All Superinterfaces:
org.springframework.data.repository.CrudRepository<NumberSegment,,String> org.springframework.data.jpa.repository.JpaRepository<NumberSegment,,String> org.springframework.data.repository.ListCrudRepository<NumberSegment,,String> org.springframework.data.repository.ListPagingAndSortingRepository<NumberSegment,,String> org.springframework.data.repository.PagingAndSortingRepository<NumberSegment,,String> org.springframework.data.repository.query.QueryByExampleExecutor<NumberSegment>,org.springframework.data.repository.Repository<NumberSegment,String>
public interface NumberSegmentRepository
extends org.springframework.data.jpa.repository.JpaRepository<NumberSegment,String>
-
Method Summary
Modifier and TypeMethodDescriptionfindByName(String name) voidupdateCurrentValue(String name, int increment) 批量更新号段的currentValueMethods 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
-
findByName
-
updateCurrentValue
@Modifying @Transactional @Query("UPDATE NumberSegment ns SET ns.currentValue = ns.currentValue + :increment WHERE ns.name = :name") void updateCurrentValue(@Param("name") String name, @Param("increment") int increment) 批量更新号段的currentValue
-