package com.sptg.ad.api.feigns;

import com.baomidou.mybatisplus.plugins.Page;
import com.sptg.ad.api.dto.AdContentDto;
import com.sptg.ad.api.entity.AdContent;
import com.sptg.ad.api.feigns.fallback.AdContentFeignFallbackFactory;
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: AdContentFeign
 * package: com.sptg.ad.api.feigns
 * description: 广告内容-对外接口类
 *
 *               
 *                 
 */
@FeignClient(value = "smart-house-ad",fallbackFactory = AdContentFeignFallbackFactory.class)
public interface AdContentFeign {


    /**
     * 查询广告类型列表(分页)
     * @param adContentDto
     * @return 分页查询结果
     *               
     *                      
     */
    @PostMapping(value = "/showAdContentList")
    ResultBean<Page<AdContent>> showAdContentList(AdContentDto adContentDto);

    /**
     * 功能描述:新增/编辑
     * @param adContent
     * @return
     *               
     *                      
     */
    @PostMapping(value = "/addAdContent")
    ResultBean<Boolean> addAdContent(AdContent adContent);
    /**
     * 功能描述:删除
     * @param  ids
     * @return
     *               
     *                      
     */
    @PostMapping(value = "/deleteAdContent")
    ResultBean<Boolean> deleteAdContent(String ids);
    
    /**
     * 功能描述:批量删除广告内容
     * @param adContentDto{ids:必填}
     * @return ResultBean<Boolean>
     *             
     *                      
     */
    @PostMapping(value = "/deleteAdContentList")
    ResultBean<Boolean> deleteAdContentList(@RequestBody  AdContentDto adContentDto);
    /**
     * 功能描述:根据id获取广告类容
     * @param id
     * @return
     *               
     *                       
     */
    @PostMapping(value = "/findAdContentById")
    AdContent findAdContentById(Long id);

    /**
     * 功能描述:获取广告列表
     * @param dto
     * @return
     */
    @PostMapping(value = "/getList")
    ResultBean<AdContent> getList(AdContentDto dto);
}

