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

import cn.ey.biz.module.weaver.autoconfigure.BacklogFeignConfiguration;
import cn.ey.biz.module.weaver.autoconfigure.FeignConfiguration;
import cn.ey.biz.module.weaver.common.Constants;
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_BACKLOG, url="${weaver.service.url}", configuration = BacklogFeignConfiguration.class)
public interface DeleteUserRequestInfoByJsonService {

    @RequestMapping(method= RequestMethod.POST, value="/rest/ofs/deleteUserRequestInfoByJson",
            consumes = MediaType.APPLICATION_JSON_VALUE,
            produces = MediaType.APPLICATION_JSON_VALUE)
    DeleteUserRequestInfoByJsonResponse deleteUserRequestInfoByJson(@RequestBody  DeleteUserRequestInfoByJsonRequest request);

    @Data
    class DeleteUserRequestInfoByJsonRequest{
        String syscode;	//异构系统标识
        String  flowid;	//流程实例id
        String userid;	//接收人（原值）
    }

    @Data
    class DeleteUserRequestInfoByJsonResponse{
        String syscode;     //异构系统标识
        String dataType;    //数据类型IsUse：统一待办中心OtherSys：异构系统WfType：流程类型WfData：流程数据SetParam：参数设置
        String operType;    //操作类型 AutoNew自动创建  New新建  AutoEdit自动更新 Edit编辑 Del删除  Check检测 Set设置  Del删除  Check检测 Set设置
        String operResult;  //操作结果1：成功 0：失败
        String message;     //错误信息
    }

}
