package com.sptg.estate.api.feigns;

import com.baomidou.mybatisplus.plugins.Page;
import com.sptg.common.core.beans.ResultBean;
import com.sptg.estate.api.dto.NoticePushDto;
import com.sptg.estate.api.entity.NoticePush;
import com.sptg.estate.api.entity.NoticePushDeviceDetails;
import com.sptg.estate.api.feigns.fallback.NoticePushDetailsFeignFallbackFactory;
import com.sptg.estate.api.feigns.fallback.NoticePushDeviceDetailsFeignFallbackFactory;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

/**
 * title: NoticePushDetailsFeign
 * package: com.sptg.estate.api.feigns
 * description:
 *
 *
 *
 */
@FeignClient(value = "smart-house-estate",fallbackFactory = NoticePushDeviceDetailsFeignFallbackFactory.class)
public interface NoticePushDeviceDetailsFeign {

    /**
     * 功能描述:分页展示公告发布
     * @param noticePushDeviceDetails
     * @return ResultBean<Page<NoticePushDeviceDetails>>
     *
     *
     */
    @PostMapping(value = "/noticePushDeviceDetails/list")
    ResultBean<Page<NoticePushDeviceDetails>> showNoticePushDeviceDetailsList(@RequestBody NoticePushDeviceDetails noticePushDeviceDetails);

    /**
     * 功能描述:删除设备上的公告
     * @param id
     * @return ResultBean<Long> 返回id
     *
     *
     */
    @PostMapping(value = "/noticePushDeviceDetails/delete/{id}")
    ResultBean<Boolean> deleteNoticePushDevice(@PathVariable(value = "id") Long id);

    /**
     * 功能描述:删除设备上的公告
     * @param id
     * @return ResultBean<Long> 返回id
     *
     *
     */
    @GetMapping(value = "/noticePushDeviceDetails/get/{id}")
    ResultBean<NoticePushDeviceDetails> getNoticePushDevice(@PathVariable(value = "id") Long id);

}
