package com.crm.manager.service;

import com.crm.manager.configuration.FeignMultipartSupportConfig;
import com.crm.rely.backend.core.dto.base.BaseResultDto;
import com.crm.rely.backend.core.entity.base.LongEntitys;
import com.crm.rely.backend.model.entity.custom.CustomInfoFundsEntity;
import com.crm.rely.backend.model.entity.custom.info.CustomInfoUpdateAgentEntity;
import com.crm.rely.backend.model.entity.custom.info.CustomInfoUpdateEntity;
import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.multipart.MultipartFile;

/**
 * Created by max on 2020/6/17.
 */
@FeignClient(name = "GOLDEN-CUSTOM-SERVICE", configuration = FeignMultipartSupportConfig.class)
public interface CustomInfoFeignService {

    @PostMapping("/custom/manage/update/info")
    BaseResultDto manageUpdate(CustomInfoUpdateEntity entity) throws Exception;

    @PostMapping("/custom/manage/update/agent")
    BaseResultDto manageUpdateAgentId(CustomInfoUpdateAgentEntity entity);

    @PostMapping("/custom/manage/delete/batch")
    BaseResultDto manageDeleteBatch(LongEntitys entitys) throws Exception;

    @PostMapping(value = "/custom/manager/upload/head/picture", produces = {MediaType.APPLICATION_JSON_UTF8_VALUE}, consumes = MediaType.MULTIPART_FORM_DATA_VALUE)
    BaseResultDto managerUpload(@RequestParam(value = "file", required = false) MultipartFile file, Long customId) throws Exception;

}
