package com.ytpm.question.service;

import com.ytpm.agent.view.AgentAdGroupStaticsVO;
import com.ytpm.agent.view.AgentTopCountView;
import com.ytpm.app.model.YtDyzAdRecord;
import com.ytpm.app.model.YtDyzUser;
import com.ytpm.app.param.DyzAdRecordDelayParam;
import com.ytpm.app.param.DyzAdRecordParam;
import com.ytpm.general.Result;
import com.ytpm.middle.view.DashboardRankingListVO;
import com.ytpm.middle.view.DashboardRevenueVO;
import com.ytpm.middle.view.DashboardRiskVO;

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

public interface AdService {
    /**
     * 保存广告记录
     */
    Result<String> saveRecord(DyzAdRecordParam param);

    Result<String> delaySaveRecord(DyzAdRecordDelayParam param);

    /**
     * 根据应用查询广告数量
     */
    Map<String, BigDecimal> getAdCount(String appIds);

    /**
     * 查询排行榜信息
     */
    DashboardRankingListVO queryRankingList(Integer sortBy, Integer limit);

    /**
     * 查询各渠道应用收益分时统计
     */
    DashboardRevenueVO revenueStatics(String apkIds);

    /**
     * 查询代理商顶部数据统计
     */
    AgentTopCountView getAppTopCount(String appIds);

    /**
     * 查询用户风控分时数据统计
     */
    DashboardRiskVO userStatics(String appIds);

    /**
     * 查询代理商首页广告数据统计
     */
    List<AgentAdGroupStaticsVO> getAgentProfit(String appIds);

    String saveRecordAndChangeUser(DyzAdRecordParam param, YtDyzUser user);

    List<YtDyzAdRecord> queryRecordByIds(List<String> adRecordIds);
}
