package com.boman.system.controller;

import com.boman.domain.dto.AjaxResult;
import com.boman.domain.dto.RoleMenuDto;
import com.boman.system.service.impl.ISysRoleMenuService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
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 javax.annotation.Resource;
import java.util.List;

/**
 * @author shiqian
 * @date 2021年04月27日 14:31
 **/
@RestController
@RequestMapping("/role/menu")
public class SysRoleMenuController {

    private static final Logger LOGGER = LoggerFactory.getLogger(SysRoleMenuController.class);

    @Resource
    private ISysRoleMenuService service;

    /**
     * 功能描述: 批量保存roleMenu
     *
     * @param dtos dtos
     * @return com.boman.domain.dto.AjaxResult
     */
    @PostMapping
    public AjaxResult list(@RequestBody List<RoleMenuDto> dtos) {
        return AjaxResult.success(service.saveList(dtos));
    }
}
