package com.hw.system.common.controller;

import com.hw.common.core.web.controller.BaseController;
import com.hw.common.core.web.domain.AjaxResult;
import com.hw.common.security.annotation.RequiresPermissions;
import com.hw.system.api.domain.SysDept;
import com.hw.system.service.ISysDeptService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * @Description: 通用对其他服务提供的Controller
 * @ClassName: SysCommonController
 * @Author  : xins
 * @Date    :2024-01-09  14:35
 * @Version :1.0
 */
@RestController
@RequestMapping("/hwcommon")
public class SysCommonController extends BaseController
{
    @Autowired
    private ISysDeptService deptService;

    /**
     * 获取部门列表
     */
    @RequiresPermissions("wms:wmswarehouse:list")
    @GetMapping("/getDeptTreeForWarehouse")
    public AjaxResult deptTree(SysDept dept)
    {
        return success(deptService.selectDeptTreeList(dept));
    }

}
