package com.xunmei.system.controller;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.xunmei.common.core.web.controller.BaseController;
import com.xunmei.common.core.web.domain.AjaxResult;
import com.xunmei.common.security.annotation.RequiresPermissions;
import com.xunmei.system.api.domain.Org;
import com.xunmei.system.service.IOrgService;
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;

@RestController
@RequestMapping("/org")
public class OrgController extends BaseController {
    @Autowired
    private IOrgService orgService;

    /**
     * 获取部门列表
     */
    @RequiresPermissions("system:org:list")
    @GetMapping("/list")
    public AjaxResult list(Page<Org> page, Org org)
    {
        orgService.selectPage(page, org);
        return success(page);
    }




}
