We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
首先是找到了文件上传表单的上传映射,在mindmapController中,这里已经能够获取session属性用户名了,之后我在controller中定义了一个全局变量name,在运行到点击查看“知识图谱时”,由于open_ajax()这个方法中传递了选中行的userid参数,所以我在关于getShareMindNodeObject.do映射中将这个userid赋值给了之前定义的name变量。最后,通过在setShare.do下的方法中我判断了,userid与name是否相同,如果不一致,StatusMap.a("4")利用Status类中的a()方法传递一个4:表示信息不一致,再前台ajax中$.messager.alert("操作失败","不能分享他人的知识图谱","info");进行弹框显示。
The text was updated successfully, but these errors were encountered:
在ssetShare.do下的方法中通过 获取 前台传来的数据 nodeid 得到知识图谱的拥有者MIndUser,判断系统中当前登录用户 userid 是否与MIndUser相同,不同的话返回“无法分享别人的知识图谱”
Sorry, something went wrong.
因为id是惟一的 String nickName = tryCatchMindMapService.getMindNode("nodeid", nodeid) .get(0).getUserid();获取当前知识图谱用户id 所以通过判断用户id和判断当前知识图谱id(nickName)是否相同,如果相同则可以修改分享,如果不同则不能分享,然后json返回a=4, 弹出提示对话框:请勿分享他人的 知识图谱
No branches or pull requests
首先是找到了文件上传表单的上传映射,在mindmapController中,这里已经能够获取session属性用户名了,之后我在controller中定义了一个全局变量name,在运行到点击查看“知识图谱时”,由于open_ajax()这个方法中传递了选中行的userid参数,所以我在关于getShareMindNodeObject.do映射中将这个userid赋值给了之前定义的name变量。最后,通过在setShare.do下的方法中我判断了,userid与name是否相同,如果不一致,StatusMap.a("4")利用Status类中的a()方法传递一个4:表示信息不一致,再前台ajax中$.messager.alert("操作失败","不能分享他人的知识图谱","info");进行弹框显示。
The text was updated successfully, but these errors were encountered: