package com.muyu.server.controller;

import com.muyu.common.core.domain.Result;
import com.muyu.domain.req.FirmUpdPermissionReq;
import com.muyu.server.service.FirmPermissionService;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.parameters.RequestBody;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 企业权限分配控制层
 * @Author：weiran
 * @Package：com.muyu.server.controller
 * @Project：cloud-server-8
 * @name：FirmPermission
 * @Date：2024/10/7 21:29
 */
@RestController
@RequestMapping("/permission")
public class FirmPermissionController {
    @Autowired
    private FirmPermissionService firmPermissionService;

    /**
     * 修改企业权限分配
     * @param firmUpdPermissionReq
     * @return
     */
    @PostMapping("/updpermission")
    @Operation(summary = "修改权限分配",description = "修改权限分配")
    public Result updpermission(@RequestBody FirmUpdPermissionReq firmUpdPermissionReq){
        firmPermissionService.updpermission(firmUpdPermissionReq);
        return Result.success(null,"权限更改成功");
    }
}
