Package com.bytedesk.ai.statistic
Interface StatisticRobotRepository
- All Superinterfaces:
org.springframework.data.repository.CrudRepository<StatisticRobotEntity,
,Long> org.springframework.data.jpa.repository.JpaRepository<StatisticRobotEntity,
,Long> org.springframework.data.jpa.repository.JpaSpecificationExecutor<StatisticRobotEntity>
,org.springframework.data.repository.ListCrudRepository<StatisticRobotEntity,
,Long> org.springframework.data.repository.ListPagingAndSortingRepository<StatisticRobotEntity,
,Long> org.springframework.data.repository.PagingAndSortingRepository<StatisticRobotEntity,
,Long> org.springframework.data.repository.query.QueryByExampleExecutor<StatisticRobotEntity>
,org.springframework.data.repository.Repository<StatisticRobotEntity,
Long>
@Repository
public interface StatisticRobotRepository
extends org.springframework.data.jpa.repository.JpaRepository<StatisticRobotEntity,Long>, org.springframework.data.jpa.repository.JpaSpecificationExecutor<StatisticRobotEntity>
-
Method Summary
Modifier and TypeMethodDescriptionfindAllByUserUidAndDateBetween
(String userUid, String startDate, String endDate) org.springframework.data.domain.Page<StatisticRobotEntity>
findByRobotUidAndDateBetween
(String robotUid, String startDate, String endDate, org.springframework.data.domain.Pageable pageable) findByRobotUidAndUserUidAndDateAndHour
(String robotUid, String userUid, String date, int hour) findByUserUidAndDateAndHour
(String userUid, String date, int hour) org.springframework.data.domain.Page<StatisticRobotEntity>
findByUserUidAndDateBetween
(String userUid, String startDate, String endDate, org.springframework.data.domain.Pageable pageable) sumTotalCostByUserUidAndDateBetween
(String userUid, String startDate, String endDate) long
sumTotalTokensByUserUidAndDateBetween
(String userUid, String startDate, String endDate) void
updateStatusForDateBefore
(String date, String status) Methods inherited from interface org.springframework.data.repository.CrudRepository
count, delete, deleteAll, deleteAll, deleteAllById, deleteById, existsById, findById, save
Methods inherited from interface org.springframework.data.jpa.repository.JpaRepository
deleteAllByIdInBatch, deleteAllInBatch, deleteAllInBatch, deleteInBatch, findAll, findAll, flush, getById, getOne, getReferenceById, saveAllAndFlush, saveAndFlush
Methods inherited from interface org.springframework.data.jpa.repository.JpaSpecificationExecutor
count, delete, exists, findAll, findAll, findAll, findBy, findOne
Methods inherited from interface org.springframework.data.repository.ListCrudRepository
findAll, findAllById, saveAll
Methods inherited from interface org.springframework.data.repository.ListPagingAndSortingRepository
findAll
Methods inherited from interface org.springframework.data.repository.PagingAndSortingRepository
findAll
Methods inherited from interface org.springframework.data.repository.query.QueryByExampleExecutor
count, exists, findAll, findBy, findOne
-
Method Details
-
findByUid
-
findByRobotUidAndUserUidAndDateAndHour
Optional<StatisticRobotEntity> findByRobotUidAndUserUidAndDateAndHour(String robotUid, String userUid, String date, int hour) -
findByUserUidAndDateAndHour
-
findByRobotUidAndDateBetween
org.springframework.data.domain.Page<StatisticRobotEntity> findByRobotUidAndDateBetween(String robotUid, String startDate, String endDate, org.springframework.data.domain.Pageable pageable) -
findByUserUidAndDateBetween
org.springframework.data.domain.Page<StatisticRobotEntity> findByUserUidAndDateBetween(String userUid, String startDate, String endDate, org.springframework.data.domain.Pageable pageable) -
findAllByUserUidAndDateBetween
@Query("SELECT s FROM StatisticRobotEntity s WHERE s.userUid = ?1 AND s.date BETWEEN ?2 AND ?3") List<StatisticRobotEntity> findAllByUserUidAndDateBetween(String userUid, String startDate, String endDate) -
sumTotalCostByUserUidAndDateBetween
@Query("SELECT COALESCE(SUM(s.totalCost), 0) FROM StatisticRobotEntity s WHERE s.userUid = ?1 AND s.date BETWEEN ?2 AND ?3") BigDecimal sumTotalCostByUserUidAndDateBetween(String userUid, String startDate, String endDate) -
sumTotalTokensByUserUidAndDateBetween
-
updateStatusForDateBefore
-