package cn.ey.biz.module.weaver.api;

import cn.ey.biz.module.weaver.common.Constants;
import cn.ey.biz.module.weaver.common.RSP;
import cn.ey.biz.module.weaver.autoconfigure.FeignConfiguration;
import lombok.Data;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

/**
 * 流程实例：删除流程（对外）
 */
@FeignClient(name= Constants.WEAVER_NAME, url="${weaver.service.url}", configuration = FeignConfiguration.class)
public interface DeleteRequestService {

    @RequestMapping(method= RequestMethod.POST, value="/api/workflow/paService/deleteRequest",
            consumes = MediaType.APPLICATION_FORM_URLENCODED_VALUE,
            produces = MediaType.TEXT_PLAIN_VALUE)
    RSP<DeleteResponse> deleteRequest(@RequestBody DeleteRequest request);

    @Data
    class DeleteRequest{
        String otherParams;		  //非必填	{"ismonitor":"1"}	"如果以监控权限删除流程则需要传该参数，否则以流程权限判断"
        String requestId;		  //必填	要删除的流程请求ID	""
    }

    @Data
    class DeleteResponse{

    }

}
