package com.czg.service.market.mapper;

import com.czg.market.vo.DistributionCenterShopVO;
import com.mybatisflex.core.BaseMapper;
import com.czg.market.entity.MkDistributionUser;

import java.math.BigDecimal;
import java.util.List;

/**
 * 分销员表 映射层。
 *
 * @author ww
 * @since 2025-10-27
 */
public interface MkDistributionUserMapper extends BaseMapper<MkDistributionUser> {

    /**
     * 查询我的分销店铺列表 已开通
     */
    List<DistributionCenterShopVO> selectMyDistributionShops(Long userId);
    /**
     * 查询我的分销店铺列表 未开通
     */
    List<DistributionCenterShopVO> selectUnDistributionShops(Long userId);

    boolean updateIncome(BigDecimal pendingIncome, BigDecimal receivedIncome, BigDecimal withdrawIncome, Long id, Long shopId);

    /**
     * 统计消费金额
     */
    BigDecimal getOrderConsumeAmountByList(Long shopId, Long inviterId);

    BigDecimal getOrderConsumeAmountById(Long shopId, Long userId);
}
