package com.crm.manager.service.custom;

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.core.entity.base.SingleLongEntity;
import com.crm.rely.backend.core.entity.custom.info.*;
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.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.multipart.MultipartFile;

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

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

    @PostMapping("/custom/manage/update/pay/comment/valid")
    BaseResultDto manageUpdatePayCommentValid(CustomInfoUpdatePayCommentValidEntity entity) throws Exception;

    @PostMapping("/custom/manage/update/hide")
    BaseResultDto manageUpdateHide(CustomInfoUpdateHideEntity entity) throws Exception;

    @PostMapping("/custom/manage/update/agent")
    BaseResultDto manageUpdateAgentId(CustomInfoUpdateAgentEntity entity);
//    @PostMapping("/custom/manage/add/info")
//    BaseResultDto manageAdd(CustomInfoUpdateEntity entity) throws Exception;

    @PostMapping("/custom/manager/update/balance")
    BaseResultDto manageUpdateBalance(CustomInfoUpdateBalanceEntity entity);

    @PostMapping("/custom/manage/update/point")
    BaseResultDto manageUpdateComPoint(CustomUpdateComPointEntity entity) throws Exception;

    @PostMapping("/custom/manage/update/level")
    BaseResultDto manageUpdateLevel(CustomUpdateLevelEntity entity) throws Exception;

    @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;

    @PostMapping("/manage/service/custom/info/update/ibInvalid")
    BaseResultDto<Object> updateIBInvalid(@RequestBody CustomIbInvalidUpdateEntity entity) throws Exception;

    @PostMapping("/custom/manager/apply/real")
    BaseResultDto managerApplyReal(CustomInfoUpdateAndApplyEntity entity) throws Exception;

    @PostMapping("/custom/manager/update/show/login/type")
    BaseResultDto managerUpdateExcludeShowLoginType(CustomUpdateExcludeShowLoginTypeEntity entity) throws Exception;

    @PostMapping("/custom/manager/update/cent/number/limit")
    BaseResultDto updateCentNumberLimit(CustomUpdateCentNumberLimitEntity entity) throws Exception;

    @PostMapping("/custom/manager/update/email/real")
    BaseResultDto updateEmailReal(CustomUpdateEmailEntity entity);

    @PostMapping("/custom/manage/login")
    BaseResultDto manageLogin(SingleLongEntity entity) throws Exception;
}
