package com.unis.base.app.feign;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.*;
import com.unis.common.utils.ResponseWrapper;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;

/**
 * @author huangxing
 * @version 1.0
 * @Title: TzSlqyFeign
 * @ProjectName TzSlqyFeign
 * @Description:TzSlqyfegin接口
 * @date 2019/7/7 18:05
 */
@FeignClient(name = "myuser")
@Component
@Api(value = "用户中心", tags = "用户中心")
public interface UserFeign {

	/**	q
	 * @author huangxing
	 * @Description 获取企业信息列表
	 * @param 当前组织编号（自治区为LS001
	 * @return 企业信息列表
	 */
	@ApiOperation(value = "获取企业信息树", notes = "参数：当前组织编号（自治区为LS001）")
	@PostMapping(value = "/org/tree")
    public ResponseWrapper getCompanyList(@RequestParam(required = false,defaultValue = "LS001",value = "orgCode") String orgCode,@RequestParam(required = false,value = "orgType") String orgType);

	@ApiOperation(value = "根据组织名称查询组织信息", notes = "参数：orgName（string，必填）：orgName")
	@PostMapping(value = "/org/findByOrgNameAndParentCode")
	public ResponseWrapper findByOrgNameAndParentCode(@RequestParam("orgName") String orgName, @RequestParam("parentCode") String parentCode);
}
