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 WithdrawRequestService {

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

    @Data
    class WithdrawRequest{
        String isremind;               //非必填	是否提醒 0：不提醒 1：提醒
        String remark;                 //非必填	撤回流程是提交的意见（非必填）
        String requestId;              //非必填	请求id
    }

    @Data
    class WithdrawResponse{

    }

}
