package com.supServer.project.controller;

import com.supServer.framework.web.domain.AjaxResult;
import com.supServer.project.entity.BizCategory;
import com.supServer.project.entity.vo.BizCategoryVo;
import com.supServer.project.service.BizCategoryService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * <p>
 * 供应商类型
 * </p>
 * @since 2022-10—24
 */
@RestController
@RequestMapping("/category")
public class BizCategoryController {

    @Autowired
    private BizCategoryService bizCategoryService;


    /**
     * 供应商类型查询
     */
    @PostMapping("/list/tree")
    public AjaxResult list (@RequestBody BizCategoryVo vo) {
        AjaxResult ajaxResult = bizCategoryService.listTree(vo);
        return AjaxResult.success(ajaxResult);
    }

}
