package com.zzsn.knowbase.controller;


import com.zzsn.knowbase.entity.KbRolePermissionMap;
import com.zzsn.knowbase.service.KbRolePermissionMapService;
import com.zzsn.knowbase.vo.Result;
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;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author obcy
 * @since 2024-01-04
 */
@RestController
@RequestMapping("/api/rolePermission")
public class KbRolePermissionMapController {
    @Autowired
    KbRolePermissionMapService rolePermissionMapService;

    @PostMapping("/add")
    public Result add(@RequestBody KbRolePermissionMap map){
        return Result.OK(rolePermissionMapService.save(map));
    }
}
