package com.bonus.system.controller;

import com.bonus.common.core.web.controller.BaseController;
import com.bonus.common.core.web.domain.AjaxResult;
import com.bonus.common.core.web.page.TableDataInfo;
import com.bonus.common.log.annotation.SysLog;
import com.bonus.common.log.enums.OperaType;
import com.bonus.common.security.annotation.InnerAuth;
import com.bonus.common.security.annotation.RequiresPermissions;
import com.bonus.common.security.annotation.RequiresPermissionsOrInnerAuth;
import com.bonus.system.api.domain.SysTemplateMenu;
import com.bonus.system.service.ISysTemplateMenuService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import java.util.List;

/**
 * 权限模板菜单Controller
 *
 * @author bonus
 * @date 2025-01-05
 */
@RestController
@RequestMapping("/template_menu")
public class SysTemplateMenuController extends BaseController {

    @Autowired
    private ISysTemplateMenuService sysTemplateMenuService;

    /**
     * 查询权限模板菜单
     */
//    @RequiresPermissionsOrInnerAuth(innerAuth = @InnerAuth, requiresPermissions = @RequiresPermissions("system:template:list"))
//    @SysLog(title = "权限模板菜单管理", businessType = OperaType.QUERY,logType = 0,module = "公司管理->权限模板菜单管理")
//    @GetMapping("/list")
//    public TableDataInfo list() {
//        //startPage();
//        List<SysTemplateMenu> list = sysTemplateMenuService.queryAll();
//        return getDataTable(list);
//    }

    /**
     * 新增权限模板菜单
     */
//    @RequiresPermissionsOrInnerAuth(innerAuth = @InnerAuth, requiresPermissions = @RequiresPermissions("system:template:add"))
//    @SysLog(title = "权限模板菜单管理", businessType = OperaType.INSERT,logType = 0,module = "公司管理->权限模板菜单管理")
//    @PostMapping
//    public AjaxResult add(@RequestBody List<SysTemplateMenu> list) {
//        return toAjax(sysTemplateMenuService.batchInsert(list));
//    }
}
