package com.boying.mapper;
|
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
import com.boying.entity.Ticket;
|
import org.apache.ibatis.annotations.Mapper;
|
import org.apache.ibatis.annotations.Select;
|
import org.springframework.data.jpa.repository.Query;
|
|
import java.util.Date;
|
|
/**
|
* @author kdq
|
* @version 1.0.0
|
* @ClassName TicketMapper.java
|
* @Description TODO
|
* @createTime 2022年11月20日 10:25:00
|
*/
|
@Mapper
|
public interface TicketMapper extends BaseMapper<Ticket> {
|
|
@Query(value = "select sum(money) from Ticket where createTime>:startTime and createTime<:endTime")
|
Double sumByPrice(Date startTime, Date endTime);
|
|
@Query(value = "select count(id) from Ticket where payStatus=1")
|
long count4();
|
|
@Query(value = "select count(id) from Ticket")
|
long count5();
|
|
// @Query(value = "select count(id) from Ticket where type=1 and createTime>:startTime and createTime<:endTime")
|
// long count6(Date startTime, Date endTime);
|
//
|
// @Query(value = "select count(id) from Ticket where type=1 and status=1 and createTime>:startTime and createTime<:endTime")
|
// long count7(Date startTime, Date endTime);
|
//
|
// @Query(value = "select count(id) from Ticket where type=0 and createTime>:startTime and createTime<:endTime")
|
// long count8(Date startTime, Date endTime);
|
|
@Query(value = "select sum(money) from Ticket where createTime>:startTime and createTime<:endTime and type=0")
|
Double sumByPrice2(Date startTime, Date endTime);
|
}
|