package io.renren.modules.app.controller;

import java.util.List;

import org.apache.shiro.authz.annotation.RequiresPermissions;
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;

import io.renren.modules.admin.entity.CategoryEntity;
import io.renren.modules.admin.service.CategoryService;
import io.renren.common.utils.R;




/**
 * 材料类型表
 *
 * @author huwhois
 * @email huwhois@gmail.com
 * @date 2020-07-17 09:55:33
 */
@RestController
@RequestMapping("/app/category")
public class AppCategoryController {
    @Autowired
    private CategoryService categoryService;

    /**
     * treeList
     */
    @GetMapping("/treelist")
    public R treeList(){
        List<CategoryEntity> list = categoryService.queryTreeList();

        return R.ok().put("list", list);
    }
}
