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

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

    @Data
    class SaveRequestLogRequest{
        String otherParams;		    //非必填	其他扩展参数，比如意见相关流程、相关文档、附件等	""
        String remark;		        //必填	意见内容	""
        String requestId;	        //必填	需要保存意见的流程请求ID	""
        String String;	            //必填	操作人id	"该参数无效，取当前的登录人作为接口的调用者"
    }

    @Data
    class SaveRequestLogResponse{

    }
}
