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

import java.util.List;
import org.apache.ibatis.annotations.Param;
import com.ruoyi.web.modules.entry.domain.BizMerchantEntryApply;
import com.ruoyi.web.modules.entry.vo.EntryApplyListVO;

/**
 * 商户入驻申请 Mapper
 */
public interface BizMerchantEntryApplyMapper
{
    BizMerchantEntryApply selectById(@Param("applyId") Long applyId);

    List<EntryApplyListVO> selectList(BizMerchantEntryApply query);

    List<BizMerchantEntryApply> selectMyByMemberId(@Param("memberId") Long memberId,
            @Param("limit") int limit);

    int countPendingByMemberId(@Param("memberId") Long memberId);

    int countBlockingByMemberId(@Param("memberId") Long memberId);

    List<BizMerchantEntryApply> selectPublicityExpiredList();

    int countPlatformPending();

    int countByCreditCodeActive(@Param("creditCode") String creditCode, @Param("excludeApplyId") Long excludeApplyId);

    int countByIdCardNoActive(@Param("idCardNo") String idCardNo, @Param("excludeApplyId") Long excludeApplyId);

    int countByMerchantNameActive(@Param("merchantName") String merchantName,
            @Param("excludeApplyId") Long excludeApplyId);

    int countByShopNameActive(@Param("shopName") String shopName, @Param("excludeApplyId") Long excludeApplyId);

    int insert(BizMerchantEntryApply apply);

    int updateAuditResult(BizMerchantEntryApply apply);
}
