package com.boying.dao; import com.boying.common.BaseDao; import com.boying.entity.OutPark; import org.springframework.data.jpa.repository.Query; import org.springframework.stereotype.Repository; import java.util.Date; import java.util.List; @Repository("outParkDao") public interface OutParkDao extends BaseDao{ @Query(value = "select count(id) from OutPark where createTime>:startTime and createTime<:endTime and status=1") long count1(Date startTime, Date endTime); @Query(value = "select count(id) from OutPark where createTime>:startTime and createTime<:endTime") long count2(Date startTime, Date endTime); @Query(value = "select sum(price) from OutPark where createTime>:startTime and createTime<:endTime") Double sumByPrice(Date startTime, Date endTime); @Query(value = "from OutPark where barrierId=:bId and status=1 and status2=0 order by createTime desc") List count4(Long bId); @Query(value = "from OutPark where barrierId=:id and carNo=:carNo order by createTime desc") List findByCarNoAndBarrierId(String carNo, Long id); }