package com.unis.flowable.client;

import com.unis.common.utils.ResponseWrapper;
import com.unis.flowable.common.vo.GroupVO;
import com.unis.flowable.common.vo.MembershipVO;
import com.unis.flowable.common.vo.UserVO;
import io.swagger.annotations.ApiOperation;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

import java.util.List;

/**
 * @Auther:张新亮
 * @Date: 2019/7/12 0012 15:00
 * @Description:
 */
@FeignClient(name = "flowable-server")
@Component
public interface FlowGroupClient {

	@RequestMapping(value = "/flowgroup/deletemember", method = RequestMethod.POST)
    @ApiOperation(value="刪除用户角色", notes = "刪除用户角色")
    public ResponseWrapper deletemember(
            @RequestBody List<MembershipVO> membershipVO);
	
	@RequestMapping(value = "/flowgroup/member", method = RequestMethod.POST)
    @ApiOperation(value="添加用户角色", notes = "添加用户角色")
    public ResponseWrapper member(
            @RequestBody List<MembershipVO> membershipVO);
	
	
	@RequestMapping(value = "/flowgroup/user", method = RequestMethod.POST)
    @ApiOperation(value="添加用户", notes = "添加用户")
    public ResponseWrapper user(
            @RequestBody List<UserVO> user);
	
	
	@RequestMapping(value = "/flowgroup/group", method = RequestMethod.POST)
    @ApiOperation(value="添加角色", notes = "添加角色")
    public ResponseWrapper group(
            @RequestBody List<GroupVO> group);
	
	
	 @RequestMapping(value = "/flowgroup/deletemember", method = RequestMethod.POST)
	    @ApiOperation(value="刪除用户角色", notes = "刪除用户角色，參數用戶id")
	    public ResponseWrapper deletemember(
	            @RequestBody MembershipVO membershipVO);
}