package com.boying.dao;
|
|
import com.boying.common.BaseDao;
|
import com.boying.entity.EnterPark;
|
import org.springframework.data.jpa.repository.Modifying;
|
import org.springframework.data.jpa.repository.Query;
|
import org.springframework.stereotype.Repository;
|
|
import java.util.Date;
|
import java.util.List;
|
|
@Repository("enterParkDao")
|
public interface EnterParkDao extends BaseDao<EnterPark, Long>{
|
|
@Query(value = "select count(id) from EnterPark where createTime>:startTime and createTime<:endTime")
|
long count1(Date startTime, Date endTime);
|
|
@Query(value = "from EnterPark where carNo=:carNo order by createTime desc")
|
List<EnterPark> findByCarNo(String carNo);
|
|
@Modifying
|
@Query(value = "delete from EnterPark where carNo=:carNo and parkId=:parkId")
|
void deleteByCarNo(String carNo,Long parkId);
|
}
|