package com.zhongshu.card.server.core.dao.projectAbout;

import com.github.microservice.components.data.mongo.mongo.dao.MongoDao;
import com.github.microservice.types.payment.PaymentType;
import com.zhongshu.card.server.core.dao.projectAbout.extend.ProjectOrgPaySettingInfoDaoExtend;
import com.zhongshu.card.server.core.domain.paySetting.ProjectOrgPaySettingInfo;

import java.util.List;

public interface ProjectOrgPaySettingInfoDao extends MongoDao<ProjectOrgPaySettingInfo>, ProjectOrgPaySettingInfoDaoExtend {

    ProjectOrgPaySettingInfo findTopById(String id);

    ProjectOrgPaySettingInfo findTopByProjectOidAndChannelTypeAndIsDefault
            (String projectOid, PaymentType channelType, Boolean isDefault);

    List<ProjectOrgPaySettingInfo> findByBelongOigAndProjectOidAndChannelType(String belongOig, String projectOid, PaymentType channelType);

    List<ProjectOrgPaySettingInfo> findByBelongOigAndProjectOid(String belongOig, String projectOid);

    int countByBelongOigAndProjectOidAndChannelType(String belongOig, String projectOid, PaymentType channelType);

    ProjectOrgPaySettingInfo findTopByBelongOigAndProjectOidAndChannelType(String belongOig, String projectOid, PaymentType channelType);

    ProjectOrgPaySettingInfo findTopByBelongOigAndProjectOidAndChannelTypeAndIsDefault(String belongOig, String projectOid, PaymentType channelType, Boolean isDefault);
}
