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.activity.custom.deposit.raffle.popup.WebActivityCustomDepositRafflePopupSearchDto;
import com.crm.rely.backend.core.entity.base.SingleLongEntity;
import com.crm.rely.backend.core.entity.web.activity.custom.deposit.raffle.popup.WebActivityCustomDepositRafflePopupAddEntity;
import com.crm.rely.backend.core.entity.web.activity.custom.deposit.raffle.popup.WebActivityCustomDepositRafflePopupDeleteEntity;
import com.crm.rely.backend.core.entity.web.activity.custom.deposit.raffle.popup.WebActivityCustomDepositRafflePopupSearchListEntity;
import com.crm.rely.backend.core.entity.web.activity.custom.deposit.raffle.popup.WebActivityCustomDepositRafflePopupUpdateEntity;
import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

@FeignClient(name = "ACTIVITY-SERVICE", configuration = FeignMultipartSupportConfig.class, path = "/web/activity" +
        "/custom/deposit/raffle/popup/manager")
public interface WebActivityCustomDepositRafflePopupFeignService {


    /**
     * 添加信息
     *
     * @param entity
     * @return
     * @throws Exception
     */
    @PostMapping("/add")
    BaseResultDto add(@RequestBody @Validated WebActivityCustomDepositRafflePopupAddEntity entity) throws Exception;

    /**
     * 删除信息
     *
     * @param entity
     * @return
     * @throws Exception
     */
    @PostMapping("/delete")
    BaseResultDto delete(@RequestBody @Validated WebActivityCustomDepositRafflePopupDeleteEntity entity) throws Exception;

    /**
     * 修改信息
     *
     * @param entity
     * @return
     * @throws Exception
     */
    @PostMapping("/update")
    BaseResultDto update(@RequestBody @Validated WebActivityCustomDepositRafflePopupUpdateEntity entity) throws Exception;

    /**
     * @param entity
     * @return
     * @throws Exception
     */
    @PostMapping("/search/list")
    ResultWithPagerDto<WebActivityCustomDepositRafflePopupSearchDto> pageSearchList(@RequestBody @Validated WebActivityCustomDepositRafflePopupSearchListEntity entity) throws Exception;

    @PostMapping("/search/single")
    BaseResultDto<WebActivityCustomDepositRafflePopupSearchDto> single(@RequestBody @Validated SingleLongEntity entity) throws Exception;
}
