package com.hzs.sale.ticket.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.hzs.common.domain.sale.ticket.SaTicket;
import com.hzs.common.domain.sale.ticket.ext.SaTicketExt;
import com.hzs.sale.ticket.param.SaTicketParam;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 门票主表 Mapper 接口
 */
public interface SaTicketMapper extends BaseMapper<SaTicket> {

    /**
     * 查询购票记录
     */
    List<SaTicketExt> querySaTicketByParam(@Param("saTicketParam") SaTicketParam saTicketParam);

    /**
     * 查询销售门票数量
     */
    Integer queryBuySaTicketNum(Long pkTicket);

    /**
     * 查询会员购买票数
     *
     * @return
     */
    Integer sumQuantity(@Param("pkTicket") Long pkTicket,
                        @Param("pkMember") Long pkMember);
}
