package beilv.admissionticket.service.impl;

import beilv.admissionticket.domain.AdmissionTicket;
import beilv.admissionticket.mapper.AdmissionTicketMapper;
import beilv.admissionticket.service.IAdmissionTicketService;
import beilv.common.core.text.Convert;
import org.checkerframework.checker.units.qual.A;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class AdmissionTicketServiceImpl implements IAdmissionTicketService {

    @Autowired
    private AdmissionTicketMapper ticketMapper;

    @Override
    public int insertAdmissionTicketToList(List<AdmissionTicket> ticketList) {
        return ticketMapper.insertAdmissionTicketToList(ticketList);
    }

    @Autowired
    private AdmissionTicketMapper beilvAdmissionTicketMapper;

    /**
     * 查询约球购票
     *
     * @param id 约球购票主键
     * @return 约球购票
     */
    @Override
    public AdmissionTicket selectBeilvAdmissionTicketById(String id)
    {
        return beilvAdmissionTicketMapper.selectBeilvAdmissionTicketById(id);
    }

    /**
     * 查询约球购票列表
     *
     * @param AdmissionTicket 约球购票
     * @return 约球购票
     */
    @Override
    public List<AdmissionTicket> selectBeilvAdmissionTicketList(AdmissionTicket AdmissionTicket)
    {
        return beilvAdmissionTicketMapper.selectBeilvAdmissionTicketList(AdmissionTicket);
    }

    /**
     * 新增约球购票
     *
     * @param AdmissionTicket 约球购票
     * @return 结果
     */
    @Override
    public int insertBeilvAdmissionTicket(AdmissionTicket AdmissionTicket)
    {
        return beilvAdmissionTicketMapper.insertBeilvAdmissionTicket(AdmissionTicket);
    }

    /**
     * 修改约球购票
     *
     * @param AdmissionTicket 约球购票
     * @return 结果
     */
    @Override
    public int updateBeilvAdmissionTicket(AdmissionTicket AdmissionTicket)
    {
        return beilvAdmissionTicketMapper.updateBeilvAdmissionTicket(AdmissionTicket);
    }

    /**
     * 批量删除约球购票
     *
     * @param ids 需要删除的约球购票主键
     * @return 结果
     */
    @Override
    public int deleteBeilvAdmissionTicketByIds(String ids)
    {
        return beilvAdmissionTicketMapper.deleteBeilvAdmissionTicketByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除约球购票信息
     *
     * @param id 约球购票主键
     * @return 结果
     */
    @Override
    public int deleteBeilvAdmissionTicketById(String id)
    {
        return beilvAdmissionTicketMapper.deleteBeilvAdmissionTicketById(id);
    }

    @Override
    public void updateTicketStatus(List<String> ids) {
        beilvAdmissionTicketMapper.updateTicketStatus(ids);
    }
}
