{"id":120055,"date":"2026-10-30T23:50:29","date_gmt":"2026-10-30T15:50:29","guid":{"rendered":"https:\/\/www.wsisp.com\/helps\/120055.html"},"modified":"2026-10-30T23:50:29","modified_gmt":"2026-10-30T15:50:29","slug":"go-im-%e6%ba%90%e7%a0%81%e5%ae%9e%e6%88%98%ef%bc%8812%ef%bc%89%ef%bc%9a%e5%bb%ba%e4%b8%aa-500-%e4%ba%ba%e7%9a%84%e7%be%a4%ef%bc%8c%e5%86%99%e7%9a%84%e6%98%af-500-%e6%9d%a1%e8%ae%b0%e5%bd%95","status":"publish","type":"post","link":"https:\/\/www.wsisp.com\/helps\/120055.html","title":{"rendered":"Go IM \u6e90\u7801\u5b9e\u6218\uff0812\uff09\uff1a\u5efa\u4e2a 500 \u4eba\u7684\u7fa4\uff0c\u5199\u7684\u662f 500 \u6761\u8bb0\u5f55"},"content":{"rendered":"<p>\u4f60\u597d&#xff0c;\u6211\u662f\u5229\u5a01\u5c14xu\u3002<\/p>\n<p>\u8fd9\u662f**\u300cGo IM \u6e90\u7801\u5b9e\u6218\u300d\u7cfb\u5217\u7b2c 12 \u7bc7**\u3002\u524d\u9762\u8bb2\u7684\u662f&#034;\u4e00\u5bf9\u4e00&#034;\u7684\u94fe\u8def&#xff0c;\u8fd9\u4e00\u7bc7\u5f00\u59cb\u8bb2**\u201c\u4e00\u5bf9\u591a\u201d**&#xff1a;\u7fa4\u7ec4\u3002<\/p>\n<p>\u5148\u8bf4\u4e00\u4e2a\u5efa\u7fa4\u65f6\u7684\u771f\u5b9e\u5f00\u9500&#xff1a;\u5efa\u4e00\u4e2a 500 \u4eba\u7684\u7fa4&#xff0c;\u4e0d\u662f&#034;\u63d2\u4e00\u6761\u7fa4\u8bb0\u5f55&#034;&#xff0c;\u800c\u662f&#034;\u63d2 1 \u6761\u7fa4\u8bb0\u5f55 &#043; 500 \u6761\u6210\u5458\u8bb0\u5f55 &#043; 500 \u6761\u4f1a\u8bdd\u8bb0\u5f55 &#043; 1 \u6761\u901a\u77e5\u6d88\u606f&#xff0c;\u8fd8\u8981\u63a8\u7ed9 500 \u4e2a\u4eba&#034;\u3002 \u800c\u8fd9\u4e9b\u64cd\u4f5c\u8de8\u8d8a\u4e86 group\u3001conversation\u3001msg\u3001push \u56db\u4e2a\u670d\u52a1\u3002<\/p>\n<p>\u6240\u4ee5\u7fa4\u8fd9\u5757\u7684\u96be\u70b9\u4ece\u6765\u4e0d\u662f&#034;\u5efa\u7fa4&#034;\u8fd9\u4e2a\u529f\u80fd&#xff0c;\u800c\u662f\u4e09\u4e2a\u6570&#xff1a;5000 \u4eba\u7684\u7fa4\u6539\u4e2a\u7fa4\u540d\u8981\u5199\u591a\u5c11\u6761&#xff1f;\u4e00\u4e2a\u4eba\u9000\u7fa4\u8981\u4e0d\u8981\u52a8\u522b\u4eba\u7684\u6570\u636e&#xff1f;\u7fa4\u4e3b\u9000\u7fa4\u4f1a\u600e\u6837&#xff1f;<\/p>\n<p>\u8fd9\u7bc7\u8bb2\u56db\u4ef6\u4e8b&#xff1a;\u7fa4\u6210\u5458\u8fd9\u5f20\u4e2d\u95f4\u8868\u600e\u4e48\u8bbe\u8ba1&#xff08;\u4e3a\u4ec0\u4e48\u4e0d\u80fd\u585e\u6570\u7ec4&#xff09;\u3001\u4e09\u7ea7\u89d2\u8272\u7684\u6743\u9650\u77e9\u9635&#xff08;\u4e3a\u4ec0\u4e48\u4e0d\u505a\u6210\u53ef\u914d\u7f6e&#xff09;\u3001\u7981\u8a00\u4e3a\u4ec0\u4e48\u5fc5\u987b\u4e24\u5c42\u3001\u4ee5\u53ca&#034;\u7fa4\u4e3b\u4e0d\u80fd\u9000\u7fa4&#034;\u8fd9\u6761\u4e0d\u53d8\u91cf\u80cc\u540e\u7684\u771f\u5b9e\u539f\u56e0\u3002<\/p>\n<p>\u6e90\u7801\u4f4d\u7f6e&#xff08;\u5168\u7cfb\u5217\u540c\u4e00\u4efd&#xff09;&#xff1a;<\/p>\n<ul>\n<li>GitHub&#xff1a;https:\/\/github.com\/CYQ111999\/IM-Server<\/li>\n<li>\u57fa\u7ebf&#xff1a;OpenIM Server v3.8 \u7626\u8eab\u7248&#xff0c;main &#064; 07f9ff6<\/li>\n<li>\u672c\u7bc7\u6d89\u53ca&#xff1a;pkg\/common\/storage\/model\/group_member.go\u3001internal\/rpc\/group\/group.go\u3001internal\/rpc\/group\/notification.go\u3001pkg\/common\/storage\/controller\/group.go<\/li>\n<\/ul>\n<p>\u524d 4 \u7bc7&#xff1a;1 \u5168\u5c40\u5730\u56fe\u30012 WS \u7f51\u5173\u30013 HTTP API \u5c42\u30014 \u53d1\u9001\u94fe\u8def\u3002\u7b2c 5 \u7bc7\u8d77\u5168\u90e8\u5728\u540c\u540d\u4e13\u680f\u91cc&#xff0c;\u89c1\u4f5c\u8005\u6587\u7ae0\u5217\u8868&#xff1b;\u7cfb\u5217\u5bfc\u822a\u5728\u300a\u65b0\u7c89\u5fc5\u770b&#xff1a;\u6280\u672f\u535a\u5ba2\u5b66\u4e60\u8def\u7ebf\u300b\u3002<\/p>\n<\/p>\n<h4>\u6587\u7ae0\u76ee\u5f55<\/h4>\n<ul>\n<li>\n<ul>\n<li>\u4e00\u3001\u7fa4\u6210\u5458\u5b58\u54ea&#xff1a;\u4e3a\u4ec0\u4e48\u4e0d\u80fd\u585e\u8fdb\u7fa4\u6587\u6863\u7684\u6570\u7ec4<\/li>\n<li>\n<ul>\n<li>\u65b9\u6848\u4e00&#xff1a;\u7fa4\u6587\u6863\u91cc\u5b58\u6210\u5458\u6570\u7ec4<\/li>\n<li>\u65b9\u6848\u4e8c&#xff1a;\u72ec\u7acb\u6210\u5458\u8868&#xff08;\u672c\u9879\u76ee\u7684\u9009\u62e9&#xff09;<\/li>\n<li>\u4e09\u4e2a\u5b57\u6bb5\u503c\u5f97\u5355\u72ec\u8bf4<\/li>\n<\/ul>\n<\/li>\n<li>\u4e8c\u3001\u4e09\u7ea7\u89d2\u8272&#xff1a;\u4e00\u4e2a\u523b\u610f\u7684&#034;\u4e0d\u914d\u7f6e\u5316&#034;<\/li>\n<li>\n<ul>\n<li>\u6743\u9650\u77e9\u9635&#xff08;\u8bfb\u6e90\u7801\u65f6\u6700\u8be5\u505a\u7684\u4e8b&#xff09;<\/li>\n<\/ul>\n<\/li>\n<li>\u4e09\u3001\u7981\u8a00&#xff1a;\u4e3a\u4ec0\u4e48\u5fc5\u987b\u662f\u4e24\u5c42<\/li>\n<li>\u56db\u3001\u5efa\u7fa4\u4e00\u6b21\u8981\u5199\u591a\u5c11\u4e1c\u897f<\/li>\n<li>\u4e94\u3001&#034;\u8fd9\u4e2a\u7fa4\u6709\u591a\u5c11\u4eba&#034;&#xff1a;\u4e09\u79cd\u7b97\u6cd5\u548c\u5404\u81ea\u7684\u5929\u82b1\u677f<\/li>\n<li>\u516d\u3001\u6210\u5458\u53d8\u66f4\u901a\u77e5&#xff1a;\u4e09\u5c42\u5f00\u5173\u548c\u6247\u51fa\u6210\u672c<\/li>\n<li>\u4e03\u3001\u7fa4\u4e3b\u8f6c\u8ba9&#xff1a;\u4e00\u4e2a\u5fc5\u987b\u539f\u5b50\u5b8c\u6210\u7684\u4e24\u6b65<\/li>\n<li>\u516b\u3001\u89e3\u6563\u7fa4&#xff1a;\u4e24\u79cd\u6a21\u5f0f&#xff0c;\u548c\u90a3\u4e2a&#034;\u8981\u5220 8 \u7c7b\u7f13\u5b58&#034;\u7684\u6559\u8bad<\/li>\n<li>\n<ul>\n<li>\u4e24\u4e2a\u6a21\u5f0f\u5199\u7684\u7248\u672c\u65e5\u5fd7\u4e0d\u4e00\u6837&#xff0c;\u4e3a\u4ec0\u4e48<\/li>\n<\/ul>\n<\/li>\n<li>\u4e5d\u3001\u7fa4 ID \u751f\u6210&#xff1a;\u4e3a\u4ec0\u4e48\u5141\u8bb8\u8c03\u7528\u65b9\u6307\u5b9a<\/li>\n<li>\u5341\u3001PopulateGroupMember&#xff1a;N&#043;1 \u67e5\u8be2\u7684\u6807\u51c6\u89e3\u6cd5<\/li>\n<li>\u5341\u4e00\u3001\u8e29\u5751\u8bb0\u5f55&#xff1a;\u4e09\u4e2a\u5751&#xff0c;\u4e00\u5171 11 \u5c0f\u65f6<\/li>\n<li>\u5341\u4e8c\u3001\u9762\u8bd5\u4f1a\u600e\u4e48\u95ee<\/li>\n<li>\u5341\u4e09\u3001\u5c0f\u7ed3&#xff1a;\u4e00\u5f20\u4e2d\u95f4\u8868\u3001\u4e24\u4e2a\u4e0d\u53d8\u91cf\u3001\u4e09\u79cd\u7b97\u6cd5<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<h3>\u4e00\u3001\u7fa4\u6210\u5458\u5b58\u54ea&#xff1a;\u4e3a\u4ec0\u4e48\u4e0d\u80fd\u585e\u8fdb\u7fa4\u6587\u6863\u7684\u6570\u7ec4<\/h3>\n<p>\u4e00\u4e2a\u7fa4\u6709 N \u4e2a\u6210\u5458&#xff0c;\u4e00\u4e2a\u4eba\u6709 M \u4e2a\u7fa4\u3002\u8fd9\u662f\u5178\u578b\u7684\u591a\u5bf9\u591a\u5173\u7cfb&#xff0c;\u4e24\u79cd\u5b58\u6cd5\u3002<\/p>\n<h4>\u65b9\u6848\u4e00&#xff1a;\u7fa4\u6587\u6863\u91cc\u5b58\u6210\u5458\u6570\u7ec4<\/h4>\n<p><span class=\"token punctuation\">{<\/span><br \/>\n  <span class=\"token string-property property\">&#034;group_id&#034;<\/span><span class=\"token operator\">:<\/span> <span class=\"token string\">&#034;123&#034;<\/span><span class=\"token punctuation\">,<\/span><br \/>\n  <span class=\"token string-property property\">&#034;group_name&#034;<\/span><span class=\"token operator\">:<\/span> <span class=\"token string\">&#034;\u6280\u672f\u7fa4&#034;<\/span><span class=\"token punctuation\">,<\/span><br \/>\n  <span class=\"token string-property property\">&#034;members&#034;<\/span><span class=\"token operator\">:<\/span> <span class=\"token punctuation\">[<\/span><br \/>\n    <span class=\"token punctuation\">{<\/span><span class=\"token string-property property\">&#034;user_id&#034;<\/span><span class=\"token operator\">:<\/span> <span class=\"token string\">&#034;a&#034;<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token string-property property\">&#034;role&#034;<\/span><span class=\"token operator\">:<\/span> <span class=\"token number\">1<\/span><span class=\"token punctuation\">}<\/span><span class=\"token punctuation\">,<\/span><br \/>\n    <span class=\"token punctuation\">{<\/span><span class=\"token string-property property\">&#034;user_id&#034;<\/span><span class=\"token operator\">:<\/span> <span class=\"token string\">&#034;b&#034;<\/span><span class=\"token punctuation\">,<\/span> <span class=\"token string-property property\">&#034;role&#034;<\/span><span class=\"token operator\">:<\/span> <span class=\"token number\">3<\/span><span class=\"token punctuation\">}<\/span><br \/>\n    <span class=\"token comment\">\/\/ &#8230; 500 \u4eba<\/span><br \/>\n  <span class=\"token punctuation\">]<\/span><br \/>\n<span class=\"token punctuation\">}<\/span><\/p>\n<p>\u67e5&#034;\u7fa4\u7684\u6240\u6709\u6210\u5458&#034;\u786e\u5b9e\u662f\u4e00\u6b21\u67e5\u8be2&#xff0c;\u5f88\u5feb\u3002\u4f46\u4e09\u4e2a\u7f3a\u70b9\u662f\u81f4\u547d\u7684&#xff1a;<\/p>\n<table>\n<tr>\u95ee\u9898\u5177\u4f53\u8868\u73b0<\/tr>\n<tbody>\n<tr>\n<td>\u6587\u6863\u5927\u5c0f<\/td>\n<td>Mongo \u5355\u6587\u6863\u4e0a\u9650 16MB&#xff0c;\u6bcf\u6761\u6210\u5458 200 \u5b57\u8282 \u2192 \u6700\u591a 8 \u4e07\u4eba&#xff08;\u770b\u7740\u591f&#xff0c;\u4f46\u8bfb\u7fa4\u4fe1\u606f\u4f1a\u8fde\u5e26\u62c9\u56de\u6574\u4e2a\u6570\u7ec4&#xff09;<\/td>\n<\/tr>\n<tr>\n<td>\u53cd\u5411\u67e5\u8be2<\/td>\n<td>&#034;\u6211\u52a0\u5165\u4e86\u54ea\u4e9b\u7fa4&#034;\u8981\u904d\u5386\u6240\u6709\u7fa4\u6587\u6863\u626b\u6570\u7ec4 \u2014\u2014 O(\u7fa4\u603b\u6570)<\/td>\n<\/tr>\n<tr>\n<td>\u5e76\u53d1\u51b2\u7a81<\/td>\n<td>\u4e24\u4e2a\u4eba\u540c\u65f6\u6539\u4e0d\u540c\u6210\u5458&#xff0c;\u90fd\u91cd\u5199\u6574\u4e2a\u6570\u7ec4&#xff0c;\u540e\u5199\u7684\u8986\u76d6\u524d\u5199\u7684<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>\u7b2c\u4e09\u6761\u662f\u6700\u96be\u7f20\u7684\u3002 \u5b83\u4e0d\u4f1a\u62a5\u9519&#xff0c;\u53ea\u4f1a&#034;\u4e22\u66f4\u65b0&#034;\u2014\u2014A \u6539\u4e86\u6210\u5458 X \u7684\u7981\u8a00\u65f6\u95f4&#xff0c;B \u540c\u65f6\u6539\u4e86\u6210\u5458 Y \u7684\u7fa4\u6635\u79f0&#xff0c;\u6700\u540e\u53ea\u6709\u4e00\u4e2a\u751f\u6548\u3002<\/p>\n<h4>\u65b9\u6848\u4e8c&#xff1a;\u72ec\u7acb\u6210\u5458\u8868&#xff08;\u672c\u9879\u76ee\u7684\u9009\u62e9&#xff09;<\/h4>\n<p>group_member \u96c6\u5408&#xff1a;<br \/>\n{ group_id: &#034;123&#034;, user_id: &#034;a&#034;, role_level: 1, join_time: &#8230;, mute_end_time: &#8230; }<br \/>\n{ group_id: &#034;123&#034;, user_id: &#034;b&#034;, role_level: 3, &#8230; }<br \/>\n{ group_id: &#034;456&#034;, user_id: &#034;a&#034;, role_level: 1, &#8230; }<\/p>\n<p>\u4e00\u6761\u8bb0\u5f55 &#061; \u4e00\u4e2a&#034;\u7528\u6237\u5728\u67d0\u7fa4\u91cc\u7684\u8eab\u4efd&#034;&#xff0c;\u914d\u4e09\u4e2a\u7d22\u5f15&#xff1a;<\/p>\n<table>\n<tr>\u7d22\u5f15\u652f\u6491\u54ea\u4e2a\u67e5\u8be2<\/tr>\n<tbody>\n<tr>\n<td>(group_id, user_id) \u552f\u4e00<\/td>\n<td>\u67e5\u5355\u4e2a\u6210\u5458\u3001\u9632\u91cd\u590d\u5165\u7fa4<\/td>\n<\/tr>\n<tr>\n<td>group_id<\/td>\n<td>\u67e5\u7fa4\u7684\u6240\u6709\u6210\u5458<\/td>\n<\/tr>\n<tr>\n<td>user_id<\/td>\n<td>\u67e5\u67d0\u4eba\u52a0\u5165\u7684\u6240\u6709\u7fa4<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>&#x1f4cc; M:N \u5173\u7cfb\u7528\u4e2d\u95f4\u8868&#xff0c;\u4e0d\u8981\u585e\u6570\u7ec4\u3002 \u6570\u7ec4\u53ea\u9002\u5408&#034;\u6570\u91cf\u6709\u4e0a\u9650\u3001\u603b\u662f\u6574\u4f53\u8bfb\u5199&#034;\u7684\u573a\u666f&#xff08;\u6bd4\u5982\u4e00\u6761\u6d88\u606f\u7684 &#064; \u5217\u8868&#xff09;\u3002<\/p>\n<h4>\u4e09\u4e2a\u5b57\u6bb5\u503c\u5f97\u5355\u72ec\u8bf4<\/h4>\n<p><span class=\"token keyword\">type<\/span> GroupMember <span class=\"token keyword\">struct<\/span> <span class=\"token punctuation\">{<\/span><br \/>\nGroupID        <span class=\"token builtin\">string<\/span>    <span class=\"token string\">&#096;bson:&#034;group_id&#034;&#096;<\/span><br \/>\nUserID         <span class=\"token builtin\">string<\/span>    <span class=\"token string\">&#096;bson:&#034;user_id&#034;&#096;<\/span><br \/>\nNickname       <span class=\"token builtin\">string<\/span>    <span class=\"token string\">&#096;bson:&#034;nickname&#034;&#096;<\/span>         <span class=\"token comment\">\/\/ \u7fa4\u6635\u79f0<\/span><br \/>\nFaceURL        <span class=\"token builtin\">string<\/span>    <span class=\"token string\">&#096;bson:&#034;face_url&#034;&#096;<\/span><br \/>\nRoleLevel      <span class=\"token builtin\">int32<\/span>     <span class=\"token string\">&#096;bson:&#034;role_level&#034;&#096;<\/span>       <span class=\"token comment\">\/\/ 1&#061;owner 2&#061;admin 3&#061;ordinary<\/span><br \/>\nJoinTime       time<span class=\"token punctuation\">.<\/span>Time <span class=\"token string\">&#096;bson:&#034;join_time&#034;&#096;<\/span><br \/>\nJoinSource     <span class=\"token builtin\">int32<\/span>     <span class=\"token string\">&#096;bson:&#034;join_source&#034;&#096;<\/span><br \/>\nInviterUserID  <span class=\"token builtin\">string<\/span>    <span class=\"token string\">&#096;bson:&#034;inviter_user_id&#034;&#096;<\/span><br \/>\nOperatorUserID <span class=\"token builtin\">string<\/span>    <span class=\"token string\">&#096;bson:&#034;operator_user_id&#034;&#096;<\/span><br \/>\nMuteEndTime    time<span class=\"token punctuation\">.<\/span>Time <span class=\"token string\">&#096;bson:&#034;mute_end_time&#034;&#096;<\/span><br \/>\nEx             <span class=\"token builtin\">string<\/span>    <span class=\"token string\">&#096;bson:&#034;ex&#034;&#096;<\/span><br \/>\n<span class=\"token punctuation\">}<\/span><\/p>\n<p>\u2460 Nickname \u662f\u5197\u4f59\u7684\u3002 \u5b83\u548c user.Nickname \u53ef\u80fd\u4e0d\u540c&#xff08;\u7fa4\u6635\u79f0\u662f\u7fa4\u5185\u72ec\u7acb\u7684&#xff09;\u3002\u4e3a\u4ec0\u4e48\u5b58\u4e00\u4efd&#xff1f;\u56e0\u4e3a&#034;\u7fa4\u6210\u5458\u5217\u8868&#034;\u662f\u9ad8\u9891\u67e5\u8be2&#xff0c;\u5982\u679c\u6bcf\u4e2a\u4eba\u6635\u79f0\u90fd\u53bb\u7528\u6237\u8868\u67e5&#xff0c;500 \u4eba\u7684\u7fa4\u5c31\u662f 501 \u6b21\u67e5\u8be2\u3002<\/p>\n<p>\u4ee3\u4ef7\u662f&#xff1a;\u7528\u6237\u6539\u4e86\u6635\u79f0&#xff0c;\u8981\u540c\u6b65\u66f4\u65b0\u6240\u6709\u7fa4\u7684\u6210\u5458\u8bb0\u5f55\u2014\u2014\u8fd9\u5c31\u662f PopulateGroupMember&#xff08;\u53d1\u73b0\u7a7a\u4e86\u5c31\u8865&#xff09;\u548c NotificationUserInfoUpdate&#xff08;\u8d44\u6599\u53d8\u66f4\u901a\u77e5\u6240\u6709\u7fa4&#xff09;\u5b58\u5728\u7684\u539f\u56e0\u3002<\/p>\n<p>\u2461 MuteEndTime \u5b58\u7684\u662f&#034;\u7ed3\u675f\u65f6\u95f4&#034;\u800c\u4e0d\u662f&#034;\u5269\u4f59\u79d2\u6570&#034;\u3002 \u56e0\u4e3a\u5269\u4f59\u79d2\u6570\u4f1a\u968f\u65f6\u95f4\u53d8\u5316&#xff0c;\u5b58\u4e0b\u6765\u7acb\u523b\u5c31\u8fc7\u671f\u4e86\u3002\u5b58\u7ed3\u675f\u65f6\u95f4&#xff0c;\u5224\u65ad\u7981\u8a00\u5c31\u662f MuteEndTime.After(time.Now())\u3002<\/p>\n<p>&#x1f4cc; &#034;\u5b58\u7edd\u5bf9\u65f6\u95f4&#xff0c;\u4e0d\u5b58\u76f8\u5bf9\u65f6\u95f4&#034;\u662f\u4e00\u6761\u901a\u7528\u539f\u5219\u3002 \u7f13\u5b58\u8fc7\u671f\u3001\u4efb\u52a1\u5ef6\u8fdf\u3001\u9650\u6d41\u7a97\u53e3\u3001token \u8fc7\u671f\u2026\u2026\u51e1\u662f&#034;\u8fd8\u5269\u591a\u4e45&#034;\u7684\u4e1c\u897f&#xff0c;\u90fd\u5e94\u8be5\u5b58&#034;\u5230\u4ec0\u4e48\u65f6\u5019&#034;\u3002<\/p>\n<p>\u2462 JoinSource \u8bb0\u5f55\u4e86\u5165\u7fa4\u65b9\u5f0f&#xff08;\u9080\u8bf7\/\u626b\u7801\/\u641c\u7d22\/\u5bfc\u5165&#xff09;\u3002\u7528\u4e8e\u7edf\u8ba1\u548c\u98ce\u63a7\u2014\u2014\u4e00\u4e2a&#034;\u626b\u7801\u8fdb\u6765\u53c8\u7acb\u523b\u9000\u7fa4&#034;\u7684\u8d26\u53f7&#xff0c;\u548c&#034;\u88ab\u597d\u53cb\u9080\u8bf7&#034;\u7684\u8d26\u53f7&#xff0c;\u98ce\u63a7\u8bc4\u7ea7\u5b8c\u5168\u4e0d\u540c\u3002<\/p>\n<h3>\u4e8c\u3001\u4e09\u7ea7\u89d2\u8272&#xff1a;\u4e00\u4e2a\u523b\u610f\u7684&#034;\u4e0d\u914d\u7f6e\u5316&#034;<\/h3>\n<p>RBAC \u5b8c\u6574\u7248\u6709\u56db\u5f20\u8868&#xff08;\u89d2\u8272\u3001\u6743\u9650\u3001\u89d2\u8272-\u6743\u9650\u3001\u7528\u6237-\u89d2\u8272&#xff09;\u3002\u672c\u9879\u76ee\u7528\u4e86\u4e00\u4e2a\u6781\u7b80\u7248&#xff1a;\u89d2\u8272\u5199\u6b7b\u4e09\u7ea7&#xff0c;\u6743\u9650\u5199\u6b7b\u5728\u4ee3\u7801\u7684 switch \u91cc\u3002<\/p>\n<p>RoleLevel: 1 &#061; GroupOwner          \u7fa4\u4e3b<br \/>\n           2 &#061; GroupAdmin          \u7ba1\u7406\u5458<br \/>\n           3 &#061; GroupOrdinaryUsers  \u666e\u901a\u6210\u5458<\/p>\n<p><span class=\"token keyword\">switch<\/span> opMember<span class=\"token punctuation\">.<\/span>RoleLevel <span class=\"token punctuation\">{<\/span><br \/>\n<span class=\"token keyword\">case<\/span> constant<span class=\"token punctuation\">.<\/span>GroupOwner<span class=\"token punctuation\">:<\/span><br \/>\n<span class=\"token comment\">\/\/ \u4ec0\u4e48\u90fd\u80fd\u5e72<\/span><br \/>\n<span class=\"token keyword\">case<\/span> constant<span class=\"token punctuation\">.<\/span>GroupAdmin<span class=\"token punctuation\">:<\/span><br \/>\n<span class=\"token comment\">\/\/ \u4e0d\u80fd\u52a8\u7fa4\u4e3b\u548c\u5176\u4ed6\u7ba1\u7406\u5458<\/span><br \/>\n<span class=\"token keyword\">case<\/span> constant<span class=\"token punctuation\">.<\/span>GroupOrdinaryUsers<span class=\"token punctuation\">:<\/span><br \/>\n<span class=\"token keyword\">return<\/span> <span class=\"token boolean\">nil<\/span><span class=\"token punctuation\">,<\/span> errs<span class=\"token punctuation\">.<\/span>ErrNoPermission<span class=\"token punctuation\">.<\/span><span class=\"token function\">WrapMsg<\/span><span class=\"token punctuation\">(<\/span><span class=\"token string\">&#034;opUserID no permission&#034;<\/span><span class=\"token punctuation\">)<\/span><br \/>\n<span class=\"token punctuation\">}<\/span><\/p>\n<p>\u4e3a\u4ec0\u4e48\u4e0d\u8bbe\u8ba1\u6210\u53ef\u914d\u7f6e\u7684\u6743\u9650\u8868&#xff1f;<\/p>\n<p>\u56e0\u4e3a IM \u7684\u7fa4\u6743\u9650\u662f\u884c\u4e1a\u6807\u51c6\u5316\u7684\u2014\u2014\u51e0\u4e4e\u6240\u6709\u4ea7\u54c1\u90fd\u662f&#034;\u7fa4\u4e3b &gt; \u7ba1\u7406\u5458 &gt; \u6210\u5458&#034;&#xff0c;\u8fb9\u754c\u4e5f\u5927\u540c\u5c0f\u5f02\u3002\u505a\u6210\u914d\u7f6e\u4f1a\u5e26\u6765\u4e09\u4e2a\u6210\u672c&#xff1a;<\/p>\n<li>\u914d\u7f6e\u590d\u6742\u5ea6&#xff08;\u6bcf\u4e2a\u7fa4\u4e00\u5957\u6743\u9650\u77e9\u9635&#xff09;&#xff1b;<\/li>\n<li>\u524d\u7aef\u6e32\u67d3\u590d\u6742\u5ea6&#xff08;\u6309\u94ae\u663e\u4e0d\u663e\u793a\u53d6\u51b3\u4e8e\u6743\u9650\u77e9\u9635&#xff09;&#xff1b;<\/li>\n<li>\u4e00\u81f4\u6027\u98ce\u9669&#xff08;\u540c\u4e00\u4e2a\u64cd\u4f5c\u5728\u4e0d\u540c\u7fa4\u884c\u4e3a\u4e0d\u540c&#xff0c;\u7528\u6237\u4f1a\u56f0\u60d1&#xff09;\u3002<\/li>\n<p>\u4ee3\u4ef7\u662f\u7075\u6d3b\u6027\u5dee&#xff1a;\u60f3\u52a0&#034;\u53ea\u8bfb\u6210\u5458&#034;&#034;\u5ba1\u8ba1\u5458&#034;\u8fd9\u7c7b\u89d2\u8272&#xff0c;\u5f97\u6539\u4ee3\u7801\u3002<\/p>\n<p>&#x1f4cc; \u8fd9\u91cc\u6709\u4e2a\u5f88\u503c\u5f97\u8bb0\u4f4f\u7684\u5224\u65ad&#xff1a;\u4e0d\u662f\u6240\u6709\u4e1c\u897f\u90fd\u503c\u5f97\u505a\u6210\u53ef\u914d\u7f6e\u3002\u7a33\u5b9a\u7684\u9886\u57df\u6a21\u578b\u5e94\u8be5\u786c\u7f16\u7801&#xff0c;\u53d8\u5316\u9891\u7e41\u7684\u90e8\u5206\u624d\u914d\u7f6e\u5316\u3002 \u7fa4\u89d2\u8272\u5c5e\u4e8e\u524d\u8005&#xff08;\u5341\u5e74\u4e0d\u53d8&#xff09;&#xff0c;\u5165\u7fa4\u9a8c\u8bc1\u7b56\u7565\u5c5e\u4e8e\u540e\u8005&#xff08;\u6bcf\u4e2a\u7fa4\u90fd\u53ef\u80fd\u4e0d\u540c&#xff09;\u3002<\/p>\n<h4>\u6743\u9650\u77e9\u9635&#xff08;\u8bfb\u6e90\u7801\u65f6\u6700\u8be5\u505a\u7684\u4e8b&#xff09;<\/h4>\n<p>\u6211\u628a\u6563\u5728\u5341\u51e0\u4e2a if \u91cc\u7684\u5224\u65ad\u6c47\u603b\u6210\u4e00\u5f20\u8868&#xff1a;<\/p>\n<table>\n<tr>\u64cd\u4f5c\u7fa4\u4e3b\u7ba1\u7406\u5458\u666e\u901a\u6210\u5458\u7cfb\u7edf\u7ba1\u7406\u5458<\/tr>\n<tbody>\n<tr>\n<td>\u4fee\u6539\u7fa4\u4fe1\u606f<\/td>\n<td>\u2705<\/td>\n<td>\u2705<\/td>\n<td>\u274c<\/td>\n<td>\u2705<\/td>\n<\/tr>\n<tr>\n<td>\u4fee\u6539\u7fa4\u516c\u544a<\/td>\n<td>\u2705<\/td>\n<td>\u2705<\/td>\n<td>\u274c<\/td>\n<td>\u2705<\/td>\n<\/tr>\n<tr>\n<td>\u9080\u8bf7\u6210\u5458<\/td>\n<td>\u2705<\/td>\n<td>\u2705<\/td>\n<td>\u2705&#xff08;\u89c6\u9a8c\u8bc1\u7b56\u7565&#xff09;<\/td>\n<td>\u2705<\/td>\n<\/tr>\n<tr>\n<td>\u8e22\u4eba<\/td>\n<td>\u2705<\/td>\n<td>\u2705&#xff08;\u4e0d\u80fd\u8e22\u7fa4\u4e3b\/\u7ba1\u7406\u5458&#xff09;<\/td>\n<td>\u274c<\/td>\n<td>\u2705<\/td>\n<\/tr>\n<tr>\n<td>\u8bbe\u7f6e\u7ba1\u7406\u5458<\/td>\n<td>\u2705<\/td>\n<td>\u274c<\/td>\n<td>\u274c<\/td>\n<td>\u2705<\/td>\n<\/tr>\n<tr>\n<td>\u7981\u8a00\u6210\u5458<\/td>\n<td>\u2705<\/td>\n<td>\u2705&#xff08;\u4e0d\u80fd\u7981\u8a00\u7fa4\u4e3b\/\u7ba1\u7406\u5458&#xff09;<\/td>\n<td>\u274c<\/td>\n<td>\u2705<\/td>\n<\/tr>\n<tr>\n<td>\u7fa4\u7981\u8a00&#xff08;\u5168\u5458&#xff09;<\/td>\n<td>\u2705<\/td>\n<td>\u2705<\/td>\n<td>\u274c<\/td>\n<td>\u2705<\/td>\n<\/tr>\n<tr>\n<td>\u8f6c\u8ba9\u7fa4\u4e3b<\/td>\n<td>\u2705&#xff08;\u53ea\u80fd\u8f6c\u7ed9\u81ea\u5df1\u540d\u4e0b\u7684&#xff09;<\/td>\n<td>\u274c<\/td>\n<td>\u274c<\/td>\n<td>\u2705<\/td>\n<\/tr>\n<tr>\n<td>\u89e3\u6563\u7fa4<\/td>\n<td>\u2705<\/td>\n<td>\u274c<\/td>\n<td>\u274c<\/td>\n<td>\u2705<\/td>\n<\/tr>\n<tr>\n<td>\u9000\u7fa4<\/td>\n<td>\u274c<\/td>\n<td>\u2705<\/td>\n<td>\u2705<\/td>\n<td>\u2705<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>\u201c\u7fa4\u4e3b\u4e0d\u80fd\u9000\u7fa4\u201d \u662f\u8fd9\u5f20\u8868\u91cc\u552f\u4e00\u4e00\u4e2a\u53cd\u76f4\u89c9\u7684&#xff1a;<\/p>\n<p><span class=\"token keyword\">if<\/span> member<span class=\"token punctuation\">.<\/span>RoleLevel <span class=\"token operator\">&#061;&#061;<\/span> constant<span class=\"token punctuation\">.<\/span>GroupOwner <span class=\"token punctuation\">{<\/span><br \/>\n<span class=\"token keyword\">return<\/span> <span class=\"token boolean\">nil<\/span><span class=\"token punctuation\">,<\/span> errs<span class=\"token punctuation\">.<\/span>ErrNoPermission<span class=\"token punctuation\">.<\/span><span class=\"token function\">WrapMsg<\/span><span class=\"token punctuation\">(<\/span><span class=\"token string\">&#034;group owner can&#039;t quit&#034;<\/span><span class=\"token punctuation\">)<\/span><br \/>\n<span class=\"token punctuation\">}<\/span><\/p>\n<p>\u56e0\u4e3a\u7fa4\u4e3b\u4e00\u9000&#xff0c;\u7fa4\u5c31\u6ca1\u6709\u4e3b\u4e86\u2014\u2014\u6ca1\u4eba\u80fd\u8f6c\u8ba9\u3001\u6ca1\u4eba\u80fd\u89e3\u6563\u3001\u6ca1\u4eba\u80fd\u8bbe\u7ba1\u7406\u5458\u3002\u8fd9\u662f\u4e00\u4e2a\u4e1a\u52a1\u4e0d\u53d8\u91cf&#xff1a;\u8981\u4e48\u5148\u8f6c\u8ba9&#xff0c;\u8981\u4e48\u89e3\u6563\u3002<\/p>\n<p>&#x1f4cc; \u597d\u7684\u4ee3\u7801\u4f1a\u628a\u4e0d\u53d8\u91cf\u5199\u6210\u663e\u5f0f\u6821\u9a8c&#xff0c;\u800c\u4e0d\u662f&#034;\u9760\u6d41\u7a0b\u7ea6\u675f&#034;\u3002 \u5982\u679c\u8fd9\u91cc\u4e0d\u62e6&#xff0c;\u8fd0\u8425\u4fa7\u5c31\u4e00\u5b9a\u4f1a\u51fa\u73b0&#034;\u7fa4\u4e3b\u5df2\u79bb\u804c&#xff0c;\u7fa4\u65e0\u4eba\u7ba1\u7406&#034;\u7684\u810f\u6570\u636e\u3002<\/p>\n<h3>\u4e09\u3001\u7981\u8a00&#xff1a;\u4e3a\u4ec0\u4e48\u5fc5\u987b\u662f\u4e24\u5c42<\/h3>\n<p>&#034;\u7981\u8a00&#034;\u5728 IM \u91cc\u6709\u4e24\u4e2a\u5b8c\u5168\u4e0d\u540c\u7684\u7c92\u5ea6&#xff1a;<\/p>\n<table>\n<tr>\u7fa4\u7981\u8a00\u6210\u5458\u7981\u8a00<\/tr>\n<tbody>\n<tr>\n<td>\u8303\u56f4<\/td>\n<td>\u6574\u4e2a\u7fa4&#xff0c;\u6240\u6709\u4eba\u4e0d\u80fd\u53d1\u8a00<\/td>\n<td>\u67d0\u4e2a\u6210\u5458<\/td>\n<\/tr>\n<tr>\n<td>\u5b58\u5728\u54ea<\/td>\n<td>group.status &#061; GroupStatusMuted<\/td>\n<td>group_member.mute_end_time<\/td>\n<\/tr>\n<tr>\n<td>\u8c01\u80fd\u8bbe<\/td>\n<td>\u7fa4\u4e3b\/\u7ba1\u7406\u5458<\/td>\n<td>\u7fa4\u4e3b\/\u7ba1\u7406\u5458&#xff08;\u6709\u5c42\u7ea7\u9650\u5236&#xff09;<\/td>\n<\/tr>\n<tr>\n<td>\u89e3\u9664<\/td>\n<td>\u624b\u52a8 CancelMuteGroup<\/td>\n<td>\u5230\u671f\u81ea\u52a8\u89e3\u9664&#xff0c;\u6216\u624b\u52a8<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>\u4e3a\u4ec0\u4e48\u4e0d\u80fd\u5408\u6210\u4e00\u5c42&#xff1f; \u56e0\u4e3a\u5b83\u4eec\u7684\u8bed\u4e49\u5b8c\u5168\u4e0d\u540c&#xff1a;<\/p>\n<ul>\n<li>\u7fa4\u7981\u8a00\u662f\u7fa4\u7ea7\u72b6\u6001&#xff0c;\u4e00\u6b21\u8bbe\u7f6e\u5f71\u54cd\u6240\u6709\u4eba&#xff0c;\u6539\u4e00\u4e2a\u5b57\u6bb5\u5c31\u591f&#xff1b;<\/li>\n<li>\u6210\u5458\u7981\u8a00\u662f\u5173\u7cfb\u7ea7\u72b6\u6001&#xff0c;\u53ea\u5f71\u54cd\u4e00\u4e2a\u4eba&#xff0c;\u5b58\u5728\u6210\u5458\u8bb0\u5f55\u4e0a\u3002<\/li>\n<\/ul>\n<p>\u5982\u679c\u5408\u6210\u4e00\u5c42&#xff08;\u6bd4\u5982&#034;\u7ed9\u6bcf\u4e2a\u4eba\u90fd\u8bbe\u4e00\u4e2a\u7981\u8a00\u65f6\u95f4&#034;&#xff09;&#xff0c;\u7fa4\u7981\u8a00\u5c31\u8981\u5199 N \u6761\u8bb0\u5f55\u2014\u20145000 \u4eba\u7684\u7fa4&#xff0c;\u4e00\u6b21&#034;\u5168\u5458\u7981\u8a00&#034;\u5199 5000 \u6761&#xff0c;\u8fd8\u8981\u5728\u6709\u4eba\u5165\u7fa4\u65f6\u8865\u5199\u3002\u7528\u7fa4\u7ea7\u5b57\u6bb5\u8868\u8fbe\u7fa4\u7ea7\u8bed\u4e49&#xff0c;\u662f\u7701 5000 \u500d\u5199\u653e\u5927\u7684\u5173\u952e\u3002<\/p>\n<p>&#x1f4cc; \u8fd9\u4e2a\u601d\u8def\u5f88\u901a\u7528&#xff1a;\u5224\u65ad\u4e00\u4e2a\u72b6\u6001\u8be5\u5b58\u5728\u54ea\u4e00\u5c42&#xff0c;\u5c31\u95ee&#034;\u5b83\u63cf\u8ff0\u7684\u662f\u8c01&#034;\u3002 \u63cf\u8ff0\u7fa4\u7684\u5b58\u7fa4\u8868&#xff0c;\u63cf\u8ff0&#034;\u4eba\u548c\u7fa4\u5173\u7cfb&#034;\u7684\u5b58\u5173\u7cfb\u8868&#xff0c;\u63cf\u8ff0\u4eba\u7684\u5b58\u7528\u6237\u8868\u3002\u653e\u9519\u5c42\u7684\u4ee3\u4ef7\u901a\u5e38\u662f\u5199\u653e\u5927\u6216\u8005\u67e5\u8be2\u653e\u5927\u3002<\/p>\n<h3>\u56db\u3001\u5efa\u7fa4\u4e00\u6b21\u8981\u5199\u591a\u5c11\u4e1c\u897f<\/h3>\n<p>CreateGroup \u7684\u771f\u5b9e\u5f00\u9500&#xff0c;\u6309\u670d\u52a1\u62c6&#xff1a;<\/p>\n<table>\n<tr>\u6b65\u9aa4\u5199\u4ec0\u4e48\u91cf\u7ea7&#xff08;500 \u4eba\u7fa4&#xff09;<\/tr>\n<tbody>\n<tr>\n<td>1<\/td>\n<td>\u7fa4\u8bb0\u5f55<\/td>\n<td>1 \u6761<\/td>\n<\/tr>\n<tr>\n<td>2<\/td>\n<td>\u7fa4\u6210\u5458\u8bb0\u5f55<\/td>\n<td>500 \u6761&#xff08;\u6279\u91cf&#xff09;<\/td>\n<\/tr>\n<tr>\n<td>3<\/td>\n<td>\u4f1a\u8bdd\u8bb0\u5f55<\/td>\n<td>500 \u6761&#xff08;\u6bcf\u4eba\u4e00\u6761&#xff0c;\u8de8 conversation \u670d\u52a1&#xff09;<\/td>\n<\/tr>\n<tr>\n<td>4<\/td>\n<td>\u5efa\u7fa4\u901a\u77e5\u6d88\u606f<\/td>\n<td>1 \u6761&#xff08;\u8fdb\u6d88\u606f\u6d41\u6c34\u7ebf&#xff09;<\/td>\n<\/tr>\n<tr>\n<td>5<\/td>\n<td>\u63a8\u9001<\/td>\n<td>500 \u4e2a\u63a8\u9001\u4efb\u52a1<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>\u6ce8\u610f\u7b2c 3 \u6b65\u662f\u8de8\u670d\u52a1\u7684\u3002 \u7fa4\u670d\u52a1\u5efa\u5b8c\u7fa4&#xff0c;\u8981\u8c03 conversation \u670d\u52a1\u7ed9\u6bcf\u4e2a\u6210\u5458\u5efa\u4f1a\u8bdd\u2014\u2014\u5426\u5219\u7528\u6237\u6253\u5f00 App \u770b\u4e0d\u5230\u8fd9\u4e2a\u7fa4\u3002<\/p>\n<p>\u800c\u4e14\u8fd9 500 \u6761\u4f1a\u8bdd\u8bb0\u5f55&#xff0c;\u6bcf\u6761\u90fd\u8981\u5e26 minSeq\/maxSeq \u6c34\u4f4d&#xff08;\u7b2c 7 \u7bc7\u8bb2\u7684&#xff09;&#xff0c;\u521d\u59cb\u90fd\u662f 0\u3002\u8fd9\u4e2a\u8bbe\u8ba1\u5e26\u6765\u4e00\u4e2a\u540e\u679c&#xff1a;\u65b0\u5165\u7fa4\u7684\u4eba\u770b\u4e0d\u5230\u5165\u7fa4\u524d\u7684\u5386\u53f2\u6d88\u606f&#xff08;\u56e0\u4e3a\u4ed6\u7684\u6c34\u4f4d\u4ece 0 \u5f00\u59cb&#xff0c;\u4f46\u4f1a\u8bdd minSeq \u5df2\u7ecf\u5f88\u5927\u4e86&#xff0c;\u4e0b\u754c\u53d6 max \u5c31\u628a\u5b83\u6321\u4f4f\u4e86&#xff09;\u3002<\/p>\n<p>&#x1f4cc; \u8fd9\u5c31\u662f\u7b2c 7 \u7bc7&#034;\u7528\u6237\u7ea7\u6c34\u4f4d&#034;\u7684\u5b58\u5728\u610f\u4e49&#xff0c;\u800c\u8fd9\u91cc\u6b63\u662f\u5b83\u7684\u7b2c\u4e8c\u4e2a\u5e94\u7528\u573a\u666f&#xff08;\u7b2c\u4e00\u4e2a\u662f\u6e05\u7a7a\u804a\u5929\u8bb0\u5f55&#xff09;\u3002\u540c\u4e00\u4e2a\u673a\u5236&#xff0c;\u591a\u79cd\u7528\u9014\u2014\u2014\u8fd9\u662f\u62bd\u8c61\u505a\u5f97\u597d\u7684\u6807\u5fd7\u3002<\/p>\n<h3>\u4e94\u3001\u201c\u8fd9\u4e2a\u7fa4\u6709\u591a\u5c11\u4eba\u201d&#xff1a;\u4e09\u79cd\u7b97\u6cd5\u548c\u5404\u81ea\u7684\u5929\u82b1\u677f<\/h3>\n<p>\u770b\u7740\u662f\u6700\u7b80\u5355\u7684\u4e00\u4e2a\u9700\u6c42&#xff0c;\u5b9e\u9645\u6709\u4e09\u79cd\u505a\u6cd5&#xff0c;\u5404\u6709\u5404\u7684\u5751\u3002<\/p>\n<p>\u65b9\u6848\u4e00&#xff1a;\u5b9e\u65f6 count<\/p>\n<p>db<span class=\"token punctuation\">.<\/span>group_member<span class=\"token punctuation\">.<\/span><span class=\"token function\">countDocuments<\/span><span class=\"token punctuation\">(<\/span><span class=\"token punctuation\">{<\/span>group_id<span class=\"token punctuation\">:<\/span> <span class=\"token string\">&#034;123&#034;<\/span><span class=\"token punctuation\">}<\/span><span class=\"token punctuation\">)<\/span><\/p>\n<p>\u95ee\u9898\u662f\u5b83\u9ad8\u9891\u3002\u6bcf\u4e2a\u7fa4\u4f1a\u8bdd\u5217\u8868\u9879\u90fd\u8981\u663e\u793a\u4eba\u6570&#xff0c;\u7528\u6237\u6709 30 \u4e2a\u7fa4&#xff0c;\u6253\u5f00 App \u5c31\u662f 30 \u6b21 count&#xff0c;\u6bcf\u6b21\u626b\u51e0\u767e\u6761\u3002<\/p>\n<p>\u65b9\u6848\u4e8c&#xff1a;\u7fa4\u6587\u6863\u91cc\u5b58 member_count \u5b57\u6bb5&#xff0c;\u53d8\u66f4\u65f6 $inc<\/p>\n<p>update <span class=\"token operator\">:&#061;<\/span> bson<span class=\"token punctuation\">.<\/span>M<span class=\"token punctuation\">{<\/span><span class=\"token string\">&#034;$inc&#034;<\/span><span class=\"token punctuation\">:<\/span> bson<span class=\"token punctuation\">.<\/span>M<span class=\"token punctuation\">{<\/span><span class=\"token string\">&#034;member_count&#034;<\/span><span class=\"token punctuation\">:<\/span> <span class=\"token number\">1<\/span><span class=\"token punctuation\">}<\/span><span class=\"token punctuation\">}<\/span><\/p>\n<p>\u95ee\u9898\u662f\u5bb9\u6613\u7b97\u9519&#xff1a;<\/p>\n<ul>\n<li>\u6279\u91cf\u8e22 100 \u4eba&#xff0c;\u5faa\u73af 100 \u6b21 $inc -1&#xff0c;\u4e2d\u95f4\u5931\u8d25\u4e00\u6b21\u6570\u5c31\u9519\u4e86&#xff1b;<\/li>\n<li>\u4e24\u4e2a\u4eba\u540c\u65f6 $inc&#xff0c;\u867d\u7136 Mongo \u662f\u539f\u5b50\u7684&#xff0c;\u4f46\u4e1a\u52a1\u4e0a&#034;\u8e22 100 \u4eba&#034;\u8fd9\u4e2a\u64cd\u4f5c\u672c\u8eab\u53ef\u80fd\u90e8\u5206\u6210\u529f&#xff1b;<\/li>\n<li>\u4e00\u65e6\u9519\u4e86&#xff0c;\u6ca1\u6709\u4efb\u4f55\u673a\u5236\u80fd\u81ea\u52a8\u7ea0\u6b63\u2014\u2014\u5b83\u662f\u4e2a\u7eaf\u589e\u91cf&#xff0c;\u6ca1\u6709\u57fa\u7ebf\u3002<\/li>\n<\/ul>\n<p>\u65b9\u6848\u4e09&#xff1a;\u7f13\u5b58 &#043; Cache-Aside&#xff08;\u672c\u9879\u76ee\u7684\u505a\u6cd5&#xff09;<\/p>\n<p>\u8bfb&#xff1a;\u7f13\u5b58\u6709 \u2192 \u76f4\u63a5\u8fd4\u56de&#xff1b;\u6ca1\u6709 \u2192 \u805a\u5408 count \u2192 \u56de\u586b\u7f13\u5b58<br \/>\n\u5199&#xff1a;\u6210\u5458\u53d8\u66f4 \u2192 \u5220\u7f13\u5b58&#xff08;\u4e0b\u6b21\u8bfb\u65f6\u91cd\u65b0 count&#xff09;<\/p>\n<p>\u6838\u5fc3\u601d\u60f3&#xff1a;\u4e0d\u7ef4\u62a4\u7cbe\u786e\u8ba1\u6570&#xff0c;\u800c\u662f\u7f13\u5b58\u67e5\u8be2\u7ed3\u679c\u3002<\/p>\n<p>\u533a\u522b\u5f88\u5173\u952e&#xff1a;<\/p>\n<table>\n<tr>$inc \u8ba1\u6570Cache-Aside<\/tr>\n<tbody>\n<tr>\n<td>\u9519\u4e86\u4f1a\u600e\u6837<\/td>\n<td>\u6c38\u4e45\u9519&#xff08;\u6ca1\u6709\u57fa\u7ebf&#xff09;<\/td>\n<td>\u4e0b\u6b21\u8bfb\u5c31\u7ea0\u56de\u6765<\/td>\n<\/tr>\n<tr>\n<td>\u4ee3\u4ef7<\/td>\n<td>\u65e0<\/td>\n<td>\u53d8\u66f4\u540e\u7b2c\u4e00\u6b21\u8bfb\u4f1a\u6162&#xff08;\u56de\u6e90 count&#xff09;<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>&#x1f4cc; \u8fd9\u662f\u4e00\u4e2a\u975e\u5e38\u503c\u5f97\u8bb0\u4f4f\u7684\u53d6\u820d&#xff1a;\u51e1\u662f&#034;\u53ef\u4ee5\u88ab\u91cd\u65b0\u8ba1\u7b97\u51fa\u6765&#034;\u7684\u6570\u5b57&#xff0c;\u90fd\u4e0d\u8981\u7ef4\u62a4\u589e\u91cf&#xff0c;\u76f4\u63a5\u7f13\u5b58\u8ba1\u7b97\u7ed3\u679c\u3002 \u56e0\u4e3a\u589e\u91cf\u4e00\u5b9a\u4f1a\u9519&#xff0c;\u800c\u7ed3\u679c\u53ef\u4ee5\u88ab\u91cd\u7b97\u3002<\/p>\n<p>\u53cd\u8fc7\u6765&#xff0c;\u51e1\u662f&#034;\u7b97\u4e0d\u51fa\u6765&#034;\u7684&#xff08;\u6bd4\u5982&#034;\u8fd9\u4e2a\u7528\u6237\u7d2f\u8ba1\u53d1\u8fc7\u591a\u5c11\u6761\u6d88\u606f&#034;\u8fd9\u79cd\u8de8\u8868\u805a\u5408\u3001\u6210\u672c\u9ad8\u5230\u4e0d\u80fd\u5b9e\u65f6\u7b97\u7684&#xff09;&#xff0c;\u624d\u9700\u8981\u7ef4\u62a4\u589e\u91cf &#043; \u5b9a\u671f\u5bf9\u8d26\u3002<\/p>\n<h3>\u516d\u3001\u6210\u5458\u53d8\u66f4\u901a\u77e5&#xff1a;\u4e09\u5c42\u5f00\u5173\u548c\u6247\u51fa\u6210\u672c<\/h3>\n<p>&#034;A \u52a0\u5165\u4e86\u7fa4&#034;\u8fd9\u4ef6\u4e8b&#xff0c;\u8981\u8ba9\u5168\u7fa4\u6240\u6709\u4eba\u770b\u5230\u4e00\u6761\u7cfb\u7edf\u6d88\u606f\u2014\u2014\u4e00\u6b21 1 \u5bf9 N \u7684\u6247\u51fa\u3002<\/p>\n<p>\u6309\u7b2c 9 \u7bc7\u8bb2\u7684&#xff0c;\u6247\u51fa\u53d1\u751f\u5728\u63a8\u9001\u5c42&#xff0c;\u5b58\u50a8\u5c42\u53ea\u5199\u4e00\u4efd\u3002<\/p>\n<p>\u4f46\u8fd9\u91cc\u6709\u4e2a\u66f4\u9690\u853d\u7684\u6210\u672c&#xff1a;\u6bcf\u5929 20 \u4e2a\u4eba\u8fdb\u51fa\u7684 500 \u4eba\u7fa4&#xff0c;\u4e00\u5929\u5c31\u6709 20 \u6761\u7cfb\u7edf\u6d88\u606f&#xff0c;\u7528\u6237\u7ffb\u804a\u5929\u8bb0\u5f55\u5168\u662f&#034;xxx \u52a0\u5165\u4e86\u7fa4\u804a&#034;\u3002<\/p>\n<p>\u672c\u9879\u76ee\u7ed9\u4e86\u4e09\u5c42\u63a7\u5236&#xff1a;<\/p>\n<table>\n<tr>\u5c42\u5f00\u5173\u4f5c\u7528<\/tr>\n<tbody>\n<tr>\n<td>1<\/td>\n<td>\u8c03\u7528\u65b9\u4f20 sendMessage: false<\/td>\n<td>\u8fd9\u6b21\u4e0d\u53d1<\/td>\n<\/tr>\n<tr>\n<td>2<\/td>\n<td>config\/notification.yml \u7684 memberEnter.enable: false<\/td>\n<td>\u8fd9\u7c7b\u901a\u77e5\u5168\u5c40\u4e0d\u53d1<\/td>\n<\/tr>\n<tr>\n<td>3<\/td>\n<td>\u5ba2\u6237\u7aef\u6e32\u67d3\u6298\u53e0<\/td>\n<td>\u8fde\u7eed\u591a\u6761&#034;xx \u52a0\u5165&#034;\u5408\u5e76\u663e\u793a<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>&#x1f4cc; &#034;\u9ed8\u8ba4\u884c\u4e3a\u53ef\u5173\u95ed&#034;\u662f\u4e2a\u597d\u8bbe\u8ba1\u539f\u5219&#xff1a;\u57fa\u7840\u8bbe\u65bd\u4e0d\u8be5\u5f3a\u5236\u4e1a\u52a1\u63a5\u53d7\u67d0\u79cd\u7528\u6237\u4f53\u9a8c\u3002<\/p>\n<p>\u4f46\u6211\u8981\u6307\u51fa\u4e00\u4e2a\u5bb9\u6613\u88ab\u5ffd\u7565\u7684\u70b9&#xff1a;\u5373\u4f7f sendMessage: false&#xff0c;\u63a8\u9001\u4ecd\u7136\u4f1a\u53d1\u751f&#xff08;\u56e0\u4e3a\u901a\u77e5\u6d88\u606f\u548c\u63a8\u9001\u662f\u4e24\u6761\u94fe&#xff09;\u3002\u60f3\u5f7b\u5e95\u4e0d\u53d1&#xff0c;\u5f97\u540c\u65f6\u628a Options \u91cc\u7684 IsOfflinePush \/ IsUnreadCount \u5173\u6389\u2014\u2014\u8fd9\u662f\u7b2c 4 \u7bc7\u8bb2\u7684 11 \u4e2a\u5f00\u5173\u7684\u53c8\u4e00\u4e2a\u7528\u9014\u3002<\/p>\n<h3>\u4e03\u3001\u7fa4\u4e3b\u8f6c\u8ba9&#xff1a;\u4e00\u4e2a\u5fc5\u987b\u539f\u5b50\u5b8c\u6210\u7684\u4e24\u6b65<\/h3>\n<p>\u8f6c\u8ba9\u7fa4\u4e3b\u8981\u6539\u4e24\u6761\u6210\u5458\u8bb0\u5f55&#xff1a;<\/p>\n<ul>\n<li>\u65e7\u7fa4\u4e3b&#xff1a;role_level 1 \u2192 3&#xff08;\u6216 2&#xff09;<\/li>\n<li>\u65b0\u7fa4\u4e3b&#xff1a;role_level 3&#xff08;\u6216 2&#xff09;\u2192 1<\/li>\n<\/ul>\n<p>\u5982\u679c\u7b2c\u4e8c\u6b65\u5931\u8d25&#xff0c;\u5c31\u4f1a\u5f97\u5230\u4e00\u4e2a&#034;\u6ca1\u6709\u7fa4\u4e3b&#034;\u7684\u7fa4\u2014\u2014\u65e7\u7fa4\u4e3b\u5df2\u7ecf\u964d\u7ea7&#xff0c;\u65b0\u7fa4\u4e3b\u6ca1\u5347\u4e0a\u53bb\u3002\u800c\u8fd9\u4e2a\u7fa4\u7684\u6240\u6709\u7ba1\u7406\u64cd\u4f5c&#xff08;\u8bbe\u7ba1\u7406\u5458\u3001\u8e22\u4eba\u3001\u89e3\u6563&#xff09;\u90fd\u9700\u8981\u7fa4\u4e3b\u6743\u9650&#xff0c;\u7b49\u4e8e\u8fd9\u4e2a\u7fa4\u4ece\u6b64\u4e0d\u53ef\u7ba1\u7406\u3002<\/p>\n<p>\u6240\u4ee5\u5fc5\u987b\u5728\u4e8b\u52a1\u91cc\u505a&#xff1a;<\/p>\n<p><span class=\"token keyword\">if<\/span> err <span class=\"token operator\">:&#061;<\/span> g<span class=\"token punctuation\">.<\/span>db<span class=\"token punctuation\">.<\/span><span class=\"token function\">TransferGroupOwner<\/span><span class=\"token punctuation\">(<\/span>ctx<span class=\"token punctuation\">,<\/span> req<span class=\"token punctuation\">.<\/span>GroupID<span class=\"token punctuation\">,<\/span> req<span class=\"token punctuation\">.<\/span>OldOwnerUserID<span class=\"token punctuation\">,<\/span> req<span class=\"token punctuation\">.<\/span>NewOwnerUserID<span class=\"token punctuation\">,<\/span> newOwner<span class=\"token punctuation\">.<\/span>RoleLevel<span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span> err <span class=\"token operator\">!&#061;<\/span> <span class=\"token boolean\">nil<\/span> <span class=\"token punctuation\">{<\/span><\/p>\n<p>\u6ce8\u610f\u6700\u540e\u90a3\u4e2a\u53c2\u6570 newOwner.RoleLevel\u2014\u2014\u65b0\u7fa4\u4e3b\u539f\u6765\u7684\u89d2\u8272\u3002\u5b83\u7684\u7528\u9014\u662f\u51b3\u5b9a\u65e7\u7fa4\u4e3b\u964d\u7ea7\u6210\u4ec0\u4e48&#xff1a;<\/p>\n<table>\n<tr>\u65b0\u7fa4\u4e3b\u539f\u6765\u662f\u65e7\u7fa4\u4e3b\u964d\u7ea7\u6210\u7406\u7531<\/tr>\n<tbody>\n<tr>\n<td>\u7ba1\u7406\u5458<\/td>\n<td>\u7ba1\u7406\u5458<\/td>\n<td>\u4fdd\u6301\u7ba1\u7406\u5458\u6570\u91cf\u4e0d\u53d8<\/td>\n<\/tr>\n<tr>\n<td>\u666e\u901a\u6210\u5458<\/td>\n<td>\u666e\u901a\u6210\u5458<\/td>\n<td>\u4e0d\u51ed\u7a7a\u591a\u4e00\u4e2a\u7ba1\u7406\u5458<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>&#x1f4cc; \u8fd9\u662f\u4e00\u4e2a\u5f88\u7ec6\u817b\u7684\u8bbe\u8ba1&#xff1a;\u8f6c\u8ba9\u4e0d\u8be5\u6539\u53d8\u7fa4\u7684\u7ba1\u7406\u529b\u91cf\u5bf9\u6bd4\u3002 \u5927\u90e8\u5206\u7cfb\u7edf\u4f1a\u7b80\u5355\u5730\u628a\u65e7\u7fa4\u4e3b\u964d\u6210\u666e\u901a\u6210\u5458&#xff0c;\u7ed3\u679c&#034;\u8f6c\u8ba9\u4e00\u6b21\u5c11\u4e00\u4e2a\u7ba1\u7406\u5458&#034;\u2014\u2014\u8fd0\u8425\u4fa7\u4f1a\u53d1\u73b0\u7ba1\u7406\u5458\u8d8a\u8f6c\u8d8a\u5c11\u3002<\/p>\n<p>\u8fd9\u7c7b&#034;\u526f\u4f5c\u7528\u8981\u5b88\u6052&#034;\u7684\u601d\u8003\u65b9\u5f0f\u5f88\u6709\u4ef7\u503c&#xff1a;\u4efb\u4f55\u53d8\u66f4\u64cd\u4f5c&#xff0c;\u5148\u95ee\u4e00\u53e5&#034;\u5b83\u4f1a\u4e0d\u4f1a\u610f\u5916\u51cf\u5c11\u67d0\u4e2a\u4e1c\u897f&#034;&#xff08;\u7ba1\u7406\u5458\u6570\u3001\u672a\u8bfb\u6570\u3001\u5728\u7ebf\u4eba\u6570\u3001\u914d\u989d&#xff09;\u3002<\/p>\n<h3>\u516b\u3001\u89e3\u6563\u7fa4&#xff1a;\u4e24\u79cd\u6a21\u5f0f&#xff0c;\u548c\u90a3\u4e2a&#034;\u8981\u5220 8 \u7c7b\u7f13\u5b58&#034;\u7684\u6559\u8bad<\/h3>\n<p>DismissGroup(ctx, req.GroupID, req.DeleteMember)&#xff0c;deleteMember \u51b3\u5b9a\u4e24\u79cd\u6a21\u5f0f&#xff1a;<\/p>\n<table>\n<tr>\u6a21\u5f0f\u505a\u4ec0\u4e48\u9002\u7528<\/tr>\n<tbody>\n<tr>\n<td>false&#xff08;\u4ec5\u89e3\u6563&#xff09;<\/td>\n<td>\u7fa4\u72b6\u6001\u6539 Dismissed&#xff0c;\u6210\u5458\u8bb0\u5f55\u4fdd\u7559<\/td>\n<td>\u8f6f\u5220&#xff0c;\u53ef\u6062\u590d&#xff1b;\u6216\u7559\u6210\u5458\u5173\u7cfb\u505a\u5206\u6790<\/td>\n<\/tr>\n<tr>\n<td>true&#xff08;\u89e3\u6563\u5e76\u5220\u6210\u5458&#xff09;<\/td>\n<td>\u72b6\u6001\u6539 Dismissed &#043; \u5220\u6240\u6709\u6210\u5458\u8bb0\u5f55 &#043; \u7ed9\u6bcf\u4eba\u5199\u4e00\u6761\u7248\u672c\u65e5\u5fd7<\/td>\n<td>\u5f7b\u5e95\u5220&#xff0c;\u91ca\u653e\u7a7a\u95f4<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>\u6a21\u5f0f\u4e8c\u7684\u5b9e\u73b0&#xff08;controller\/group.go:273-310&#xff09;\u503c\u5f97\u9010\u884c\u770b&#xff0c;\u56e0\u4e3a\u5b83\u66b4\u9732\u4e86&#034;\u7fa4\u6a21\u5757\u5230\u5e95\u6709\u591a\u5c11\u7f13\u5b58&#034;&#xff1a;<\/p>\n<p><span class=\"token keyword\">func<\/span> <span class=\"token punctuation\">(<\/span>g <span class=\"token operator\">*<\/span>groupDatabase<span class=\"token punctuation\">)<\/span> <span class=\"token function\">DismissGroup<\/span><span class=\"token punctuation\">(<\/span>ctx context<span class=\"token punctuation\">.<\/span>Context<span class=\"token punctuation\">,<\/span> groupID <span class=\"token builtin\">string<\/span><span class=\"token punctuation\">,<\/span> deleteMember <span class=\"token builtin\">bool<\/span><span class=\"token punctuation\">)<\/span> <span class=\"token builtin\">error<\/span> <span class=\"token punctuation\">{<\/span><br \/>\n<span class=\"token keyword\">return<\/span> g<span class=\"token punctuation\">.<\/span>ctxTx<span class=\"token punctuation\">.<\/span><span class=\"token function\">Transaction<\/span><span class=\"token punctuation\">(<\/span>ctx<span class=\"token punctuation\">,<\/span> <span class=\"token keyword\">func<\/span><span class=\"token punctuation\">(<\/span>ctx context<span class=\"token punctuation\">.<\/span>Context<span class=\"token punctuation\">)<\/span> <span class=\"token builtin\">error<\/span> <span class=\"token punctuation\">{<\/span><br \/>\nc <span class=\"token operator\">:&#061;<\/span> g<span class=\"token punctuation\">.<\/span>cache<span class=\"token punctuation\">.<\/span><span class=\"token function\">CloneGroupCache<\/span><span class=\"token punctuation\">(<\/span><span class=\"token punctuation\">)<\/span><br \/>\n<span class=\"token keyword\">if<\/span> err <span class=\"token operator\">:&#061;<\/span> g<span class=\"token punctuation\">.<\/span>groupDB<span class=\"token punctuation\">.<\/span><span class=\"token function\">UpdateStatus<\/span><span class=\"token punctuation\">(<\/span>ctx<span class=\"token punctuation\">,<\/span> groupID<span class=\"token punctuation\">,<\/span> constant<span class=\"token punctuation\">.<\/span>GroupStatusDismissed<span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span> err <span class=\"token operator\">!&#061;<\/span> <span class=\"token boolean\">nil<\/span> <span class=\"token punctuation\">{<\/span> <span class=\"token keyword\">return<\/span> err <span class=\"token punctuation\">}<\/span><br \/>\n<span class=\"token keyword\">if<\/span> deleteMember <span class=\"token punctuation\">{<\/span><br \/>\nuserIDs<span class=\"token punctuation\">,<\/span> err <span class=\"token operator\">:&#061;<\/span> g<span class=\"token punctuation\">.<\/span>cache<span class=\"token punctuation\">.<\/span><span class=\"token function\">GetGroupMemberIDs<\/span><span class=\"token punctuation\">(<\/span>ctx<span class=\"token punctuation\">,<\/span> groupID<span class=\"token punctuation\">)<\/span><br \/>\n<span class=\"token keyword\">if<\/span> err <span class=\"token operator\">:&#061;<\/span> g<span class=\"token punctuation\">.<\/span>groupMemberDB<span class=\"token punctuation\">.<\/span><span class=\"token function\">Delete<\/span><span class=\"token punctuation\">(<\/span>ctx<span class=\"token punctuation\">,<\/span> groupID<span class=\"token punctuation\">,<\/span> <span class=\"token boolean\">nil<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">;<\/span> err <span class=\"token operator\">!&#061;<\/span> <span class=\"token boolean\">nil<\/span> <span class=\"token punctuation\">{<\/span> <span class=\"token keyword\">return<\/span> err <span class=\"token punctuation\">}<\/span>   <span class=\"token comment\">\/\/ nil &#061; \u5220\u5168\u90e8<\/span><br \/>\nc <span class=\"token operator\">&#061;<\/span> c<span class=\"token punctuation\">.<\/span><span class=\"token function\">DelJoinedGroupID<\/span><span class=\"token punctuation\">(<\/span>userIDs<span class=\"token operator\">&#8230;<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">.<\/span>      <span class=\"token comment\">\/\/ \u6bcf\u4e2a\u4eba\u7684&#034;\u6211\u52a0\u5165\u7684\u7fa4&#034;<\/span><br \/>\n<span class=\"token function\">DelGroupMemberIDs<\/span><span class=\"token punctuation\">(<\/span>groupID<span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">.<\/span>           <span class=\"token comment\">\/\/ \u7fa4\u7684\u6210\u5458 ID \u5217\u8868<\/span><br \/>\n<span class=\"token function\">DelGroupsMemberNum<\/span><span class=\"token punctuation\">(<\/span>groupID<span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">.<\/span>          <span class=\"token comment\">\/\/ \u7fa4\u6210\u5458\u6570<\/span><br \/>\n<span class=\"token function\">DelGroupMembersHash<\/span><span class=\"token punctuation\">(<\/span>groupID<span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">.<\/span>         <span class=\"token comment\">\/\/ \u6210\u5458\u5217\u8868 hash&#xff08;\u589e\u91cf\u540c\u6b65\u7528&#xff09;<\/span><br \/>\n<span class=\"token function\">DelGroupAllRoleLevel<\/span><span class=\"token punctuation\">(<\/span>groupID<span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">.<\/span>        <span class=\"token comment\">\/\/ \u5168\u90e8\u89d2\u8272\u6620\u5c04<\/span><br \/>\n<span class=\"token function\">DelGroupMembersInfo<\/span><span class=\"token punctuation\">(<\/span>groupID<span class=\"token punctuation\">,<\/span> userIDs<span class=\"token operator\">&#8230;<\/span><span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">.<\/span> <span class=\"token comment\">\/\/ \u6bcf\u4e2a\u6210\u5458\u8be6\u60c5<\/span><br \/>\n<span class=\"token function\">DelMaxGroupMemberVersion<\/span><span class=\"token punctuation\">(<\/span>groupID<span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">.<\/span>    <span class=\"token comment\">\/\/ \u7fa4\u6210\u5458\u7248\u672c\u53f7<\/span><br \/>\n<span class=\"token function\">DelMaxJoinGroupVersion<\/span><span class=\"token punctuation\">(<\/span>userIDs<span class=\"token operator\">&#8230;<\/span><span class=\"token punctuation\">)<\/span>    <span class=\"token comment\">\/\/ \u6bcf\u4e2a\u4eba\u7684&#034;\u52a0\u5165\u7fa4&#034;\u7248\u672c\u53f7<\/span><br \/>\n<span class=\"token keyword\">for<\/span> <span class=\"token boolean\">_<\/span><span class=\"token punctuation\">,<\/span> userID <span class=\"token operator\">:&#061;<\/span> <span class=\"token keyword\">range<\/span> userIDs <span class=\"token punctuation\">{<\/span><br \/>\ng<span class=\"token punctuation\">.<\/span>groupMemberDB<span class=\"token punctuation\">.<\/span><span class=\"token function\">JoinGroupIncrVersion<\/span><span class=\"token punctuation\">(<\/span>ctx<span class=\"token punctuation\">,<\/span> userID<span class=\"token punctuation\">,<\/span> <span class=\"token punctuation\">[<\/span><span class=\"token punctuation\">]<\/span><span class=\"token builtin\">string<\/span><span class=\"token punctuation\">{<\/span>groupID<span class=\"token punctuation\">}<\/span><span class=\"token punctuation\">,<\/span> model<span class=\"token punctuation\">.<\/span>VersionStateDelete<span class=\"token punctuation\">)<\/span><br \/>\n<span class=\"token punctuation\">}<\/span><br \/>\n<span class=\"token punctuation\">}<\/span><br \/>\n<span class=\"token keyword\">return<\/span> c<span class=\"token punctuation\">.<\/span><span class=\"token function\">DelGroupsInfo<\/span><span class=\"token punctuation\">(<\/span>groupID<span class=\"token punctuation\">)<\/span><span class=\"token punctuation\">.<\/span><span class=\"token function\">ChainExecDel<\/span><span class=\"token punctuation\">(<\/span>ctx<span class=\"token punctuation\">)<\/span><br \/>\n<span class=\"token punctuation\">}<\/span><span class=\"token punctuation\">)<\/span><br \/>\n<span class=\"token punctuation\">}<\/span><\/p>\n<p>\u8981\u5220 8 \u7c7b\u7f13\u5b58\u3002 \u8fd9\u5f20\u5217\u8868\u672c\u8eab\u5c31\u662f\u7406\u89e3\u7fa4\u6a21\u5757\u6700\u597d\u7684\u6750\u6599&#xff1a;<\/p>\n<table>\n<tr>\u7f13\u5b58key \u7ef4\u5ea6\u5185\u5bb9<\/tr>\n<tbody>\n<tr>\n<td>JoinedGroupID<\/td>\n<td>userID<\/td>\n<td>\u6211\u52a0\u5165\u4e86\u54ea\u4e9b\u7fa4<\/td>\n<\/tr>\n<tr>\n<td>GroupMemberIDs<\/td>\n<td>groupID<\/td>\n<td>\u7fa4\u6709\u54ea\u4e9b\u6210\u5458<\/td>\n<\/tr>\n<tr>\n<td>GroupsMemberNum<\/td>\n<td>groupID<\/td>\n<td>\u7fa4\u6709\u591a\u5c11\u4eba<\/td>\n<\/tr>\n<tr>\n<td>GroupMembersHash<\/td>\n<td>groupID<\/td>\n<td>\u6210\u5458\u5217\u8868 hash&#xff08;\u589e\u91cf\u540c\u6b65&#xff09;<\/td>\n<\/tr>\n<tr>\n<td>GroupAllRoleLevel<\/td>\n<td>groupID<\/td>\n<td>\u5168\u90e8\u89d2\u8272<\/td>\n<\/tr>\n<tr>\n<td>GroupMembersInfo<\/td>\n<td>groupID &#043; userID<\/td>\n<td>\u6210\u5458\u8be6\u60c5<\/td>\n<\/tr>\n<tr>\n<td>MaxGroupMemberVersion<\/td>\n<td>groupID<\/td>\n<td>\u7fa4\u6210\u5458\u7248\u672c<\/td>\n<\/tr>\n<tr>\n<td>MaxJoinGroupVersion<\/td>\n<td>userID<\/td>\n<td>\u6211\u7684\u52a0\u5165\u7fa4\u7248\u672c<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>\u4e3a\u4ec0\u4e48\u8981\u8fd9\u4e48\u591a\u7ef4\u5ea6&#xff1f; \u56e0\u4e3a\u67e5\u8be2\u6a21\u5f0f\u591a&#xff1a;\u6309\u7528\u6237\u67e5\u3001\u6309\u7fa4\u67e5\u3001\u6309\u7fa4&#043;\u7528\u6237\u67e5\u3001\u6309\u7fa4\u67e5\u6570\u91cf\u3002\u6bcf\u4e2a\u67e5\u8be2\u6a21\u5f0f\u4e00\u4e2a key \u7ef4\u5ea6&#xff0c;\u8fd9\u662f\u591a\u7ef4\u5ea6\u7f13\u5b58\u7684\u5fc5\u7136\u7ed3\u679c&#xff0c;\u4ee3\u4ef7\u5c31\u662f\u5931\u6548\u8981\u5220\u4e00\u5927\u5806\u3002<\/p>\n<p>\u26a0\ufe0f \u8fd9\u91cc\u6709\u4e2a\u771f\u5b9e\u7684\u6613\u9519\u70b9&#xff1a;\u6f0f\u5220\u4efb\u4f55\u4e00\u4e2a&#xff0c;\u5c31\u4f1a\u51fa\u73b0&#034;\u7fa4\u89e3\u6563\u4e86\u4f46\u6211\u5217\u8868\u91cc\u8fd8\u6709&#034;\u6216\u8005&#034;\u6210\u5458\u6570\u663e\u793a 500 \u5b9e\u9645 0 \u4eba&#034;\u3002ChainExecDel \u7528 pipeline \u628a\u5220\u9664\u6512\u5230\u6700\u540e\u4e00\u6b21\u6267\u884c&#xff08;\u51cf\u5c11\u5f80\u8fd4&#xff09;&#xff0c;\u4f46\u4e0d\u4fdd\u8bc1\u539f\u5b50\u6027\u2014\u2014\u6267\u884c\u5230\u4e00\u534a\u5931\u8d25&#xff0c;\u7f13\u5b58\u5c31\u5904\u4e8e&#034;\u90e8\u5206\u5931\u6548&#034;\u7684\u4e2d\u95f4\u6001\u3002<\/p>\n<p>&#x1f4cc; \u591a\u7ef4\u5ea6\u7f13\u5b58\u7684\u901a\u7528\u89e3\u6cd5&#xff1a;\u7ed9\u7f13\u5b58\u52a0&#034;\u7248\u672c\u53f7&#034;\u6216&#034;\u547d\u540d\u7a7a\u95f4\u4ee3\u9645&#034;&#xff08;\u6bd4\u5982 key \u524d\u7f00\u5e26 gen&#xff0c;\u5931\u6548\u65f6\u628a gen &#043;1&#xff09;&#xff0c;\u8fd9\u6837\u4e00\u6b21\u5931\u6548\u5c31\u662f O(1)&#xff0c;\u4e0d\u7528\u9010\u4e2a\u5220\u3002\u4ee3\u4ef7\u662f\u65e7\u4ee3\u7684 key \u8981\u9760 TTL \u81ea\u7136\u6dd8\u6c70\u3002\u7f13\u5b58\u7ef4\u5ea6\u8d85\u8fc7 3 \u4e2a&#xff0c;\u5c31\u8be5\u8003\u8651\u8fd9\u4e2a\u65b9\u6848\u4e86\u3002<\/p>\n<h4>\u4e24\u4e2a\u6a21\u5f0f\u5199\u7684\u7248\u672c\u65e5\u5fd7\u4e0d\u4e00\u6837&#xff0c;\u4e3a\u4ec0\u4e48<\/h4>\n<p>\u6a21\u5f0f\u4e8c\u7ed9\u6bcf\u4e2a\u6210\u5458\u5199 VersionStateDelete&#xff08;\u201c\u4f60\u9000\u51fa\u4e86\u8fd9\u4e2a\u7fa4\u201d&#xff09;\u3002<\/p>\n<p>\u6a21\u5f0f\u4e00\u5199\u7684\u662f&#xff1a;<\/p>\n<p>g<span class=\"token punctuation\">.<\/span>groupMemberDB<span class=\"token punctuation\">.<\/span><span class=\"token function\">MemberGroupIncrVersion<\/span><span class=\"token punctuation\">(<\/span>ctx<span class=\"token punctuation\">,<\/span> groupID<span class=\"token punctuation\">,<\/span> <span class=\"token punctuation\">[<\/span><span class=\"token punctuation\">]<\/span><span class=\"token builtin\">string<\/span><span class=\"token punctuation\">{<\/span><span class=\"token string\">&#034;&#034;<\/span><span class=\"token punctuation\">}<\/span><span class=\"token punctuation\">,<\/span> model<span class=\"token punctuation\">.<\/span>VersionStateUpdate<span class=\"token punctuation\">)<\/span><\/p>\n<p>\u6ce8\u610f []string{&#034;&#034;}\u2014\u2014\u4e00\u4e2a\u7a7a\u5b57\u7b26\u4e32\u3002<\/p>\n<p>\u8fd9\u662f\u54e8\u5175\u503c&#xff0c;\u8868\u8fbe&#034;\u7fa4\u672c\u8eab\u53d8\u4e86&#xff08;\u72b6\u6001\u6539\u4e3a\u89e3\u6563&#xff09;&#xff0c;\u4f46\u6ca1\u6709\u5177\u4f53\u54ea\u4e2a\u6210\u5458\u53d8\u4e86&#034;\u3002\u5ba2\u6237\u7aef\u6536\u5230\u8fd9\u4e2a\u53d8\u66f4\u540e\u91cd\u65b0\u62c9\u7fa4\u4fe1\u606f&#xff0c;\u53d1\u73b0 status &#061; dismissed\u3002<\/p>\n<p>&#x1f4cc; \u7528\u7279\u6b8a ID \u8868\u8fbe&#034;\u975e\u6210\u5458\u7ef4\u5ea6\u7684\u53d8\u66f4&#034;&#xff0c;\u662f\u4e2a\u5f88\u5b9e\u7528\u7684\u6280\u5de7&#xff08;\u597d\u53cb\u5173\u7cfb\u94fe\u91cc\u4e5f\u6709\u7c7b\u4f3c\u505a\u6cd5&#xff09;\u3002\u5b83\u7684\u524d\u63d0\u662f ID \u7a7a\u95f4\u91cc\u4fdd\u7559\u4e86\u4e00\u4e2a\u4e0d\u53ef\u80fd\u51fa\u73b0\u7684\u503c\u2014\u2014\u6240\u4ee5 userID \u7684\u5b57\u7b26\u6821\u9a8c&#xff08;\u7b2c 11 \u7bc7\u8bb2\u7684&#034;\u4e0d\u80fd\u542b\u5192\u53f7&#034;&#xff09;\u5728\u8fd9\u91cc\u540c\u6837\u91cd\u8981&#xff1a;\u5982\u679c\u5141\u8bb8\u7a7a\u5b57\u7b26\u4e32\u5f53 userID&#xff0c;\u8fd9\u4e2a\u54e8\u5175\u5c31\u4f1a\u88ab\u8bef\u89e3\u3002<\/p>\n<h3>\u4e5d\u3001\u7fa4 ID \u751f\u6210&#xff1a;\u4e3a\u4ec0\u4e48\u5141\u8bb8\u8c03\u7528\u65b9\u6307\u5b9a<\/h3>\n<p>group.go:165-192&#xff1a;<\/p>\n<p><span class=\"token keyword\">func<\/span> <span class=\"token punctuation\">(<\/span>g <span class=\"token operator\">*<\/span>groupServer<span class=\"token punctuation\">)<\/span> <span class=\"token function\">GenGroupID<\/span><span class=\"token punctuation\">(<\/span>ctx context<span class=\"token punctuation\">.<\/span>Context<span class=\"token punctuation\">,<\/span> groupID <span class=\"token operator\">*<\/span><span class=\"token builtin\">string<\/span><span class=\"token punctuation\">)<\/span> <span class=\"token builtin\">error<\/span> <span class=\"token punctuation\">{<\/span><br \/>\n<span class=\"token keyword\">if<\/span> <span class=\"token operator\">*<\/span>groupID <span class=\"token operator\">!&#061;<\/span> <span class=\"token string\">&#034;&#034;<\/span> <span class=\"token punctuation\">{<\/span><br \/>\n<span class=\"token comment\">\/\/ \u8c03\u7528\u65b9\u6307\u5b9a\u4e86 ID&#xff1a;\u68c0\u67e5\u662f\u5426\u5df2\u5b58\u5728<\/span><br \/>\n<span class=\"token boolean\">_<\/span><span class=\"token punctuation\">,<\/span> err <span class=\"token operator\">:&#061;<\/span> g<span class=\"token punctuation\">.<\/span>db<span class=\"token punctuation\">.<\/span><span class=\"token function\">TakeGroup<\/span><span class=\"token punctuation\">(<\/span>ctx<span class=\"token punctuation\">,<\/span> <span class=\"token operator\">*<\/span>groupID<span class=\"token punctuation\">)<\/span><br \/>\n<span class=\"token keyword\">if<\/span> err <span class=\"token operator\">&#061;&#061;<\/span> <span class=\"token boolean\">nil<\/span> <span class=\"token punctuation\">{<\/span><br \/>\n<span class=\"token keyword\">return<\/span> servererrs<span class=\"token punctuation\">.<\/span>ErrGroupIDExisted<span class=\"token punctuation\">.<\/span><span class=\"token function\">WrapMsg<\/span><span class=\"token punctuation\">(<\/span><span class=\"token string\">&#034;group id existed &#034;<\/span> <span class=\"token operator\">&#043;<\/span> <span class=\"token operator\">*<\/span>groupID<span class=\"token punctuation\">)<\/span><br \/>\n<span class=\"token punctuation\">}<\/span><br \/>\n<span class=\"token operator\">&#8230;<\/span><\/p>\n<p>\u4e24\u79cd\u6a21\u5f0f&#xff1a;<\/p>\n<table>\n<tr>\u6a21\u5f0f\u8c01\u751f\u6210\u9002\u7528<\/tr>\n<tbody>\n<tr>\n<td>\u670d\u52a1\u7aef\u751f\u6210<\/td>\n<td>IM \u5206\u914d&#xff08;\u96ea\u82b1 ID \u6216\u7c7b\u4f3c&#xff09;<\/td>\n<td>\u5ba2\u6237\u7aef\u76f4\u63a5\u5efa\u7fa4<\/td>\n<\/tr>\n<tr>\n<td>\u8c03\u7528\u65b9\u6307\u5b9a<\/td>\n<td>\u4e1a\u52a1\u540e\u7aef\u7ed9 ID<\/td>\n<td>\u4e1a\u52a1\u7cfb\u7edf\u8981&#034;\u7fa4 ID \u548c\u4e1a\u52a1\u4e3b\u952e\u4e00\u81f4&#034;<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>\u7b2c\u4e8c\u79cd\u548c\u7b2c 11 \u7bc7&#034;userID \u5fc5\u987b\u4e0e\u4e1a\u52a1\u4e3b\u952e\u4e00\u81f4&#034;\u662f\u540c\u4e00\u4e2a\u9053\u7406&#xff1a;\u5982\u679c\u7fa4\u91cc\u5bf9\u5e94\u4e00\u4e2a\u4e1a\u52a1\u5bf9\u8c61&#xff08;\u6bd4\u5982\u4e00\u4e2a\u9879\u76ee\u3001\u4e00\u4e2a\u8ba2\u5355\u3001\u4e00\u4e2a\u73ed\u7ea7&#xff09;&#xff0c;\u7fa4 ID \u5c31\u5e94\u8be5\u7b49\u4e8e\u90a3\u4e2a\u5bf9\u8c61\u7684 ID\u3002<\/p>\n<p>\u201c\u6307\u5b9a ID&#034;\u8fd9\u6761\u8def\u5f84\u5fc5\u987b\u505a\u552f\u4e00\u6027\u68c0\u67e5&#xff0c;\u800c\u4e14\u8981\u7528\u552f\u4e00\u7d22\u5f15\u515c\u5e95\u2014\u2014\u53ea\u9760&#034;\u5148\u67e5\u518d\u63d2&#034;\u5728\u5e76\u53d1\u4e0b\u4e00\u5b9a\u4f1a\u6709\u91cd\u590d&#xff08;\u4e24\u4e2a\u8bf7\u6c42\u540c\u65f6\u67e5\u5230&#034;\u4e0d\u5b58\u5728\u201d&#xff0c;\u7136\u540e\u90fd\u63d2\u6210\u529f&#xff09;\u3002<\/p>\n<p>&#x1f4cc; &#034;\u5148\u67e5\u518d\u5199&#034;\u6c38\u8fdc\u4e0d\u662f\u5e76\u53d1\u5b89\u5168\u7684\u3002 \u5224\u65ad\u552f\u4e00\u6027\u53ea\u6709\u4e00\u79cd\u53ef\u9760\u65b9\u5f0f&#xff1a;\u6570\u636e\u5e93\u552f\u4e00\u7d22\u5f15 &#043; \u5904\u7406\u51b2\u7a81\u9519\u8bef\u3002\u8fd9\u6761\u5728\u5206\u5e03\u5f0f\u7cfb\u7edf\u91cc\u662f\u94c1\u5f8b&#xff0c;\u4e0d\u7ba1\u67e5\u7684\u662f Mongo\u3001MySQL \u8fd8\u662f Redis\u3002<\/p>\n<h3>\u5341\u3001PopulateGroupMember&#xff1a;N&#043;1 \u67e5\u8be2\u7684\u6807\u51c6\u89e3\u6cd5<\/h3>\n<p>\u62c9\u7fa4\u6210\u5458\u5217\u8868\u65f6\u6709\u4e2a\u7ed5\u4e0d\u5f00\u7684\u95ee\u9898&#xff1a;\u6210\u5458\u8868\u91cc\u53ea\u6709 user_id \u548c\u5197\u4f59\u7684 nickname&#xff0c;\u4f46\u8981\u5c55\u793a\u5934\u50cf\u3001\u771f\u5b9e\u6635\u79f0\u3001\u5728\u7ebf\u72b6\u6001\u2014\u2014\u8fd9\u4e9b\u5728\u7528\u6237\u8868\u91cc\u3002<\/p>\n<p>\u6700\u7b28\u7684\u5199\u6cd5&#xff1a;<\/p>\n<p><span class=\"token keyword\">for<\/span> <span class=\"token boolean\">_<\/span><span class=\"token punctuation\">,<\/span> m <span class=\"token operator\">:&#061;<\/span> <span class=\"token keyword\">range<\/span> members <span class=\"token punctuation\">{<\/span><br \/>\nuser <span class=\"token operator\">:&#061;<\/span> <span class=\"token function\">getUser<\/span><span class=\"token punctuation\">(<\/span>m<span class=\"token punctuation\">.<\/span>UserID<span class=\"token punctuation\">)<\/span>     <span class=\"token comment\">\/\/ 500 \u6b21 RPC<\/span><br \/>\n<span class=\"token punctuation\">}<\/span><\/p>\n<p>500 \u4eba\u7684\u7fa4 &#061; 501 \u6b21\u67e5\u8be2&#xff0c;P99 \u76f4\u63a5\u7206\u70b8\u3002<\/p>\n<p>PopulateGroupMember \u7684\u505a\u6cd5\u662f&#xff1a;<\/p>\n<li>\u6536\u96c6\u8fd9\u4e00\u6279\u6210\u5458\u91cc\u7f3a\u5931\u4fe1\u606f\u7684 userID&#xff08;nickname \u6216 face_url \u4e3a\u7a7a\u7684&#xff09;&#xff1b;<\/li>\n<li>\u4e00\u6b21 GetUsersInfo(userIDs) \u6279\u91cf\u62c9&#xff1b;<\/li>\n<li>\u56de\u586b\u5230\u7ed3\u679c\u91cc&#xff0c;\u540c\u65f6\u5f02\u6b65\u5199\u56de\u6210\u5458\u8868&#xff08;\u4e0b\u6b21\u5c31\u4e0d\u7528\u518d\u62c9\u4e86&#xff09;\u3002<\/li>\n<p>\u6ce8\u610f\u7b2c 3 \u6b65&#xff1a;\u5b83\u4e0d\u53ea\u662f&#034;\u8865\u8fd9\u6b21\u7684\u7ed3\u679c&#034;&#xff0c;\u8fd8\u987a\u624b\u4fee\u6570\u636e\u3002\u8fd9\u662f**\u8bfb\u65f6\u4fee\u590d&#xff08;read repair&#xff09;**\u7684\u601d\u8def\u2014\u2014\u8bfb\u5230\u810f\u6570\u636e\/\u7f3a\u6570\u636e\u65f6\u987a\u624b\u4fee&#xff0c;\u6bd4\u8dd1\u6279\u5904\u7406\u4efb\u52a1\u7b80\u5355\u5f97\u591a\u3002<\/p>\n<p>&#x1f4cc; \u8bfb\u65f6\u4fee\u590d\u7684\u9002\u7528\u6761\u4ef6&#xff1a;\u4fee\u590d\u6210\u672c\u4f4e&#xff08;\u4e00\u6b21\u6279\u91cf\u5199&#xff09;\u3001\u6f0f\u4fee\u4e0d\u81f4\u547d&#xff08;\u4e0b\u6b21\u8bfb\u5230\u8fd8\u4f1a\u518d\u4fee&#xff09;\u3001\u4fee\u7684\u6570\u636e\u91cf\u5c0f&#xff08;\u53ea\u6709\u7f3a\u5931\u7684\u90a3\u90e8\u5206&#xff09;\u3002\u4e09\u4e2a\u6761\u4ef6\u90fd\u6ee1\u8db3\u65f6&#xff0c;\u8bfb\u65f6\u4fee\u590d\u6bd4\u5b9a\u65f6\u4efb\u52a1\u597d\u5f97\u591a\u2014\u2014\u5b83\u4e0d\u9700\u8981\u8c03\u5ea6\u3001\u4e0d\u4f1a\u6f0f\u3001\u6ca1\u6709\u989d\u5916\u7684\u626b\u63cf\u6210\u672c\u3002<\/p>\n<h3>\u5341\u4e00\u3001\u8e29\u5751\u8bb0\u5f55&#xff1a;\u4e09\u4e2a\u5751&#xff0c;\u4e00\u5171 11 \u5c0f\u65f6<\/h3>\n<p>\u5751\u4e00&#xff1a;\u89e3\u6563\u7fa4\u540e&#xff0c;\u6210\u5458\u5217\u8868\u8fd8\u5728&#xff08;3 \u5c0f\u65f6&#xff09;<\/p>\n<p>\u73b0\u8c61&#xff1a;\u8c03 dismiss_group \u4e4b\u540e&#xff0c;get_group_members \u8fd8\u80fd\u67e5\u5230 20 \u4e2a\u4eba\u3002<\/p>\n<p>\u5b9a\u4f4d&#xff1a;\u8c03\u7528\u65f6 deleteMember \u4f20\u4e86 false&#xff08;\u9ed8\u8ba4\u503c&#xff09;\u3002\u7b2c\u516b\u8282\u8bb2\u7684\u4e24\u79cd\u6a21\u5f0f\u2014\u2014false \u53ea\u6539\u7fa4\u72b6\u6001&#xff0c;\u6210\u5458\u8bb0\u5f55\u662f\u6545\u610f\u4fdd\u7559\u7684\u3002<\/p>\n<p>\u6539\u6cd5&#xff1a;\u524d\u7aef\/\u8c03\u7528\u65b9\u8981\u663e\u5f0f\u4f20 true\u3002<\/p>\n<p>\u6559\u8bad&#xff1a;&#034;\u5220\u9664&#034;\u7c7b\u63a5\u53e3\u7684\u5e03\u5c14\u53c2\u6570&#xff0c;\u4e00\u5b9a\u8981\u5728 API \u6587\u6863\u91cc\u5199\u6e05\u9ed8\u8ba4\u503c\u548c\u540e\u679c\u3002 \u8fd9\u4e2a\u5751\u4e0d\u662f\u4ee3\u7801 bug&#xff0c;\u662f\u63a5\u53e3\u8bbe\u8ba1\u8ba9\u4eba\u8bef\u5224\u2014\u2014deleteMember \u8fd9\u4e2a\u540d\u5b57\u542c\u8d77\u6765\u50cf&#034;\u8981\u4e0d\u8981\u5220\u7fa4&#034;&#xff0c;\u5b9e\u9645\u662f&#034;\u8981\u4e0d\u8981\u5220\u6210\u5458\u8bb0\u5f55&#034;\u3002<\/p>\n<p>\u5751\u4e8c&#xff1a;\u7fa4\u8f6c\u8ba9\u540e\u7ba1\u7406\u5458\u53d8\u5c11\u4e86&#xff08;4 \u5c0f\u65f6&#xff09;<\/p>\n<p>\u73b0\u8c61&#xff1a;\u628a\u7fa4\u4e3b\u8f6c\u7ed9\u4e00\u4e2a\u7ba1\u7406\u5458&#xff0c;\u8f6c\u8ba9\u540e\u7fa4\u91cc\u6709 0 \u4e2a\u7ba1\u7406\u5458&#xff08;\u539f\u6765 2 \u4e2a&#xff09;\u3002<\/p>\n<p>\u5b9a\u4f4d&#xff1a;\u65e9\u671f\u7248\u672c\u8f6c\u8ba9\u65f6&#xff0c;\u65e7\u7fa4\u4e3b\u4e00\u5f8b\u964d\u6210\u666e\u901a\u6210\u5458&#xff08;3&#xff09;&#xff0c;\u65b0\u7fa4\u4e3b\u5347\u6210\u7fa4\u4e3b&#xff08;1&#xff09;\u3002\u4e8e\u662f&#xff1a;<\/p>\n<ul>\n<li>\u65e7\u7fa4\u4e3b&#xff1a;1 \u2192 3&#xff08;\u5c11\u4e86\u4e00\u4e2a&#034;\u9ad8\u5c42&#034;&#xff09;<\/li>\n<li>\u65b0\u7fa4\u4e3b&#xff1a;2 \u2192 1&#xff08;\u53c8\u5c11\u4e86\u4e00\u4e2a\u7ba1\u7406\u5458&#xff09;<\/li>\n<\/ul>\n<p>\u4e24\u4e2a\u7ba1\u7406\u5458\u4f4d\u540c\u65f6\u88ab\u6d88\u8017\u6389\u3002<\/p>\n<p>\u6539\u6cd5&#xff1a;\u5c31\u662f\u7b2c\u4e03\u8282\u90a3\u4e2a newOwner.RoleLevel \u53c2\u6570\u2014\u2014\u6309\u65b0\u7fa4\u4e3b\u539f\u6765\u7684\u89d2\u8272\u51b3\u5b9a\u65e7\u7fa4\u4e3b\u964d\u6210\u4ec0\u4e48\u3002<\/p>\n<p>\u6559\u8bad&#xff1a;\u4efb\u4f55&#034;\u89d2\u8272\u53d8\u66f4&#034;\u90fd\u8981\u7b97\u4e00\u904d&#034;\u53d8\u66f4\u524d\u540e\u7684\u89d2\u8272\u5206\u5e03&#034;&#xff0c;\u522b\u53ea\u770b\u4e24\u4e2a\u4eba\u3002<\/p>\n<p>\u5751\u4e09&#xff1a;\u6210\u5458\u6570\u663e\u793a 501&#xff0c;\u5b9e\u9645 500 \u4eba&#xff08;4 \u5c0f\u65f6&#xff09;<\/p>\n<p>\u73b0\u8c61&#xff1a;\u7fa4\u91cc\u663e\u793a 501 \u4eba&#xff0c;\u5b9e\u9645\u6210\u5458\u5217\u8868 500 \u6761\u3002<\/p>\n<p>\u5b9a\u4f4d&#xff1a;\u65e9\u671f\u7528 $inc \u7ef4\u62a4 member_count&#xff0c;\u6709\u4e00\u6b21&#034;\u9080\u8bf7 50 \u4eba&#034;\u6279\u91cf\u64cd\u4f5c\u90e8\u5206\u5931\u8d25&#xff0c;$inc \u52a0\u4e86 50 \u4f46\u5b9e\u9645\u53ea\u6210\u529f 49 \u4e2a&#xff0c;\u4ece\u6b64\u6c38\u4e45\u9519 1\u3002<\/p>\n<p>\u6539\u6cd5&#xff1a;\u6539\u6210\u7b2c\u4e94\u8282\u65b9\u6848\u4e09\u2014\u2014\u4e0d\u7ef4\u62a4\u8ba1\u6570&#xff0c;\u7f13\u5b58 count \u7ed3\u679c&#xff0c;\u6210\u5458\u53d8\u66f4\u5c31\u5220\u7f13\u5b58\u3002<\/p>\n<p>\u6559\u8bad&#xff1a;\u589e\u91cf\u8ba1\u6570\u4e00\u65e6\u9519\u4e86\u5c31\u6ca1\u6709\u57fa\u7ebf\u3002 \u80fd\u7b97\u51fa\u6765\u7684\u6570\u5c31\u522b\u7ef4\u62a4\u589e\u91cf\u3002<\/p>\n<h3>\u5341\u4e8c\u3001\u9762\u8bd5\u4f1a\u600e\u4e48\u95ee<\/h3>\n<table>\n<tr>\u8ffd\u95ee\u600e\u4e48\u7b54&#xff08;\u4e00\u53e5\u8bdd\u7248&#xff09;<\/tr>\n<tbody>\n<tr>\n<td>\u7fa4\u6210\u5458\u5173\u7cfb\u600e\u4e48\u5b58&#xff1f;<\/td>\n<td>\u72ec\u7acb\u4e2d\u95f4\u8868 &#043; \u4e09\u4e2a\u7d22\u5f15&#xff08;\u7fa4&#043;\u7528\u6237\u552f\u4e00\u3001\u7fa4\u3001\u7528\u6237&#xff09;&#xff0c;\u4e0d\u80fd\u585e\u8fdb\u7fa4\u6587\u6863\u6570\u7ec4<\/td>\n<\/tr>\n<tr>\n<td>\u4e3a\u4ec0\u4e48\u4e0d\u585e\u6570\u7ec4&#xff1f;<\/td>\n<td>16MB \u4e0a\u9650 &#043; \u53cd\u5411\u67e5\u8be2\u8981\u5168\u8868\u626b &#043; \u5e76\u53d1\u6539\u4e0d\u540c\u6210\u5458\u4f1a\u4e92\u76f8\u8986\u76d6<\/td>\n<\/tr>\n<tr>\n<td>\u7fa4\u6210\u5458\u8868\u4e3a\u4ec0\u4e48\u5197\u4f59\u6635\u79f0&#xff1f;<\/td>\n<td>\u907f\u514d N&#043;1&#xff0c;500 \u4eba\u7fa4 501 \u6b21\u67e5\u8be2&#xff1b;\u4ee3\u4ef7\u662f\u6539\u6635\u79f0\u8981\u540c\u6b65\u6240\u6709\u7fa4<\/td>\n<\/tr>\n<tr>\n<td>\u7981\u8a00\u4e3a\u4ec0\u4e48\u4e24\u5c42&#xff1f;<\/td>\n<td>\u7fa4\u7ea7\u72b6\u6001\u63cf\u8ff0\u7fa4&#xff0c;\u6210\u5458\u7ea7\u72b6\u6001\u63cf\u8ff0\u5173\u7cfb&#xff1b;\u5408\u6210\u4e00\u5c42\u4f1a\u6709 5000 \u500d\u5199\u653e\u5927<\/td>\n<\/tr>\n<tr>\n<td>\u7fa4\u4eba\u6570\u600e\u4e48\u7b97&#xff1f;<\/td>\n<td>Cache-Aside \u7f13\u5b58 count \u7ed3\u679c&#xff0c;\u4e0d\u7ef4\u62a4 $inc \u589e\u91cf&#xff08;\u9519\u4e86\u6ca1\u57fa\u7ebf&#xff09;<\/td>\n<\/tr>\n<tr>\n<td>\u7fa4\u4e3b\u8f6c\u8ba9\u4e3a\u4ec0\u4e48\u8981\u4e8b\u52a1&#xff1f;<\/td>\n<td>\u4e24\u6b65\u6539\u89d2\u8272&#xff0c;\u4e2d\u95f4\u5931\u8d25\u4f1a\u5f97\u5230&#034;\u6ca1\u6709\u7fa4\u4e3b&#034;\u7684\u4e0d\u53ef\u7ba1\u7406\u7fa4<\/td>\n<\/tr>\n<tr>\n<td>\u89e3\u6563\u7fa4\u8981\u6e05\u591a\u5c11\u7f13\u5b58&#xff1f;<\/td>\n<td>8 \u7c7b&#xff08;\u591a\u7ef4\u5ea6\u7f13\u5b58\u7684\u4ee3\u4ef7&#xff09;&#xff0c;\u5efa\u8bae\u4e0a\u4ee3\u9645\u7248\u672c\u53f7\u505a O(1) \u5931\u6548<\/td>\n<\/tr>\n<tr>\n<td>\u8fd9\u4e2a\u9879\u76ee\u7fa4\u6a21\u5757\u6709\u4ec0\u4e48\u95ee\u9898&#xff1f;<\/td>\n<td>8 \u7c7b\u7f13\u5b58\u9010\u4e2a\u5220\u4e14\u4e0d\u539f\u5b50\u3001deleteMember \u53c2\u6570\u547d\u540d\u6613\u8bef\u5224\u3001\u7248\u672c\u65e5\u5fd7\u7528\u7a7a\u5b57\u7b26\u4e32\u5f53\u54e8\u5175<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h3>\u5341\u4e09\u3001\u5c0f\u7ed3&#xff1a;\u4e00\u5f20\u4e2d\u95f4\u8868\u3001\u4e24\u4e2a\u4e0d\u53d8\u91cf\u3001\u4e09\u79cd\u7b97\u6cd5<\/h3>\n<ul>\n<li>\u4e00\u5f20\u4e2d\u95f4\u8868&#xff1a;group_member&#xff0c;\u4e00\u6761\u8bb0\u5f55 &#061; \u4e00\u4e2a&#034;\u7528\u6237\u5728\u67d0\u7fa4\u7684\u8eab\u4efd&#034;\u3002M:N \u5173\u7cfb\u6c38\u8fdc\u7528\u4e2d\u95f4\u8868\u3002<\/li>\n<li>\u4e24\u4e2a\u4e0d\u53d8\u91cf&#xff1a;\u7fa4\u4e3b\u4e0d\u80fd\u9000\u7fa4&#xff08;\u5426\u5219\u7fa4\u65e0\u4eba\u53ef\u7ba1&#xff09;\u3001\u8f6c\u8ba9\u4e0d\u51cf\u5c11\u7ba1\u7406\u5458&#xff08;\u526f\u4f5c\u7528\u5b88\u6052&#xff09;\u3002<\/li>\n<li>\u4e09\u79cd\u7b97\u6cd5&#xff1a;\u5b9e\u65f6 count&#xff08;\u6162&#xff09;\u3001$inc \u589e\u91cf&#xff08;\u9519\u4e86\u6ca1\u57fa\u7ebf&#xff09;\u3001Cache-Aside&#xff08;\u63a8\u8350&#xff09;\u3002<\/li>\n<\/ul>\n<p>\u8fd9\u5f20\u8868\u5efa\u8bae\u6536\u85cf&#xff0c;\u505a\u4efb\u4f55&#034;\u7ec4\u7ec7\/\u6210\u5458&#034;\u7c7b\u529f\u80fd&#xff08;\u7fa4\u3001\u56e2\u961f\u3001\u9879\u76ee\u6210\u5458\u3001\u6743\u9650\u7ec4&#xff09;\u90fd\u80fd\u5957&#xff1a;<\/p>\n<table>\n<tr>\u68c0\u67e5\u9879\u8be5\u95ee\u4ec0\u4e48\u672c\u9879\u76ee\u7684\u7b54\u6848<\/tr>\n<tbody>\n<tr>\n<td>\u5173\u7cfb\u5b58\u50a8<\/td>\n<td>\u4e2d\u95f4\u8868\u8fd8\u662f\u6570\u7ec4&#xff1f;<\/td>\n<td>\u4e2d\u95f4\u8868 &#043; \u4e09\u7d22\u5f15<\/td>\n<\/tr>\n<tr>\n<td>\u89d2\u8272<\/td>\n<td>\u786c\u7f16\u7801\u8fd8\u662f\u914d\u7f6e\u5316&#xff1f;<\/td>\n<td>\u786c\u7f16\u7801\u4e09\u7ea7 &#043; \u4ee3\u7801 switch<\/td>\n<\/tr>\n<tr>\n<td>\u8ba1\u6570<\/td>\n<td>\u589e\u91cf\u8fd8\u662f\u7f13\u5b58\u7ed3\u679c&#xff1f;<\/td>\n<td>\u7f13\u5b58\u7ed3\u679c&#xff08;\u53ef\u91cd\u7b97\u7684\u4e0d\u7ef4\u62a4\u589e\u91cf&#xff09;<\/td>\n<\/tr>\n<tr>\n<td>\u901a\u77e5<\/td>\n<td>\u6247\u51fa\u591a\u5c11\u3001\u80fd\u4e0d\u80fd\u5173&#xff1f;<\/td>\n<td>\u63a8\u9001\u5c42\u6247\u51fa&#xff0c;\u4e09\u5c42\u5f00\u5173<\/td>\n<\/tr>\n<tr>\n<td>\u539f\u5b50\u6027<\/td>\n<td>\u54ea\u4e9b\u64cd\u4f5c\u5fc5\u987b\u4e8b\u52a1&#xff1f;<\/td>\n<td>\u8f6c\u8ba9\u7fa4\u4e3b\u3001\u89e3\u6563\u7fa4<\/td>\n<\/tr>\n<tr>\n<td>\u7f13\u5b58<\/td>\n<td>\u51e0\u4e2a\u7ef4\u5ea6\u3001\u600e\u4e48\u5931\u6548&#xff1f;<\/td>\n<td>8 \u7c7b&#xff0c;\u9010\u4e2a\u5220&#xff08;\u5efa\u8bae\u4ee3\u9645\u7248\u672c\u53f7&#xff09;<\/td>\n<\/tr>\n<tr>\n<td>ID<\/td>\n<td>\u8c01\u751f\u6210\u3001\u8981\u4e0d\u8981\u4e1a\u52a1\u5bf9\u9f50&#xff1f;<\/td>\n<td>\u53ef\u6307\u5b9a&#xff0c;\u4e1a\u52a1\u7cfb\u7edf\u8981\u6c42\u5bf9\u9f50<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>\u7559\u4e2a\u95ee\u9898&#xff0c;\u8bc4\u8bba\u533a\u4e00\u53e5\u8bdd\u80fd\u7b54&#xff1a; \u5982\u679c\u4e00\u4e2a 5000 \u4eba\u7684\u7fa4&#034;\u5168\u5458\u7981\u8a00&#034;\u7528\u7684\u662f&#034;\u7ed9\u6bcf\u4e2a\u6210\u5458\u8bbe\u7f6e\u7981\u8a00\u65f6\u95f4&#034;&#xff08;\u800c\u4e0d\u662f\u7fa4\u7ea7\u5b57\u6bb5&#xff09;&#xff0c;\u90a3\u4e48\u5927\u7fa4\u548c\u5c0f\u7fa4\u5728\u5199\u653e\u5927\u4e0a\u5dee\u591a\u5c11\u500d&#xff1f;\u4e3a\u4ec0\u4e48\u5c0f\u7fa4\u91cc\u770b\u4e0d\u51fa\u95ee\u9898&#xff1f;<\/p>\n<p>\u4e0b\u4e00\u7bc7&#xff1a;\u300aGo IM \u6e90\u7801\u5b9e\u6218&#xff08;13&#xff09;&#xff1a;\u4f1a\u8bdd\u5217\u8868 30 \u4e2a\u7fa4&#xff0c;\u4e3a\u4ec0\u4e48\u53ea\u6709 2 \u4e2a\u6709\u7ea2\u70b9\u300b\u2014\u2014\u4f1a\u8bdd\u4e0e\u672a\u8bfb\u8ba1\u6570\u7684\u5b8c\u6574\u94fe\u8def\u3002<\/p>\n<p>\u4f5c\u8005&#xff1a;\u5229\u5a01\u5c14xu | CSDN \u4e13\u680f\u300aGo IM \u6e90\u7801\u5b9e\u6218\u300b<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u4f60\u597d&#xff0c;\u6211\u662f\u5229\u5a01\u5c14xu\u3002<br \/>\n\u8fd9\u662f**\u300cGo IM \u6e90\u7801\u5b9e\u6218\u300d\u7cfb\u5217\u7b2c 12 \u7bc7**\u3002\u524d\u9762\u8bb2\u7684\u662f\\&#8221;\u4e00\u5bf9\u4e00\\&#8221;\u7684\u94fe\u8def&#xff0c;\u8fd9\u4e00\u7bc7\u5f00\u59cb\u8bb2**\u201c\u4e00\u5bf9\u591a\u201d**&#xff1a;\u7fa4\u7ec4\u3002<br \/>\n\u5148\u8bf4\u4e00\u4e2a\u5efa\u7fa4\u65f6\u7684\u771f\u5b9e\u5f00\u9500&#xff1a;\u5efa\u4e00\u4e2a 500 \u4eba\u7684\u7fa4&#xff0c;\u4e0d\u662f\\&#8221;\u63d2\u4e00\u6761\u7fa4\u8bb0\u5f55\\&#8221;&#xff0c;\u800c\u662f\\&#8221;\u63d2 1 \u6761\u7fa4\u8bb0\u5f55  500 \u6761\u6210\u5458\u8bb0\u5f55  500 \u6761\u4f1a\u8bdd\u8bb0\u5f55  1 \u6761\u901a\u77e5\u6d88\u606f&#xff0c;\u8fd8\u8981\u63a8\u7ed9 500 \u4e2a\u4eba\\&#8221;\u3002 \u800c\u8fd9\u4e9b\u64cd\u4f5c\u8de8\u8d8a\u4e86 group\u3001conversa<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[11820,746,733,292,1348,176],"topic":[],"class_list":["post-120055","post","type-post","status-publish","format-standard","hentry","category-server","tag-atomgit","tag-golang","tag-mongodb","tag-292","tag-1348","tag-176"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v20.3 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Go IM \u6e90\u7801\u5b9e\u6218\uff0812\uff09\uff1a\u5efa\u4e2a 500 \u4eba\u7684\u7fa4\uff0c\u5199\u7684\u662f 500 \u6761\u8bb0\u5f55 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.wsisp.com\/helps\/120055.html\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Go IM \u6e90\u7801\u5b9e\u6218\uff0812\uff09\uff1a\u5efa\u4e2a 500 \u4eba\u7684\u7fa4\uff0c\u5199\u7684\u662f 500 \u6761\u8bb0\u5f55 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"og:description\" content=\"\u4f60\u597d&#xff0c;\u6211\u662f\u5229\u5a01\u5c14xu\u3002 \u8fd9\u662f**\u300cGo IM \u6e90\u7801\u5b9e\u6218\u300d\u7cfb\u5217\u7b2c 12 \u7bc7**\u3002\u524d\u9762\u8bb2\u7684\u662f&quot;\u4e00\u5bf9\u4e00&quot;\u7684\u94fe\u8def&#xff0c;\u8fd9\u4e00\u7bc7\u5f00\u59cb\u8bb2**\u201c\u4e00\u5bf9\u591a\u201d**&#xff1a;\u7fa4\u7ec4\u3002 \u5148\u8bf4\u4e00\u4e2a\u5efa\u7fa4\u65f6\u7684\u771f\u5b9e\u5f00\u9500&#xff1a;\u5efa\u4e00\u4e2a 500 \u4eba\u7684\u7fa4&#xff0c;\u4e0d\u662f&quot;\u63d2\u4e00\u6761\u7fa4\u8bb0\u5f55&quot;&#xff0c;\u800c\u662f&quot;\u63d2 1 \u6761\u7fa4\u8bb0\u5f55 500 \u6761\u6210\u5458\u8bb0\u5f55 500 \u6761\u4f1a\u8bdd\u8bb0\u5f55 1 \u6761\u901a\u77e5\u6d88\u606f&#xff0c;\u8fd8\u8981\u63a8\u7ed9 500 \u4e2a\u4eba&quot;\u3002 \u800c\u8fd9\u4e9b\u64cd\u4f5c\u8de8\u8d8a\u4e86 group\u3001conversa\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.wsisp.com\/helps\/120055.html\" \/>\n<meta property=\"og:site_name\" content=\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"article:published_time\" content=\"2026-10-30T15:50:29+00:00\" \/>\n<meta name=\"author\" content=\"admin\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u4f5c\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"admin\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4\" \/>\n\t<meta name=\"twitter:data2\" content=\"7 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/120055.html\",\"url\":\"https:\/\/www.wsisp.com\/helps\/120055.html\",\"name\":\"Go IM \u6e90\u7801\u5b9e\u6218\uff0812\uff09\uff1a\u5efa\u4e2a 500 \u4eba\u7684\u7fa4\uff0c\u5199\u7684\u662f 500 \u6761\u8bb0\u5f55 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"isPartOf\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\"},\"datePublished\":\"2026-10-30T15:50:29+00:00\",\"dateModified\":\"2026-10-30T15:50:29+00:00\",\"author\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/120055.html#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.wsisp.com\/helps\/120055.html\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/120055.html#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.wsisp.com\/helps\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Go IM \u6e90\u7801\u5b9e\u6218\uff0812\uff09\uff1a\u5efa\u4e2a 500 \u4eba\u7684\u7fa4\uff0c\u5199\u7684\u662f 500 \u6761\u8bb0\u5f55\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\",\"url\":\"https:\/\/www.wsisp.com\/helps\/\",\"name\":\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"description\":\"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"zh-Hans\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\",\"name\":\"admin\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"contentUrl\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"caption\":\"admin\"},\"sameAs\":[\"http:\/\/wp.wsisp.com\"],\"url\":\"https:\/\/www.wsisp.com\/helps\/author\/admin\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Go IM \u6e90\u7801\u5b9e\u6218\uff0812\uff09\uff1a\u5efa\u4e2a 500 \u4eba\u7684\u7fa4\uff0c\u5199\u7684\u662f 500 \u6761\u8bb0\u5f55 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.wsisp.com\/helps\/120055.html","og_locale":"zh_CN","og_type":"article","og_title":"Go IM \u6e90\u7801\u5b9e\u6218\uff0812\uff09\uff1a\u5efa\u4e2a 500 \u4eba\u7684\u7fa4\uff0c\u5199\u7684\u662f 500 \u6761\u8bb0\u5f55 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","og_description":"\u4f60\u597d&#xff0c;\u6211\u662f\u5229\u5a01\u5c14xu\u3002 \u8fd9\u662f**\u300cGo IM \u6e90\u7801\u5b9e\u6218\u300d\u7cfb\u5217\u7b2c 12 \u7bc7**\u3002\u524d\u9762\u8bb2\u7684\u662f\"\u4e00\u5bf9\u4e00\"\u7684\u94fe\u8def&#xff0c;\u8fd9\u4e00\u7bc7\u5f00\u59cb\u8bb2**\u201c\u4e00\u5bf9\u591a\u201d**&#xff1a;\u7fa4\u7ec4\u3002 \u5148\u8bf4\u4e00\u4e2a\u5efa\u7fa4\u65f6\u7684\u771f\u5b9e\u5f00\u9500&#xff1a;\u5efa\u4e00\u4e2a 500 \u4eba\u7684\u7fa4&#xff0c;\u4e0d\u662f\"\u63d2\u4e00\u6761\u7fa4\u8bb0\u5f55\"&#xff0c;\u800c\u662f\"\u63d2 1 \u6761\u7fa4\u8bb0\u5f55 500 \u6761\u6210\u5458\u8bb0\u5f55 500 \u6761\u4f1a\u8bdd\u8bb0\u5f55 1 \u6761\u901a\u77e5\u6d88\u606f&#xff0c;\u8fd8\u8981\u63a8\u7ed9 500 \u4e2a\u4eba\"\u3002 \u800c\u8fd9\u4e9b\u64cd\u4f5c\u8de8\u8d8a\u4e86 group\u3001conversa","og_url":"https:\/\/www.wsisp.com\/helps\/120055.html","og_site_name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","article_published_time":"2026-10-30T15:50:29+00:00","author":"admin","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"admin","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"7 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.wsisp.com\/helps\/120055.html","url":"https:\/\/www.wsisp.com\/helps\/120055.html","name":"Go IM \u6e90\u7801\u5b9e\u6218\uff0812\uff09\uff1a\u5efa\u4e2a 500 \u4eba\u7684\u7fa4\uff0c\u5199\u7684\u662f 500 \u6761\u8bb0\u5f55 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","isPartOf":{"@id":"https:\/\/www.wsisp.com\/helps\/#website"},"datePublished":"2026-10-30T15:50:29+00:00","dateModified":"2026-10-30T15:50:29+00:00","author":{"@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41"},"breadcrumb":{"@id":"https:\/\/www.wsisp.com\/helps\/120055.html#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.wsisp.com\/helps\/120055.html"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.wsisp.com\/helps\/120055.html#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.wsisp.com\/helps"},{"@type":"ListItem","position":2,"name":"Go IM \u6e90\u7801\u5b9e\u6218\uff0812\uff09\uff1a\u5efa\u4e2a 500 \u4eba\u7684\u7fa4\uff0c\u5199\u7684\u662f 500 \u6761\u8bb0\u5f55"}]},{"@type":"WebSite","@id":"https:\/\/www.wsisp.com\/helps\/#website","url":"https:\/\/www.wsisp.com\/helps\/","name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","description":"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"zh-Hans"},{"@type":"Person","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41","name":"admin","image":{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/","url":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","contentUrl":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","caption":"admin"},"sameAs":["http:\/\/wp.wsisp.com"],"url":"https:\/\/www.wsisp.com\/helps\/author\/admin"}]}},"_links":{"self":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/120055","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/comments?post=120055"}],"version-history":[{"count":0,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/120055\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media?parent=120055"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/categories?post=120055"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/tags?post=120055"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/topic?post=120055"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}