package com.sptg.statistics.api.feigns;

import com.baomidou.mybatisplus.plugins.Page;
import com.sptg.common.core.beans.PageBean;
import com.sptg.common.core.beans.ResultBean;
import com.sptg.statistics.api.dto.StatisticsAdClickMobileDto;
import com.sptg.statistics.api.dto.StatisticsAdPlayFreeTimeDto;
import com.sptg.statistics.api.dto.StatisticsAdWatchDto;
import com.sptg.statistics.api.entity.StatisticsAdClickMobile;
import com.sptg.statistics.api.entity.StatisticsAdPlayFreeTime;
import com.sptg.statistics.api.entity.StatisticsAdWatch;
import com.sptg.statistics.api.feigns.fallback.StatisticsAdWatchFeignFallBackFactory;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

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

/**
 * title: VisitorFeign
 * package: com.sptg.statistics.api.feigns
 * description:广告观看统计-服务接口
 *
 *                
 *                
 */
@FeignClient(value = "smart-house-statistics",fallbackFactory = StatisticsAdWatchFeignFallBackFactory.class)
public interface StatisticsAdWatchFeign {

   /**
    * 功能描述:展示广告观看列表
    * @param statisticsAdWatchDto
    * @return ResultBean<Page<StatisticsAdWatch>>
    *                
    *                       
    */
    @PostMapping("/statistics/statisticsAdWatch/showStatisticsAdWatchList")
    ResultBean<Page<StatisticsAdWatch>> showStatisticsAdWatchList(@RequestBody StatisticsAdWatchDto statisticsAdWatchDto);

    /**
     * 功能描述:录入广告观看统计
     * @param statisticsAdWatch
     * @return ResultBean<Boolean>
     *                
     *                       
     */
    @PostMapping("/statistics/statisticsAdWatch/addAdWatch")
    ResultBean<Boolean> addAdWatch(@RequestBody StatisticsAdWatch statisticsAdWatch);

    /**
     * 功能描述:展示广告观看次数排名
     * @param statisticsAdWatchDto
     * @return ResultBean<Page<StatisticsAdWatch>>
     *                
     *                       
     */
    @PostMapping("/statistics/statisticsAdWatch/showStatisticsAdWatchRankList")
    ResultBean<Page<StatisticsAdWatch>> showStatisticsAdWatchRankList(@RequestBody StatisticsAdWatchDto statisticsAdWatchDto);

    /**
     * 功能描述:统计 总观看次数 总住户观看人数 总访客观看人次
     * @param statisticsAdWatchDto
     * @return ResultBean<Map<String,Object>>
     *                
     *                       
     */
    @PostMapping("/statistics/statisticsAdWatch/statisticsAdWatchCount")
    ResultBean<Map<String,Object>> statisticsAdWatchCount(@RequestBody StatisticsAdWatchDto statisticsAdWatchDto);

    /**
     * 功能描述:统计观看访客人数
     * @param statisticsAdWatchDto
     * @return ResultBean<Long>
     *                
     *                       
     */
    @PostMapping("/statistics/statisticsAdWatch/statisticsAdWatchVisitorCount")
    ResultBean<Long> statisticsAdWatchVisitorCount(@RequestBody StatisticsAdWatchDto statisticsAdWatchDto);

    /**
     * 功能描述:统计 某年12个月(或某月约30天)观看次数 住户观看人数 访客观看人次 (用与统计图)
     * @param statisticsAdWatchDto
     * @return ResultBean<List<Map<String,Object>>>
     *                
     *                       
     */
    @PostMapping("/statistics/statisticsAdWatch/statisticsAdWatchForChart")
    ResultBean<List<Map<String,Object>>> statisticsAdWatchForChart(@RequestBody StatisticsAdWatchDto statisticsAdWatchDto);

    /**
     * 功能描述:根据条件查询广告观看列表
     * @param statisticsAdWatchDto 广告观看传输对象
     * @return List<StatisticsAdWatch>
     *                
     *                      
     */
    @PostMapping("/statistics/statisticsAdWatch/getAdWatchList")
    List<StatisticsAdWatch> getAdWatchList(@RequestBody StatisticsAdWatchDto statisticsAdWatchDto);

    /**
     * 功能描述:根据条件查询广告观看排行榜列表
     * @param statisticsAdWatchDto 广告观看传输对象
     * @return List<StatisticsAdWatch>
     *                
     *                      
     */
    @PostMapping("/statistics/statisticsAdWatch/getAdWatchRankList")
    List<StatisticsAdWatch> getAdWatchRankList(@RequestBody StatisticsAdWatchDto statisticsAdWatchDto);

