package com.unis.base.app.controller;

import com.unis.base.app.feign.UserFeign;
import com.unis.common.utils.ResponseWrapper;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author huangxing
 * @version 1.0
 * @Title: TzSlqyFeign
 * @ProjectName TzSlqyFeign
 * @Description:TzSlqyfegin接口
 * @date 2019/7/7 18:05
 */
@RestController
@Api(value = "用户中心", tags = "用户中心")
@Slf4j
public class UserController {

	@Autowired
	private UserFeign userFeign;

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