package com.crm.manager.service.golden;

import com.crm.rely.backend.core.dto.base.BaseResultDto;
import com.crm.rely.backend.core.dto.base.ResultWithPagerDto;
import com.crm.rely.backend.core.entity.base.SingleLongEntity;
import com.crm.rely.backend.model.dto.golden.order.GoldenOrderListDto;
import com.crm.rely.backend.model.entity.golden.order.GoldenOrderSearchEntity;
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;

/**
 * Created by max on 2020/6/17.
 */
@FeignClient(name = "GOLDEN-CUSTOM-SERVICE", path = "/order/manager")
public interface GoldenOrderFeignService {

    @PostMapping("/search/list")
    ResultWithPagerDto<GoldenOrderListDto> searchPageList(GoldenOrderSearchEntity entity) throws Exception;

    @PostMapping("/complete")
    BaseResultDto completeOrder(SingleLongEntity entity) throws Exception;

    @PostMapping("/cancel")
    BaseResultDto cancelOrder(@RequestBody @Validated SingleLongEntity entity) throws Exception;

}
