package com.ruoyi.mall.service;

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

import com.ruoyi.mall.domain.MallSalesmanAchievement;

/**
 * 业务员业绩Service接口
 *
 * @author ruoyi
 * @date 2024-03-26
 */
public interface IMallSalesmanAchievementService
{
    /**
     * 查询业务员业绩
     *
     * @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 achievementIds 需要删除的业务员业绩主键集合
     * @return 结果
     */
    public int deleteMallSalesmanAchievementByAchievementIds(Long[] achievementIds);

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

    /**
     * 新增或修改业务员业绩
     *
     * @param orderId 订单ID
     * @param status 状态：0-冻结中，1-已获得，2-已失效
     * @return 结果
     */
    public int insertOrUpdateMallSalesmanAchievement(Long orderId, Integer status);

    /**
     * 业务员管理-收益统计
     *
     * @param params 参数
     * @return 收益统计
     */
    public Map<String, Object> getSalesmanRevenueStatistics(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);
}
