package com.younike.system.mapper;

import com.younike.system.domain.AccessPasscode;
import org.apache.ibatis.annotations.Param;

/**
 * 门岗通行证mapper
 * @author Dail
 */
public interface AccessPasscodeMapper {


    /**
     * 根据主键id删除门岗通行证
     *
     * @param accessPasscodeId
     * @return
     */
    int deleteByPrimaryKey(Long accessPasscodeId);

    /**
     * 新增门岗通行证
     *
     * @param record
     * @return
     */
    int insert(AccessPasscode record);

    /**
     * 动态新增门岗通行证
     *
     * @param record
     * @return
     */
    int insertSelective(AccessPasscode record);

    /**
     * 根据主键id查询门岗通行证
     *
     * @param accessPasscodeId
     * @return
     */
    AccessPasscode selectByPrimaryKey(Long accessPasscodeId);

    /**
     * 根据主键id动态更新门岗通行证
     *
     * @param record
     * @return
     */
    int updateByPrimaryKeySelective(AccessPasscode record);

    /**
     * 根据主键id更新门岗通行证
     *
     * @param record
     * @return
     */
    int updateByPrimaryKey(AccessPasscode record);

    /**
     * 根据订单id和核销码查询门岗通行证
     *
     * @param orderId
     * @param orderVerificationCode
     * @return
     */
    AccessPasscode selectByOrderIdAndOrderVerificationCode(@Param("orderId") Long orderId, @Param("orderVerificationCode") String orderVerificationCode);
}