package com.boying.dao;
|
|
import com.boying.common.BaseDao;
|
import com.boying.entity.TicketBlack;
|
import org.springframework.data.jpa.repository.Query;
|
import org.springframework.stereotype.Repository;
|
|
import java.util.Date;
|
import java.util.List;
|
|
@Repository("ticketBlackDao")
|
public interface TicketBlackDao extends BaseDao<TicketBlack, Long>{
|
|
@Query(nativeQuery = true,value = "update TicketBlack set blackType=1 where createTime<:dateLessMonth and status=0")
|
void updateType(Date dateLessMonth);
|
|
@Query(value = "select count(id) from TicketBlack where blackType=1")
|
long count1();
|
|
@Query(value = "select count(id) from TicketBlack where blackType=1 and createTime>:startTime and createTime<:endTime")
|
long count2(Date startTime,Date endTime);
|
|
@Query(value = "from TicketBlack where createTime<:dateLessMonth and status=0 and blackType=0")
|
List<TicketBlack> findAll1(Date dateLessMonth);
|
}
|