package com.sundot.airport.web.controller.common;

import com.sundot.airport.common.config.RuoYiConfig;
import com.sundot.airport.common.core.domain.AjaxResult;
import com.sundot.airport.common.core.domain.TreeQuery;
import com.sundot.airport.common.core.domain.entity.SysDept;
import com.sundot.airport.common.utils.StringUtils;
import com.sundot.airport.common.utils.file.FileUploadUtils;
import com.sundot.airport.common.utils.file.FileUtils;
import com.sundot.airport.framework.config.ServerConfig;
import com.sundot.airport.system.service.ISysTreeService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.MediaType;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.multipart.MultipartFile;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.util.ArrayList;
import java.util.List;

import static com.sundot.airport.common.core.domain.AjaxResult.success;

/**
 * 通用数据配置树结构请求处理
 * 
 * @author ruoyi
 */
@RestController
@RequestMapping("/dataConfig")
public class DataConfigController
{
    private static final Logger log = LoggerFactory.getLogger(DataConfigController.class);

    @Autowired
    private ISysTreeService sysTreeService ;

    /**
     * 获取部门树列表
     */
    @GetMapping("/dataConfigTree")
    public AjaxResult dataConfigTree(TreeQuery treeQuery)
    {
        return success(sysTreeService.selectTreeList(treeQuery));
    }
}
