package com.ruoyi.web.modules.diagnosis.mapper;

import java.util.List;
import org.apache.ibatis.annotations.Param;
import com.ruoyi.web.modules.diagnosis.domain.BizServiceAppointment;

/**
 * 服务预约 Mapper。
 */
public interface BizServiceAppointmentMapper
{
    BizServiceAppointment selectBizServiceAppointmentById(Long id);

    BizServiceAppointment selectVetAppointmentByIdAndProvider(@Param("id") Long id,
            @Param("providerId") Long providerId);

    List<BizServiceAppointment> selectVetAppointmentList(BizServiceAppointment query);

    BizServiceAppointment selectOrgAppointmentByIdAndProvider(@Param("id") Long id,
            @Param("providerId") Long providerId);

    List<BizServiceAppointment> selectOrgAppointmentList(BizServiceAppointment query);

    int updateConfirmVetAppointment(BizServiceAppointment row);

    int updateRejectVetAppointment(BizServiceAppointment row);

    int updateCompleteVetAppointment(BizServiceAppointment row);

    BizServiceAppointment selectExpertAppointmentByIdAndProvider(@Param("id") Long id,
            @Param("providerId") Long providerId);

    List<BizServiceAppointment> selectExpertAppointmentList(BizServiceAppointment query);

    int updateConfirmExpertAppointment(BizServiceAppointment row);

    int updateRejectExpertAppointment(BizServiceAppointment row);

    int updateCompleteExpertAppointment(BizServiceAppointment row);

    int updateCompleteOrgAppointment(BizServiceAppointment row);

    int insertBizServiceAppointment(BizServiceAppointment row);

    int countActiveAppointmentsOnDate(@Param("providerType") Integer providerType,
            @Param("providerId") Long providerId, @Param("appointDate") String appointDate);

    int countMyActiveAppointmentOnDate(@Param("providerType") Integer providerType,
            @Param("providerId") Long providerId, @Param("appointDate") String appointDate,
            @Param("createBy") String createBy);
}
