package org.jeecg.modules.shop.commission.mapper;


import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import org.apache.ibatis.annotations.Param;
import org.jeecg.modules.shop.commission.entity.PartnerCommission;
import org.jeecg.modules.shop.commission.entity.vo.CommissionCountVO;
import org.jeecg.modules.shop.commission.entity.vo.PartnerCommissionVO;

import java.math.BigDecimal;

/**
 * @Description: 合作伙伴佣金
 * @Author: jeecg-boot
 * @Date:   2025-07-15
 * @Version: V1.0
 */
public interface PartnerCommissionMapper extends BaseMapper<PartnerCommission> {

    IPage<PartnerCommissionVO> pagList(@Param("page") IPage<PartnerCommissionVO> page, @Param("userId") String userId);

    CommissionCountVO moneyCount(@Param("userId") String userId);

    BigDecimal getCommissionByUserAndYear(@Param("userId") String userId, @Param("year") String year);

    BigDecimal getOrderCommissionByUserAndYear(@Param("userId") String userId, @Param("year") String year);
}
