package com.yonge.cooleshow.biz.dal.service;



import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;
import com.microsvc.toolkit.middleware.payment.common.api.entity.PaymentMerchant;
import com.yonge.cooleshow.biz.dal.wrapper.TenantMemberWrapper;
import com.yonge.cooleshow.biz.dal.entity.TenantMember;
import com.yonge.cooleshow.common.enums.EPayerType;

/**
 * @Author：haonan
 * @Date：2023/8/10 13:41
 * @Filename：TenantMemberService
 */

/**
 * 机构子账户表
 * 2023-08-10 13:36:39
 */
public interface TenantMemberService extends IService<TenantMember>  {

    /**
     * 查询详情
     * @param id 详情ID
     * @return TenantMember
     */
    TenantMember detail(Long id);

    /**
     * 分页查询
     * @param page IPage<TenantMember>
     * @param query TenantMemberWrapper.TenantMemberQuery
     * @return IPage<TenantMember>
     */
    IPage<TenantMemberWrapper.TenantMember> selectPage(IPage<TenantMemberWrapper.TenantMember> page, TenantMemberWrapper.TenantMemberQuery query);

    /**
     * 添加
     * @param tenantMember TenantMemberWrapper.TenantMember
     * @return Boolean
     */
    Boolean add(TenantMemberWrapper.InsertOrUpdateTenantMember tenantMember);

    PaymentMerchant.MerchantConfig getMerchantConfig(String paymentVerdor);

    /**
     * 更新
     * @param tenantMember TenantMemberWrapper.TenantMember
     * @return Boolean
     */
    Boolean update(TenantMemberWrapper.InsertOrUpdateTenantMember tenantMember);

    /**
     * 修改结算账户
     * @param tenantMember
     * @return
     */
    Boolean updateCount(TenantMemberWrapper.UpdateCount tenantMember);

    TenantMember getByMemberId(String memberId, EPayerType payerType);

    TenantMember getByRequestNo(String requestNo);

    TenantMember getByAppIdAndTenantId(String appId, Long tenantId, EPayerType payerType);

    PaymentMerchant.MerchantMember remoteDetail(Long id);
}