package com.ruoyi.mall.mapper;

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

import com.ruoyi.mall.domain.MallSalesmanAchievement;

/**
 * 业务员业绩Mapper接口
 *
 * @author ruoyi
 * @date 2024-03-26
 */
public interface MallSalesmanAchievementMapper
{
    /**
     * 查询业务员业绩
     *
     * @param achievementId 业务员业绩主键
     * @return 业务员业绩
     */
    public MallSalesmanAchievement selectMallSalesmanAchievementByAchievementId(Long achievementId);

    /**
     * 查询业务员业绩列表
     *
     * @param mallSalesmanAchievement 业务员业绩
     * @return 业务员业绩集合
     */
    public List<MallSalesmanAchievement> selectMallSalesmanAchievementList(MallSalesmanAchievement mallSalesmanAchievement);

    /**
     * 新增业务员业绩
     *
     * @param mallSalesmanAchievement 业务员业绩
     * @return 结果
     */
    public int insertMallSalesmanAchievement(MallSalesmanAchievement mallSalesmanAchievement);

    /**
     * 修改业务员业绩
     *
     * @param mallSalesmanAchievement 业务员业绩
     * @return 结果
     */
    public int updateMallSalesmanAchievement(MallSalesmanAchievement mallSalesmanAchievement);

    /**
     * 批量修改业务员业绩
     *
     * @param mallSalesmanAchievement 业务员业绩
     * @return 结果
     */
    public int updateMallSalesmanAchievementBatch(MallSalesmanAchievement mallSalesmanAchievement);

    /**
     * 删除业务员业绩
     *
     * @param achievementId 业务员业绩主键
     * @return 结果
     */
    public int deleteMallSalesmanAchievementByAchievementId(Long achievementId);

    /**
     * 批量删除业务员业绩
     *
     * @param achievementIds 需要删除的数据主键集合
     * @return 结果
     */
    public int deleteMallSalesmanAchievementByAchievementIds(Long[] achievementIds);

    /**
     * 根据订单ID查询业务员业绩
     *
     * @param linkOrderId 订单ID
     * @return 业务员业绩
     */
    public MallSalesmanAchievement selectMallSalesmanAchievementByOrderId(Long linkOrderId);

    /**
     * 业务员管理-订单收益统计
     *
     * @param params 参数
     * @return 收益统计
     */
    public BigDecimal getSalesmanRevenueStatistics(Map<String, Object> params);

    /**
     * 业务员管理-订单管理统计
     *
     * @param params 参数
     * @return 收益统计
     */
    public int getSalesmanRevenueOrderStatistics(Map<String, Object> params);

    /**
     * 业务员管理-订单列表
     *
     * @param params 参数
     * @return 收益统计
     */
    public List<Map<String, Object>> getSalesmanStatisticsOrderList(Map<String, Object> params);

    /**
     * 业务员管理-业绩排行榜
     *
     * @param params 参数
     * @return 业绩排行榜
     */
    public List<Map<String, Object>> getSalesmanStatisticsRankingList(Map<String, Object> params);
}
