package cn.pluss.platform.subMerchant;

import cn.pluss.platform.dto.SubMerchantDTO;
import cn.pluss.platform.entity.MerchantChannelStatus;
import cn.pluss.platform.entity.SubMerchant;
import cn.pluss.platform.mapper.SubMerchantMapper;
import cn.pluss.platform.vo.SubMerchantVO;
import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;

/**
 * @author SSS
 */
public interface SubMerchantService extends IService<SubMerchant> {

    /**
     * 分页数据
     * @param page
     * @param wrapper
     * @return
     */
    default Page<SubMerchantVO> pageVO(Page<SubMerchantVO> page, Wrapper<SubMerchantDTO> wrapper) {
        return ((SubMerchantMapper) getBaseMapper()).pageVO(page, wrapper);
    }

    /**
     * 获取子商户号
     * @param merchantCode  商编
     * @param channel       通道id
     */
    void reqChannelSubMerchant(String merchantCode, int channel);

    /**
     * 获取子商户号
     * @param mcs  通道进件信息
     */
    void reqChannelSubMerchant(MerchantChannelStatus mcs);
}
