package cn.axzo.msg.center.service.pending.client;

import cn.axzo.msg.center.service.pending.request.WorkflowSyncButtonsRequest;
import cn.azxo.framework.common.model.CommonResponse;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.http.MediaType;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

import javax.validation.Valid;

/**
 * @author yanglin
 */
@Component
@FeignClient(value = "msg-center", url = "${server.serviceUrl:http://msg-center:8080}")
public interface WorkflowButtonSyncClient {

    @PostMapping(value = "/pending-message/workflow/syncButtons", produces = {MediaType.APPLICATION_JSON_VALUE})
    CommonResponse<Void> syncButtons(@RequestBody @Valid WorkflowSyncButtonsRequest request) throws Exception;

}