zouyu
4 天以前 abd73edd5d08e26fba60ab47f53722502a87505a
src/main/java/com/ruoyi/project/system/controller/SysRoleController.java
@@ -2,6 +2,8 @@
import java.util.List;
import javax.servlet.http.HttpServletResponse;
import com.ruoyi.common.utils.SecurityUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.validation.annotation.Validated;
@@ -45,10 +47,10 @@
    @Autowired
    private TokenService tokenService;
    @Autowired
    private SysPermissionService permissionService;
    @Autowired
    private ISysUserService userService;
@@ -102,6 +104,7 @@
            return error("新增角色'" + role.getRoleName() + "'失败,角色权限已存在");
        }
        role.setCreateBy(getUsername());
        role.setTenantId(SecurityUtils.getLoginUser().getTenantId());
        return toAjax(roleService.insertRole(role));
    }