package com.pm.web.controller.subsystem;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import com.pm.common.core.controller.BaseController;
import com.pm.common.core.domain.AjaxResult;
import com.pm.common.config.PageData;
import com.pm.subsystem.service.ICommonService;

/**
 * 子系统公共Controller
 * 
 * @author pm
 * @date 2025-01-01
 */
@RestController
@RequestMapping("/subsystem/common")
public class SubsystemCommonController extends BaseController
{
    @Autowired
    private ICommonService commonService;

    /**
     * 获取楼栋列表
     */
    @GetMapping("/building/list")
    public AjaxResult buildingList()
    {
        return success(commonService.selectBuildingList());
    }

    /**
     * 获取楼层列表
     */
    @GetMapping("/floor/list")
    public AjaxResult floorList()
    {
        PageData pd = this.getPageData();
        return success(commonService.selectFloorList(pd));
    }
}