package com.tuoheng.miniprogram.controller;

import com.tuoheng.common.core.utils.JsonResult;
import com.tuoheng.miniprogram.service.IDeptService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Author ChengWang
 * @Date 2022/11/21
 */
@RestController
@RequestMapping("/dept")
public class DeptController {

    @Autowired
    private IDeptService iDeptService;

    /**
     * 获取部门列表(树形)
     * @return
     */
    @GetMapping("/treeList")
    public JsonResult treeList(){
        return iDeptService.treeList();
    }

    @GetMapping("/test")
    public JsonResult test(String id){
        return iDeptService.test(id);
    }





}
