package com.yanzhu.project.controller;

import com.yanzhu.common.core.controller.BaseController;
import com.yanzhu.common.core.domain.AjaxResult;
import com.yanzhu.common.core.domain.entity.SysDept;
import com.yanzhu.system.service.ISysDeptService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@RestController
@RequestMapping("/project/company")
public class CompanyController extends BaseController {
    @Autowired
    private ISysDeptService deptService;


    @PreAuthorize("@ss.hasPermi('project:company:list')")
    @PostMapping("/list")
    public AjaxResult companyList(@RequestBody SysDept where)
    {
        where.setParentId(100l);
        where.setDelFlag("0");
        List<SysDept> depts = deptService.selectDeptList(where);
        return success(depts);
    }

}
