package com.sptg.statistics.api.feigns;

import com.sptg.common.core.beans.ResultBean;
import com.sptg.statistics.api.dto.StatisticsAdPushCountDto;
import com.sptg.statistics.api.entity.StatisticsAdPushCount;
import com.sptg.statistics.api.feigns.fallback.StatisticsAdPushCountFeignFallbackFactory;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

/**
 * title: StatisticsAdPushCountFeign
 * package: com.sptg.statistics.api.feigns
 * description: 统计广告发布数量-对外服务接口
 *
 *                
 *                
 */
@FeignClient(value = "smart-house-statistics",fallbackFactory = StatisticsAdPushCountFeignFallbackFactory.class)
public interface StatisticsAdPushCountFeign {

    /**
     * 功能描述:根据任务id获取广告发布数量记录
     * @param statisticsAdPushCountDto
     * {
     *     l_ad_push_task_id:发布任务id
     *     i_push_state:发布推送状态 0推送中 1推送成功
     * }
     * @return  StatisticsAdPushCount
     *                
     *                      
     */
    @PostMapping(value = "/statistics/statisticsAdPushCount/getStatisticsAdPushCountByTaskId")
    StatisticsAdPushCount getStatisticsAdPushCountByTaskId(@RequestBody StatisticsAdPushCountDto statisticsAdPushCountDto);

    /**
     * 功能描述:添加广告发布数量（这里不是广告投放量）
     * @param statisticsAdPushCountDto
     * @return ResultBean<Boolean>
     *                
     *                      
     */
    @PostMapping(value = "/statistics/statisticsAdPushCount/addAdPushCount")
    ResultBean<Boolean> addAdPushCount(@RequestBody StatisticsAdPushCountDto statisticsAdPushCountDto);

    /**
     * 功能描述:获取发布广告数量
     * @param statisticsAdPushCountDto
     * {
     *     l_ad_push_task_id:发布任务id
     *     i_push_state:发布推送状态 0推送中 1推送成功
     *     s_org_position:机构位置
     * }
     * @return long
     *                
     *                      
     */
    @PostMapping(value = "/statistics/statisticsAdPushCount/getAdPushCount")
    ResultBean<Long> getAdPushCount(@RequestBody StatisticsAdPushCountDto statisticsAdPushCountDto);

    /**
     * 功能描述:更新推送状态
     * @param statisticsAdPushCountDto
     * {
     *     adPushTaskId 广告发布任务id
     *      pushState 推送状态 0推送中 1推送成功
     * }
     * @return boolean
     *                
     *                      
     */
    @PostMapping(value = "/statistics/statisticsAdPushCount/updateAdPushState")
    ResultBean<Boolean> updateAdPushState(@RequestBody StatisticsAdPushCountDto statisticsAdPushCountDto);
    
}
