package com.zzsn.knowbase.controller;


import com.zzsn.knowbase.entity.KbUserRoleMap;
import com.zzsn.knowbase.service.KbUserRoleMapService;
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/userRole")
public class KbUserRoleMapController {
    @Autowired
    KbUserRoleMapService userRoleMapService;

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