package com.sptg.ad.api.feigns;

import com.baomidou.mybatisplus.plugins.Page;
import com.sptg.ad.api.dto.AdMaterialDto;
import com.sptg.ad.api.entity.AdContent;
import com.sptg.ad.api.entity.AdMaterial;
import com.sptg.ad.api.feigns.fallback.AdMaterialFeignFallbackFactory;
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;

@FeignClient(value = "smart-house-ad",fallbackFactory = AdMaterialFeignFallbackFactory.class)
public interface AdMaterialFeign {

    /**
     * 查询广告位素材表(分页)
     * @param adMaterialDto
     * @return 分页查询结果
     *
     *
     */
    @PostMapping(value = "/showAdMaterialList")
    ResultBean<Page<AdMaterial>> showAdMaterialList(@RequestBody AdMaterialDto adMaterialDto);

    /**
     * 功能描述:新增/编辑
     * @param adMaterial
     * @return
     *
     *
     */
    @PostMapping(value = "/addAdMaterial")
    ResultBean<Boolean> addAdMaterial(AdMaterial adMaterial);
    /**
     * 功能描述:删除
     * @param  ids
     * @return
     *
     *
     */
    @PostMapping(value = "/deleteAdMaterial")
    ResultBean<Boolean> deleteAdMaterial(@RequestBody String ids);
    /**
     * 功能描述: 根据id查询广告素材
     * @param
     * @return
     *
     *
     */
    @PostMapping(value = "/findAdMaterialById")
     AdMaterial findAdMaterialById(@RequestBody Long id);

    /**
     * 功能描述:批量删除广告内容
     * @param adMaterialDto{ids:必填}
     * @return ResultBean<Boolean>
     *
     *
     */
    @PostMapping(value = "/deleteAdMaterialList")
    ResultBean<Boolean> deleteAdMaterialList(@RequestBody  AdMaterialDto adMaterialDto);
}
