package com.fjhx.controller.common;

import com.fjhx.service.common.CommonService;
import org.springblade.core.tool.api.R;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 * 公共 前端控制器
 * </p>
 *
 * @author ${author}
 * @since 2022-11-24
 */
@RestController
@RequestMapping("/common")
public class CommonController {

    @Autowired
    private CommonService commonService;

    /**
     * 获取部门树
     *
     * @return
     */
    @PostMapping("/dept/tree")
    public R deptTree() {
        return R.success(commonService.deptTree());
    }

}

