package com.yami.shop.service.impl;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.yami.shop.bean.model.Channel;
import com.yami.shop.bean.vo.ChannelVO;
import com.yami.shop.bean.vo.IdNameVo;
import com.yami.shop.common.util.PageParam;
import com.yami.shop.dao.ChannelMapper;
import com.yami.shop.service.ChannelService;
import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 渠道管理服务实现类
 *
 * @author fbj 2024/01/01.
 */
@Slf4j
@Service
@AllArgsConstructor
public class ChannelServiceImpl extends ServiceImpl<ChannelMapper, Channel> implements ChannelService {

    @Override
    public IPage<ChannelVO> statisticsPage(PageParam pageParam, Channel channel) {
         return baseMapper.statisticsPage(pageParam, channel);
    }

    @Override
    public List<IdNameVo> queryMyChannel(Long userId) {
        return baseMapper.queryMyChannel(userId);
    }

    @Override
    public void updateSplitRule(Integer splitRule) {

        baseMapper.updateSplitRule(splitRule);
    }
}
