public interface LogDao extends BaseRepository<Log,java.lang.Integer>
| 限定符和类型 | 方法和说明 |
|---|---|
long |
countByClient(java.lang.String client) |
long |
countByClientLike(java.lang.String client) |
long |
countByClientLikeAndTimeAfter(java.lang.String client,
java.sql.Timestamp time) |
long |
countByTimeAfter(java.sql.Timestamp time) |
long |
countByTimeBetween(java.sql.Date start,
java.sql.Date end) |
java.util.List<java.lang.Long> |
countByTimeFormatIn(java.util.Date start,
java.util.Date end,
java.lang.String client) |
java.util.List<java.lang.String> |
findAllDistinct() |
deleteAllInBatch, deleteInBatch, findAll, findAll, findAll, findAll, findAllById, flush, getOne, saveAll, saveAndFlushcount, delete, deleteAll, deleteAll, deleteById, existsById, findById, savelong countByTimeAfter(java.sql.Timestamp time)
@Query(value="SELECT count(l.id) FROM (SELECT id,time FROM log WHERE client=:client) l RIGHT JOIN time t ON date_format(l.time,\'%Y-%m-%d\')=t.time WHERE t.time BETWEEN :start AND :end GROUP BY t.time ORDER BY t.time ASC",
nativeQuery=true)
java.util.List<java.lang.Long> countByTimeFormatIn(@Param(value="start")
java.util.Date start,
@Param(value="end")
java.util.Date end,
@Param(value="client")
java.lang.String client)
@Query(value="select DISTINCT l.client from log l",
nativeQuery=true)
java.util.List<java.lang.String> findAllDistinct()
long countByTimeBetween(java.sql.Date start,
java.sql.Date end)
long countByClient(java.lang.String client)
@Query(value="select count(id) from Log where client like :client")
long countByClientLike(@Param(value="client")
java.lang.String client)
@Query(value="select count(id) from Log where client like :client and time > :time")
long countByClientLikeAndTimeAfter(@Param(value="client")
java.lang.String client,
@Param(value="time")
java.sql.Timestamp time)
Copyright © 2019. All Rights Reserved.