package cn.com.ty.lift.business.annualinspection.mapper;

import cn.com.ty.lift.business.annualinspection.dto.InspectionCount;
import cn.com.ty.lift.business.annualinspection.dto.InspectionRequest;
import cn.com.ty.lift.business.annualinspection.dto.InspectionResponse;
import cn.com.ty.lift.business.annualinspection.entity.AnnualInspection;
import cn.com.ty.lift.business.common.CommonRequest;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * <p>
 * 年检记录 Mapper 接口
 * </p>
 *
 * @author wcz
 * @since 2019-12-10
 */
@Repository
public interface AnnualInspectionMapper extends BaseMapper<AnnualInspection> {


    IPage<InspectionResponse> pageByCondition(IPage<InspectionResponse> page, @Param("cond") InspectionRequest request);

    long countByCondition(@Param("cond") InspectionRequest request);

    InspectionResponse infoById(@Param("cond") InspectionRequest request);

    IPage<InspectionResponse> pageByUser(IPage<InspectionResponse> page, @Param("cond") InspectionRequest request);

    List<InspectionResponse> listByIdList(@Param("cond") InspectionRequest request);

    IPage<InspectionResponse> pageByLift(IPage<InspectionResponse> page, @Param("cond") InspectionRequest request);

    long countDoingByUser(@Param("cond") CommonRequest request);

    InspectionCount countInspectionByUserId(@Param("request") InspectionRequest request);

    int countInspectionConfirmByUserId(@Param("request") InspectionRequest request);
}