    /**
     * 功能描述:统计各个省(或城市)广告观看排行
     * @param statisticsAdWatchDto
     * @return List<Map<String, Object>>
     *                
     *                      
     */
    @PostMapping("/statistics/statisticsAdWatch/statisticsAdWatchRankForArea")
    List<Map<String, Object>> statisticsAdWatchRankForArea(@RequestBody StatisticsAdWatchDto statisticsAdWatchDto);

    /**
     * 功能描述:根据条件获取广告观看次数
     * @param statisticsAdWatchDto
     * @return Long
     *                
     *                      
     */
    @PostMapping("/statistics/statisticsAdWatch/getAdWatchCount")
    Long getAdWatchCount(@RequestBody StatisticsAdWatchDto statisticsAdWatchDto);

    /**
     * 功能描述:广告月度观看趋势，广告每日观看趋势
     * @param statisticsAdWatchDto
     * @return List<Map<String, Object>>
     *                
     *                      
     */
    @PostMapping("/statistics/statisticsAdWatch/statisticsAdWatchCountChartByDateType")
    List<Map<String, Object>> statisticsAdWatchCountChartByDateType(@RequestBody StatisticsAdWatchDto statisticsAdWatchDto);

    /**
     * 功能描述:统计广告分类观看次数
     * @param statisticsAdWatchDto
     * @return List<Map<String, Object>>
     *                
     *                      
     */
    @PostMapping("/statistics/statisticsAdWatch/statisticsAdWatchRankForAdType")
    List<Map<String, Object>> statisticsAdWatchRankForAdType(@RequestBody StatisticsAdWatchDto statisticsAdWatchDto);

    /**
     * 功能描述:
     * @param statisticsAdWatchDto
     * {
     *     watchDate 查询时间
     *     regionProvince 省
     *     regionCity  市
     *     adTypeId 广告类别id
     *     orgPosition 机构位置
     *
     * }
     * @return List<Map<String, Object>>
     *                
     *                      
     */
    @PostMapping("/statistics/statisticsAdWatch/statisticsAdWatchPersonForDay")
    List<Map<String, Object>> statisticsAdWatchPersonForDay(@RequestBody StatisticsAdWatchDto statisticsAdWatchDto);

    /**
     * 功能描述:统计广告观看次数
     * @param statisticsAdWatchDto
     * @return  ResultBean<List<Map<String,Object>>>
     *             
     *                     
     */
    @PostMapping("/statistics/statisticsAdWatch/getAdWatchCountList")
    ResultBean<List<Map<String,Object>>> getAdWatchCountList(@RequestBody StatisticsAdWatchDto statisticsAdWatchDto);

    /**
     * 功能描述:闲时广告播放排行
     * @param pageBean 分页条件
     * @return ResultBean<Page<StatisticsAdPlayFreeTime>>
     *                
     *                     
     */
    @PostMapping("/statistics/statisticsAdPlayFreeTime/showRankList")
    ResultBean<Page<StatisticsAdPlayFreeTime>> showAdPlayFreeTimeRankList(@RequestBody PageBean<StatisticsAdPlayFreeTime, StatisticsAdPlayFreeTimeDto> pageBean);

    /**
     * 功能描述:移动端广告点击排行
     * @param pageBean 分页条件
     * @return  ResultBean<Page<StatisticsAdClickMobile>>
     *                
     *                     
     */
    @PostMapping("/statistics/statisticsAdClickMobile/showRankList")
    ResultBean<Page<StatisticsAdClickMobile>> showAdClickMobileRankList(@RequestBody PageBean<StatisticsAdClickMobile, StatisticsAdClickMobileDto> pageBean);

    /**
     * 功能描述:添加移动端广告点击记录
     * @param statisticsAdClickMobile
     * @return ResultBean<Boolean>
     *                
     *                      
     */
    @PostMapping("/statistics/statisticsAdClickMobile/addAdClickMobile")
    ResultBean<Boolean> addAdClickMobile(StatisticsAdClickMobile statisticsAdClickMobile);

    /**
     * 功能描述:根据条件获取闲时广告播放次数
     * @param dto
     * @return Long
     *                
     *                      
     */
    @PostMapping("/statistics/statisticsAdPlayFreeTime/getAdPlayCount")
    Long getAdPlayCount(@RequestBody StatisticsAdPlayFreeTimeDto dto);
}
