package org.dromara.payment.operator.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.payment.channel.domain.BusChannelProduct;
import org.dromara.payment.merchant.domain.vo.BusMerchantVo;
import org.dromara.payment.operator.domain.BusOperatorProduct;
import org.dromara.payment.operator.domain.bo.AllocOperatorProductBo;
import org.dromara.payment.operator.domain.vo.BusOperatorProductVo;
import org.dromara.common.mybatis.core.mapper.BaseMapperPlus;

import java.util.List;
import java.util.Map;

/**
 * 运营商产品Mapper接口
 *
 * @author LionLi
 * @date 2024-03-28
 */
public interface BusOperatorProductMapper extends BaseMapperPlus<BusOperatorProduct, BusOperatorProductVo> {
    /**
     * 给运营商分配产品
     * @param bo
     * @return
     */
    public Integer allocOperatorProduct(AllocOperatorProductBo bo);




    public Integer insertOperatorProduct(AllocOperatorProductBo bo);
    /***
     * 根据运营商的信息，查询直接下级代理服务商的最新基本费率
     * @param paraMap
     * @return
     */
    public List<BusChannelProduct> selectChannelProductMin(Map paraMap);


    /***
     * 更新渠道商的成本费率
     * @param proList
     * @return
     */
    public Integer updateChannelProCostCharge(List proList);


    /***
     * 运营商分配产品查询
     * @param page
     * @param wrapper
     * @param opId
     * @return
     */
    Page<BusOperatorProductVo> setingOpratorProductList(@Param("page") IPage page, @Param(Constants.WRAPPER) Wrapper wrapper,@Param("opId") Long opId);
}
