package com.hzs.system.base.controller.manage;


import com.hzs.common.core.web.controller.BaseController;
import com.hzs.common.core.web.domain.AjaxResult;
import com.hzs.common.core.web.page.TableDataInfo;
import com.hzs.common.domain.system.base.BdRegionVertex;
import com.hzs.system.base.service.IBdRegionVertexService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
 * <p>
 * 区域体系分组配置表 前端控制器
 * </p>
 *
 * @author sangelxiu1
 * @since 2025-06-25
 */
@RestController
@RequestMapping("/manage/bd-region-vertex")
public class BdRegionVertexController extends BaseController {
    @Autowired
    private IBdRegionVertexService bdRegionVertexService;

    @GetMapping("/list")
    public TableDataInfo list(BdRegionVertex param) {
        startPage();
        List<BdRegionVertex> list = bdRegionVertexService.getList(param);
        return getDataTable(list);
    }

    @GetMapping("/getAll")
    public AjaxResult getAll() {
        List<BdRegionVertex> list = bdRegionVertexService.getList(null);
        return AjaxResult.success(list);
    }
    @PostMapping("/add")
    public AjaxResult add(@RequestBody BdRegionVertex param) {
        bdRegionVertexService.add(param);
        return AjaxResult.success();
    }
    @PostMapping("/update")
    public AjaxResult update(@RequestBody BdRegionVertex param) {
        bdRegionVertexService.update(param);
        return AjaxResult.success();
    }
    @PostMapping("/delete")
    public AjaxResult delete(@RequestBody BdRegionVertex param) {
        bdRegionVertexService.delete(param);
        return AjaxResult.success();
    }
    @GetMapping("/getById")
    public AjaxResult getById(BdRegionVertex param) {
        return AjaxResult.success(bdRegionVertexService.getById(param));
    }
}
