package org.dromara.payment.merchant.mapper;

import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Constants;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.apache.ibatis.annotations.Param;
import org.dromara.common.mybatis.annotation.DataColumn;
import org.dromara.common.mybatis.annotation.DataPermission;
import org.dromara.payment.merchant.domain.BusMerchant;
import org.dromara.payment.merchant.domain.bo.BusMerchantBo;
import org.dromara.payment.merchant.domain.vo.BusMerchantVo;
import org.dromara.common.mybatis.core.mapper.BaseMapperPlus;
import org.dromara.payment.merchant.domain.vo.BusOperAndAgentAndMer;

import java.util.List;

/**
 * 商户Mapper接口
 *
 * @author LionLi
 * @date 2024-04-03
 */
public interface BusMerchantMapper extends BaseMapperPlus<BusMerchant, BusMerchantVo> {


    int setAndUnbindYwy(BusMerchant vo);


    @DataPermission({
            @DataColumn(key="colomField",value="t.no")
    })
    Page<BusMerchantVo> selectMerchantList(@Param("page") IPage page, @Param(Constants.WRAPPER) Wrapper wrapper);


    /***
     * 查询企业列表
     * @param wrapper
     * @return
     */
    @DataPermission({
        @DataColumn(key="colomField",value="t.no")
    })
    List<BusMerchantVo> selectMerchantListByRole(@Param(Constants.WRAPPER) Wrapper wrapper);


    /***
     * 根据企业信息查询对应的渠道商，运营商
     * @param busMerchantBo
     * @return
     */
    BusOperAndAgentAndMer selOpAndAgentInfosByMerInfo(BusMerchantBo busMerchantBo);

}
