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.WebActivityCustomDepositRaffleWeekSearchDto;
import com.crm.rely.backend.core.entity.base.SingleLongEntity;
import com.crm.rely.backend.core.entity.web.activity.custom.deposit.raffle.WebActivityCustomDepositRaffleAddEntity;
import com.crm.rely.backend.core.entity.web.activity.custom.deposit.raffle.WebActivityCustomDepositRaffleDeleteEntity;
import com.crm.rely.backend.core.entity.web.activity.custom.deposit.raffle.WebActivityCustomDepositRaffleUpdateEntity;
import com.crm.rely.backend.core.entity.web.activity.custom.deposit.raffle.WebActivityCustomDepositRaffleWeekSearchListEntity;
import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.multipart.MultipartFile;

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

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

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

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

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

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

    @PostMapping(value = "/upload", consumes = MediaType.MULTIPART_FORM_DATA_VALUE)
    BaseResultDto upload(MultipartFile file) throws Exception;

}
