package com.crm.manager.service.activity;

import com.crm.manager.configuration.FeignMultipartSupportConfig;
import com.crm.rely.backend.core.dto.base.BaseResultDto;
import com.crm.rely.backend.core.dto.base.ResultWithPagerDto;
import com.crm.rely.backend.core.dto.web.book.WebEbookSearchDto;
import com.crm.rely.backend.core.entity.base.SingleLongEntity;
import com.crm.rely.backend.core.entity.web.book.WebEbookAddEntity;
import com.crm.rely.backend.core.entity.web.book.WebEbookDeleteEntity;
import com.crm.rely.backend.core.entity.web.book.WebEbookSearchListEntity;
import com.crm.rely.backend.core.entity.web.book.WebEbookUpdateEntity;
import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;

@FeignClient(name = "ACTIVITY-SERVICE", configuration = FeignMultipartSupportConfig.class, path = "/web/ebook/manager")
public interface WebEbookFeignService {

    @PostMapping("/add")
    BaseResultDto add(WebEbookAddEntity entity) throws Exception;

    /**
     * 删除
     *
     * @param entity
     * @return
     * @throws Exception
     */
    @PostMapping("/delete")
    BaseResultDto delete(WebEbookDeleteEntity entity) throws Exception;

    /**
     * 修改
     *
     * @param entity
     * @return
     * @throws Exception
     */
    @PostMapping("/update")
    BaseResultDto update(WebEbookUpdateEntity entity) throws Exception;

    /**
     * @param entity
     * @return
     * @throws Exception
     */
    @PostMapping("/search/list")
    ResultWithPagerDto<WebEbookSearchDto> pageSearchList(WebEbookSearchListEntity entity) throws Exception;

    @PostMapping("/search/single")
    BaseResultDto<WebEbookSearchDto> single(SingleLongEntity entity) throws Exception;


}
