package com.sptg.ad.api.feigns;

import com.baomidou.mybatisplus.plugins.Page;
import com.sptg.ad.api.dto.AdPushDeviceDetailsDto;
import com.sptg.ad.api.entity.AdPushDeviceDetails;
import com.sptg.ad.api.feigns.fallback.AdPushDeviceDetailsFallbackFactory;
import com.sptg.common.core.beans.ResultBean;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

/**
 * title: AdPushDeviceDetailsFeign
 * package: com.sptg.ad.api.feigns
 * description: 广告发布到设备详情-对外接口类
 *
 *               
 *                 
 */
@FeignClient(value = "smart-house-ad",fallbackFactory = AdPushDeviceDetailsFallbackFactory.class)
public interface AdPushDeviceDetailsFeign {
    /**
     * 功能描述:分页查询
     * @param  adPushDeviceDetailsDto
     * @return
     *               
     *                       
     */
    @PostMapping(value = "/showAdPushDeviceDetails")
    ResultBean<Page<AdPushDeviceDetails>> showAdPushDeviceDetails(@RequestBody AdPushDeviceDetailsDto adPushDeviceDetailsDto);

    /**
     * 功能描述: 修改发布状态
     * @param dto
     * {
     *     taskId       :   任务Id
     *     serialNumber :   设备序列号
     *     pushStatus   :   任务执行状态{ 1：成功，2：失败 }
     *     remark       :   备注（失败原因）,选填
     * }
     * @return ResultBean<Boolean>
     *                  
     *                     
     */
    @PostMapping(value = "/ad/task/updatePushStatus")
    ResultBean<Boolean> updatePushStatus(@RequestBody AdPushDeviceDetails dto);
}
