package com.sptg.statistics.api.feigns;

import com.sptg.common.core.beans.ResultBean;
import com.sptg.statistics.api.entity.StatisticsCount;
import com.sptg.statistics.api.feigns.fallback.StatisticsCountFeignFallBackFactory;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * title: StatisticsCountFeign
 * package: com.sptg.statistics.api.feigns
 * description:统计数量-服务接口
 *
 *                
 *                 
 */
@FeignClient(value = "smart-house-statistics",fallbackFactory = StatisticsCountFeignFallBackFactory.class)
public interface StatisticsCountFeign {

    /**
     * 功能描述:添加统计数量
     * @param statisticsCount
     * @return ResultBean<Boolean>
     *                
     *                       
     */
    @PostMapping("/statistics/statisticsCount/addCount")
    ResultBean<Boolean> addCount(@RequestBody StatisticsCount statisticsCount);

    /**
     * 功能描述:添加统计数量 分布式事物处理
     * @param statisticsCount
     * @return ResultBean<Boolean>
     *                
     *                      
     */
    @PostMapping("/statistics/statisticsCount/addCountLcn")
    ResultBean<Boolean> addCountLcn(@RequestBody StatisticsCount statisticsCount);

    /**
     * 功能描述:查询统计数量
     * @param orgPosition 机构位置
     * @return com.sptg.common.core.beans.ResultBean<com.sptg.statistics.api.entity.StatisticsCount>
     *                
     *                       
     */
    @PostMapping("/statistics/statisticsCount/selectCountOne")
    ResultBean<StatisticsCount> selectCountOne(@RequestParam(value = "orgPosition") String orgPosition);
}
