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<OutPark, Long>{
|
|
@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 and id = (select max(id) from OutPark)")
|
OutPark count4(Long bId);
|
|
@Query(value = "from OutPark where barrierId=:id and carNo=:carNo and id = (select max(id) from OutPark)")
|
OutPark findByCarNoAndBarrierId(String carNo, Long id);
|
}
|