package com.sptg.ad.api.feigns;

import com.baomidou.mybatisplus.plugins.Page;
import com.sptg.ad.api.dto.AdPushAppDto;
import com.sptg.ad.api.entity.AdPushApp;
import com.sptg.ad.api.feigns.fallback.AdPushAppFeignFallbackFactory;
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: AdTypeFeign
 * package: com.sptg.ad.api.feigns
 * description: 移动端广告-对外接口
 *
 *               
 *               
 */
@FeignClient(value = "smart-house-ad",fallbackFactory = AdPushAppFeignFallbackFactory.class)
public interface AdPushAppFeign {

     /**
      * 分页
      * @param dto
      * @return 分页查询结果
      *               
      *                     
      */
     @PostMapping(value = "/ad/push/app/showList")
     ResultBean<Page<AdPushApp>> showList(@RequestBody AdPushAppDto dto);
    /**
     * 新增
     * @param adPushApp
     * @return ResultBean<Boolean>
     *               
     *                     
     */
    @PostMapping(value = "/ad/push/app/addEntity")
     ResultBean<Boolean> addEntity(@RequestBody AdPushApp adPushApp);
    /**
     * 禁用| 启用 广告
     * @param dto
     * @return ResultBean<Boolean>
     *               
     *                     
     */
    @PostMapping(value = "/ad/push/app/updateIsEnable")
    ResultBean<Boolean> updateIsEnable(@RequestBody AdPushAppDto dto);
    /**
     * 删除--软删除
     * @param id
     * @return ResultBean<Boolean>
     *               
     *                     
     */
    @PostMapping(value = "/ad/push/app/delete")
    ResultBean<Boolean> delete(@RequestBody Long id);
    /**
     * 查询
     * @param id
     * @return ResultBean<AdPushApp>
     *               
     *                     
     */
    @PostMapping(value = "/ad/push/app/findById")
    ResultBean<AdPushApp> findById(@RequestBody Long id);
    /**
     * 修改
     * @param adPushApp
     * @return ResultBean<Boolean>
     *               
     *                     
     */
    @PostMapping(value = "/ad/push/app/editById")
    ResultBean<Boolean> editById(@RequestBody AdPushApp adPushApp);
    /**
     * 获取移动端广告
     * @param dto
     * @return ResultBean<Boolean>
     *               
     *                     
     */
    @PostMapping(value = "/ad/push/app/getList")
    ResultBean<AdPushApp> getList(@RequestBody AdPushAppDto dto);
}
