package com.sptg.ad.api.feigns;

import com.baomidou.mybatisplus.plugins.Page;
import com.sptg.ad.api.entity.DeviceAdvert;
import com.sptg.ad.api.entity.DeviceAdvertStatistics;
import com.sptg.common.core.beans.PageBean;
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;

/**
 *            
 *               
 * description:
 */
@FeignClient(value = "smart-house-ad")
public interface DeviceAdvertFeign {

    /**
     * 分页查询设备广告统计列表
     * @param pageBean 查询条件
     * @return Page<DeviceAdvertStatistics>
     */
    @PostMapping(value = "/device/advert/statistics/pagingQuery")
    Page<DeviceAdvertStatistics> pagingQueryStatistics(@RequestBody PageBean<DeviceAdvertStatistics,DeviceAdvertStatistics> pageBean);

    /**
     * 分页查询设备中的广告列表
     * @param pageBean 查询条件
     * @return Page<DeviceAdvert>
     */
    @PostMapping(value = "/device/advert/pagingQuery")
    Page<DeviceAdvert> pagingQuery(@RequestBody PageBean<DeviceAdvert,DeviceAdvert> pageBean);

    /**
     * 删除设备中的广告
     * @param advert { id:必填 }
     * @return ResultBean<Boolean>
     */
    @PostMapping(value = "/device/advert/delete")
    ResultBean<Boolean> deleteAdvert(@RequestBody DeviceAdvert advert);
}
