{"id":3649,"date":"2023-11-24T15:19:33","date_gmt":"2023-11-24T07:19:33","guid":{"rendered":"http:\/\/www.ponybai.com\/?p=3649"},"modified":"2023-11-21T15:24:18","modified_gmt":"2023-11-21T07:24:18","slug":"apex-%e4%bb%a3%e7%a0%81%e7%89%88%e6%9c%ac","status":"publish","type":"post","link":"http:\/\/www.ponybai.com\/?p=3649","title":{"rendered":"Apex \u4ee3\u7801\u7248\u672c"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">\u4e3a\u4e86\u5e2e\u52a9\u5411\u540e\u517c\u5bb9\uff0c\u7c7b\u548c\u89e6\u53d1\u5668\u4e0e\u7248\u672c\u4e00\u8d77\u5b58\u50a8 \u7279\u5b9a Salesforce API \u7248\u672c\u7684\u8bbe\u7f6e\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u5982\u679c Apex \u7c7b\u6216\u89e6\u53d1\u5668\u5f15\u7528\u7ec4\u4ef6\uff0c\u4f8b\u5982 \u81ea\u5b9a\u4e49\u5bf9\u8c61\uff0c\u5728\u5df2\u5b89\u88c5\u7684\u6258\u7ba1\u5305\u4e2d\uff0c\u6bcf\u4e2a\u6258\u7ba1\u5305\u7684\u7248\u672c\u8bbe\u7f6e \u7c7b\u5f15\u7528\u7684\u5305\u4e5f\u4f1a\u88ab\u4fdd\u5b58\u3002\u8fd9\u786e\u4fdd\u4e86\u4f5c\u4e3a Apex\uff0c API\uff0c\u5e76\u4e14\u6258\u7ba1\u5305\u4e2d\u7684\u7ec4\u4ef6\u5728\u540e\u7eed\u53d1\u5e03\u7684\u7248\u672c\u4e2d\u4e0d\u65ad\u53d1\u5c55\uff0c\u4e00\u4e2a \u7c7b\u6216\u89e6\u53d1\u5668\u4ecd\u7ed1\u5b9a\u5230\u5177\u6709\u7279\u5b9a\u5df2\u77e5\u884c\u4e3a\u7684\u7248\u672c\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u4e3a\u5df2\u5b89\u88c5\u7684\u5305\u8bbe\u7f6e\u7248\u672c\u53ef\u786e\u5b9a\u516c\u5f00\u7684 \u63a5\u53e3\u548c\u4efb\u4f55 Apex \u4ee3\u7801\u7684\u884c\u4e3a \u5df2\u5b89\u88c5\u7684\u8f6f\u4ef6\u5305\u3002\u8fd9\u5141\u8bb8\u60a8\u7ee7\u7eed\u5f15\u7528 Apex \u5728\u5df2\u5b89\u88c5\u8f6f\u4ef6\u5305\u7684\u6700\u65b0\u7248\u672c\u4e2d\u5df2\u5f03\u7528\uff0c\u5982\u679c\u60a8\u5b89\u88c5\u4e86 \u4ee3\u7801\u88ab\u5f03\u7528\u4e4b\u524d\u7684\u5305\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u901a\u5e38\uff0c\u60a8\u5f15\u7528\u6700\u65b0\u7684 Salesforce API \u7248\u672c\u548c\u6bcf\u4e2a\u5df2\u5b89\u88c5\u7684\u8f6f\u4ef6\u5305 \u7248\u672c\u3002\u5982\u679c\u60a8\u5728\u672a\u6307\u5b9a Salesforce API \u7684\u60c5\u51b5\u4e0b\u4fdd\u5b58 Apex \u7c7b\u6216\u89e6\u53d1\u5668 version\uff0c\u5219\u7c7b\u6216\u89e6\u53d1\u5668\u4e0e\u6700\u65b0\u5b89\u88c5\u7684\u7248\u672c\u76f8\u5173\u8054 \u8fdd\u7ea6\u3002\u5982\u679c\u4fdd\u5b58\u5f15\u7528 \u6258\u7ba1\u5305\uff0c\u800c\u4e0d\u6307\u5b9a\u6258\u7ba1\u5305\u7684\u7248\u672c\u3001\u7c7b\u6216 \u89e6\u53d1\u5668\u4e0e\u6700\u65b0\u5b89\u88c5\u7684\u6258\u7ba1\u8f6f\u4ef6\u5305\u7248\u672c\u76f8\u5173\u8054\uff0c\u5177\u4f53\u65b9\u6cd5\u5982\u4e0b \u8fdd\u7ea6\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Apex \u7c7b\u548c\u65b9\u6cd5\u7684\u7248\u672c\u63a7\u5236<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">\u5c06\u7c7b\u548c\u65b9\u6cd5\u6dfb\u52a0\u5230 Apex \u8bed\u8a00\u65f6\uff0c \u8fd9\u4e9b\u7c7b\u548c\u65b9\u6cd5\u53ef\u7528\u4e8e\u4fdd\u5b58 Apex \u4ee3\u7801\u7684\u6240\u6709 API \u7248\u672c \uff0c\u65e0\u8bba\u5f15\u5165\u7684 API \u7248\u672c\uff08Salesforce \u7248\u672c\uff09\u5982\u4f55\u3002 \u4f8b\u5982\uff0c\u5982\u679c\u5728 API \u7248\u672c 33.0 \u4e2d\u6dfb\u52a0\u4e86\u65b9\u6cd5\uff0c\u5219\u53ef\u4ee5\u5728 \u4f7f\u7528 API \u7248\u672c 33.0 \u4fdd\u5b58\u7684\u81ea\u5b9a\u4e49\u7c7b\u6216\u4f7f\u7528 API \u7248\u672c\u4fdd\u5b58\u7684\u5176\u4ed6\u7c7b 25.0.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u6b64\u89c4\u5219\u6709\u4e00\u4e2a\u4f8b\u5916\u3002<samp>ConnectApi<\/samp>\u00a0\u547d\u540d\u7a7a\u95f4\u7684\u7c7b\u548c\u65b9\u6cd5\u4ec5\u5728\u6587\u6863\u4e2d\u6307\u5b9a\u7684 API \u7248\u672c\u4e2d\u53d7\u652f\u6301\u3002\u4e3a \u4f8b\u5982\uff0c\u5982\u679c\u5728 API \u7248\u672c 33.0 \u4e2d\u5f15\u5165\u4e86\u67d0\u4e2a\u7c7b\u6216\u65b9\u6cd5\uff0c\u5219\u8be5\u7c7b\u6216\u65b9\u6cd5\u4e0d\u53ef\u7528 \u5728\u65e9\u671f\u7248\u672c\u4e2d\u3002\u6709\u5173\u66f4\u591a\u4fe1\u606f\uff0c\u8bf7\u53c2\u89c1\u00a0ConnectApi \u7248\u672c\u63a7\u5236\u548c\u76f8\u7b49\u6027\u68c0\u67e5\u3002<\/p>\n\n\n\n<h1 class=\"wp-block-heading\">\u8bbe\u7f6e\u7c7b\u548c Salesforce API \u7248\u672c \u89e6\u53d1\u5668<\/h1>\n\n\n\n<p class=\"wp-block-paragraph\">\u8981\u4e3a\u7c7b\u6216\u89e6\u53d1\u5668\u8bbe\u7f6e Salesforce API \u548c Apex \u7248\u672c\uff0c\u8bf7\u6267\u884c\u4ee5\u4e0b\u64cd\u4f5c\uff1a<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li><a><\/a>\u7f16\u8f91\u7c7b\u6216\u89e6\u53d1\u5668\uff0c\u7136\u540e\u5355\u51fb<strong>\u201c\u7248\u672c\u201d \u8bbe\u7f6e<\/strong>\u3002<\/li>\n\n\n\n<li>\u9009\u62e9 Salesforce API \u7684\u7248\u672c\u3002\u8fd9\u4e2a\u7248\u672c\u4e5f\u662f \u4e0e\u7c7b\u6216\u89e6\u53d1\u5668\u5173\u8054\u7684 Apex \u7248\u672c\u3002<\/li>\n\n\n\n<li>\u70b9\u51fb<strong>\u4fdd\u5b58<\/strong>\u3002<\/li>\n<\/ol>\n\n\n\n<p class=\"wp-block-paragraph\">\u5982\u679c\u5728\u65b9\u6cd5\u8c03\u7528\u4e2d\u5c06\u5bf9\u8c61\u4f5c\u4e3a\u53c2\u6570\u4ece\u4e00\u4e2a Apex \u7c7b C1 \u4f20\u9012\u5230\u53e6\u4e00\u4e2a Apex \u7c7b class\u3001C2 \u548c C2 \u7531\u4e8e Salesforce API \u7248\u672c\u800c\u516c\u5f00\u4e86\u4e0d\u540c\u7684\u5b57\u6bb5 \u8bbe\u7f6e\uff0c\u5bf9\u8c61\u4e2d\u7684\u5b57\u6bb5\u7531 C2 \u7684\u7248\u672c\u8bbe\u7f6e\u63a7\u5236\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u5728\u6b64\u793a\u4f8b\u4e2d\uff0cCategories&nbsp;\u5b57\u6bb5\u8bbe\u7f6e\u4e3a\u4ece \u6d4b\u8bd5\u7c7b C1\uff0c\u56e0\u4e3a\u201c\u7c7b\u522b\u201d\u5b57\u6bb5\u5728 API \u7684 13.0 \u7248\u3002<samp>null<\/samp><samp>insertIdea<\/samp><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u7b2c\u4e00\u4e2a\u7c7b\u4f7f\u7528 Salesforce API \u7248\u672c 13.0 \u4fdd\u5b58\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>\/\/ This class is saved using Salesforce API version 13.0\n\/\/ Version 13.0 does not include the Idea.categories field\nglobal class C2\n{\n    global Idea insertIdea(Idea a) {\n        insert a; \/\/ category field set to null on insert\n        \n        \/\/ retrieve the new idea\n        Idea insertedIdea = &#91;SELECT title FROM Idea WHERE Id =:a.Id];\n        \n        return insertedIdea;\n    }\n}<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u4f7f\u7528 Salesforce API \u7248\u672c 16.0 \u4fdd\u5b58\u4ee5\u4e0b\u7c7b\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>@IsTest\n\/\/ This class is bound to API version 16.0 by Version Settings\nprivate class C1\n{  \n    static testMethod void testC2Method() {\n        Idea i = new Idea();\n        i.CommunityId = '09aD000000004YCIAY';\n        i.Title = 'Testing Version Settings';\n        i.Body = 'Categories field is included in API version 16.0';\n        i.Categories = 'test';\n\n        C2 c2 = new C2();\n        Idea returnedIdea = c2.insertIdea(i);\n        \/\/ retrieve the new idea\n        Idea ideaMoreFields = &#91;SELECT title, categories FROM Idea\n             WHERE Id = :returnedIdea.Id];\n\n        \/\/ assert that the categories field from the object created\n        \/\/ in this class is not null\n        System.assert(i.Categories != null);\n        \/\/ assert that the categories field created in C2 is null\n        System.assert(ideaMoreFields.Categories == null);\n    }\n}<\/code><\/pre>\n\n\n\n<h1 class=\"wp-block-heading\">\u8bbe\u7f6e Apex \u7c7b\u548c\u89e6\u53d1\u5668\u7684\u5305\u7248\u672c<\/h1>\n\n\n\n<p class=\"wp-block-paragraph\">\u82e5\u8981\u914d\u7f6e\u7c7b\u6216\u89e6\u53d1\u5668\u7684\u5305\u7248\u672c\u8bbe\u7f6e\uff0c\u8bf7\u6267\u884c\u4ee5\u4e0b\u64cd\u4f5c\uff1a<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>\u7f16\u8f91\u7c7b\u6216\u89e6\u53d1\u5668\uff0c\u7136\u540e\u5355\u51fb<strong>\u201c\u7248\u672c\u8bbe\u7f6e<\/strong>\u201d\u3002<\/li>\n\n\n\n<li>\u4e3a\u7c7b\u5f15\u7528\u7684\u6bcf\u4e2a\u6258\u7ba1\u5305\u9009\u62e9\u4e00\u4e2a\u7248\u672c\uff0c\u6216\u8005 \u89e6\u53d1\u3002\u5982\u679c\u51fa\u73b0\u4ee5\u4e0b\u60c5\u51b5\uff0c\u7c7b\u6216\u89e6\u53d1\u5668\u5c06\u7ee7\u7eed\u4f7f\u7528\u6b64\u7248\u672c\u7684\u6258\u7ba1\u5305 \u9664\u975e\u60a8\u624b\u52a8\u66f4\u65b0\u7248\u672c\uff0c\u5426\u5219\u5c06\u5b89\u88c5\u66f4\u9ad8\u7248\u672c\u7684\u6258\u7ba1\u5305 \u8bbe\u7f6e\u3002<a><\/a>\u82e5\u8981\u5c06\u5df2\u5b89\u88c5\u7684\u6258\u7ba1\u5305\u6dfb\u52a0\u5230\u8bbe\u7f6e\u5217\u8868\uff0c\u8bf7\u9009\u62e9 package\u3002\u4ec5\u5f53\u60a8\u5177\u6709 \u5df2\u5b89\u88c5\u7684\u6258\u7ba1\u5305\u5c1a\u672a\u4e0e\u7c7b\u6216\u89e6\u53d1\u5668\u5173\u8054\u3002<\/li>\n\n\n\n<li>\u70b9\u51fb<strong>\u4fdd\u5b58<\/strong>\u3002<\/li>\n<\/ol>\n\n\n\n<p class=\"wp-block-paragraph\">\u4f7f\u7528\u5305\u7248\u672c\u8bbe\u7f6e\u65f6\uff0c\u8bf7\u6ce8\u610f\u4ee5\u4e0b\u4e8b\u9879\uff1a<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u5982\u679c\u4fdd\u5b58\u5f15\u7528\u6258\u7ba1\u5305\u7684 Apex \u7c7b\u6216\u89e6\u53d1\u5668\uff0c\u4f46\u672a\u6307\u5b9a \u6258\u7ba1\u5305\u7684\u7248\u672c\uff0cApex \u7c7b\u6216\u89e6\u53d1\u5668\u4e0e\u6700\u65b0\u7684 \u9ed8\u8ba4\u60c5\u51b5\u4e0b\uff0c\u6258\u7ba1\u5305\u7684\u5df2\u5b89\u88c5\u7248\u672c\u3002<\/li>\n\n\n\n<li>\u4e0d\u80fd<strong>\u5220\u9664<\/strong>\u6258\u7ba1\u7c7b\u6216\u89e6\u53d1\u5668\u7684\u7248\u672c\u8bbe\u7f6e package\uff08\u5982\u679c\u5728\u7c7b\u6216\u89e6\u53d1\u5668\u4e2d\u5f15\u7528\u4e86\u8be5\u5305\uff09\u3002\u4f7f\u7528<strong>\u663e\u793a \u7528\u4e8e<\/strong>\u67e5\u627e\u7c7b\u5f15\u7528\u6258\u7ba1\u5305\u7684\u4f4d\u7f6e\u7684\u4f9d\u8d56\u9879\uff0c\u6216\u8005 \u89e6\u53d1\u3002<\/li>\n<\/ul>\n\n\n\n<h1 class=\"wp-block-heading\">\u81ea\u5b9a\u4e49\u7c7b\u578b\u548c\u6392\u5e8f\u5217\u8868<\/h1>\n\n\n\n<p class=\"wp-block-paragraph\">\u5217\u8868\u53ef\u4ee5\u5305\u542b\u7528\u6237\u5b9a\u4e49\u7c7b\u578b\uff08Apex \u7c7b\uff09\u7684\u5bf9\u8c61\u3002\u53ef\u4ee5\u5bf9\u7528\u6237\u5b9a\u4e49\u7c7b\u578b\u7684\u5217\u8868\u8fdb\u884c\u6392\u5e8f\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u82e5\u8981\u5bf9\u6b64\u7c7b\u5217\u8868\u8fdb\u884c\u6392\u5e8f\uff0cApex \u7c7b\u53ef\u4ee5\u5b9e\u73b0\u63a5\u53e3\u5e76\u5c06\u5176\u4f5c\u4e3a\u53c2\u6570\u4f20\u9012\u7ed9\u65b9\u6cd5\u3002\u6216\u8005\uff0c\u60a8\u7684 Apex \u7c7b\u53ef\u4ee5 \u5b9e\u73b0\u63a5\u53e3\u3002<samp>Comparator<\/samp><samp>List.sort<\/samp><samp>Comparable<\/samp><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u6392\u5e8f\u6761\u4ef6\u548c\u6392\u5e8f\u987a\u5e8f\u53d6\u51b3\u4e8e\u4e3a \u6216 \u65b9\u6cd5\u63d0\u4f9b\u7684\u5b9e\u73b0\u3002<samp>Comparable.compareTo<\/samp><samp>Comparator.compare<\/samp><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u82e5\u8981\u6267\u884c\u533a\u5206\u533a\u57df\u8bbe\u7f6e\u7684\u6bd4\u8f83\u548c\u6392\u5e8f\uff0c\u8bf7\u4f7f\u7528\u8be5\u7c7b\u3002\u56e0\u4e3a\u533a\u5206\u533a\u57df\u8bbe\u7f6e\u7684\u6392\u5e8f\u53ef\u4ee5\u4ea7\u751f\u4e0d\u540c\u7684 \u7ed3\u679c\u53d6\u51b3\u4e8e\u8fd0\u884c\u4ee3\u7801\u7684\u7528\u6237\uff0c\u8bf7\u907f\u514d\u5728\u89e6\u53d1\u5668\u6216\u4ee3\u7801\u4e2d\u4f7f\u7528\u5b83 \u8fd9\u9700\u8981\u7279\u5b9a\u7684\u6392\u5e8f\u987a\u5e8f\u3002<samp>Collator<\/samp><\/p>\n\n\n\n<h1 class=\"wp-block-heading\">\u5728\u6620\u5c04\u952e\u548c\u96c6\u4e2d\u4f7f\u7528\u81ea\u5b9a\u4e49\u7c7b\u578b<\/h1>\n\n\n\n<p class=\"wp-block-paragraph\">\u60a8\u53ef\u4ee5\u5c06\u81ea\u5df1\u7684 Apex \u7c7b\u7684\u5b9e\u4f8b\u6dfb\u52a0\u5230\u6620\u5c04\u548c\u96c6\u5408\u4e2d\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u5bf9\u4e8e\u6620\u5c04\uff0c\u53ef\u4ee5\u5c06 Apex \u7c7b\u7684\u5b9e\u4f8b\u6dfb\u52a0\u4e3a\u952e\u6216\u503c\u3002\u5982\u679c \u4f60\u628a\u5b83\u4eec\u6dfb\u52a0\u4e3a\u952e\uff0c\u4f60\u7684\u7c7b\u5fc5\u987b\u5b9e\u73b0\u4e00\u4e9b\u7279\u6b8a\u7684\u89c4\u5219 \u4f7f\u5730\u56fe\u6b63\u5e38\u8fd0\u884c;\u4e5f\u5c31\u662f\u8bf4\uff0c\u8ba9\u952e\u83b7\u53d6\u6b63\u786e\u7684\u503c\u3002 \u540c\u6837\uff0c\u5982\u679c set \u5143\u7d20\u662f\u81ea\u5b9a\u4e49\u7c7b\u7684\u5b9e\u4f8b\uff0c\u5219\u7c7b\u5fc5\u987b \u9075\u5faa\u76f8\u540c\u7684\u89c4\u5219\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u8b66\u544a<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u5982\u679c\u6620\u5c04\u952e\u6216\u8bbe\u7f6e\u5143\u7d20\u4e2d\u7684\u5bf9\u8c61\u5728\u53d1\u751f\u4ee5\u4e0b\u53d8\u5316\u65f6\u53d1\u751f\u66f4\u6539 \u6dfb\u52a0\u5230\u96c6\u5408\u4e2d\uff0c\u7531\u4e8e\u5b57\u6bb5\u5df2\u66f4\u6539\uff0c\u5c06\u4e0d\u518d\u627e\u5230\u5b83 \u503c\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u5c06\u81ea\u5b9a\u4e49\u7c7b\u578b\uff08Apex \u7c7b\uff09\u7528\u4e8e\u6620\u5c04\u952e\u6216 set \u5143\u7d20\u65f6\uff0c\u8bf7\u5728\u7c7b\u4e2d\u63d0\u4f9b \u548c \u65b9\u6cd5\u3002Apex \u4f7f\u7528\u8fd9\u4e9b \u786e\u5b9a\u5bf9\u8c61\u952e\u7684\u76f8\u7b49\u6027\u548c\u552f\u4e00\u6027\u7684\u4e24\u79cd\u65b9\u6cd5\u3002<samp>equals<\/samp><samp>hashCode<\/samp><\/p>\n\n\n\n<h2 class=\"wp-block-heading\">\u5c06&nbsp;equals&nbsp;\u548c&nbsp;hashCode&nbsp;\u65b9\u6cd5\u6dfb\u52a0\u5230\u7c7b\u4e2d<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">\u8981\u786e\u4fdd\u6b63\u786e\u6bd4\u8f83\u81ea\u5b9a\u4e49\u7c7b\u578b\u7684\u6620\u5c04\u952e\uff0c\u5e76\u4e14\u5176 \u552f\u4e00\u6027\u53ef\u4ee5\u4e00\u81f4\u5730\u786e\u5b9a\uff0c\u63d0\u4f9b \u7c7b\u4e2d\u7684\u4ee5\u4e0b\u4e24\u79cd\u65b9\u6cd5\uff1a<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u8fd9\u4e2a\u65b9\u6cd5 \u7b7e\u540d\uff1a<samp>equals<\/samp><code>public Boolean equals(Object obj) { \/\/ Your implementation }<\/code>\u4fdd\u6301 \u5728\u5b9e\u73b0\u8be5\u65b9\u6cd5\u65f6\uff0c\u8bf7\u8bb0\u4f4f\u4ee5\u4e0b\u51e0\u70b9\u3002\u5047\u8bbe x\u3001y \u548c z \u662f\u7c7b\u7684\u975e null \u5b9e\u4f8b\uff0c\u5219\u8be5\u65b9\u6cd5\u5fc5\u987b\u4e3a\uff1a<samp>equalsequals<li>\u53cd\u8eab\uff1a<samp>x.equals(x)<\/samp>\u5bf9\u79f0\uff1a\u5982\u679c\u51fa\u73b0\u4ee5\u4e0b\u60c5\u51b5\uff0c\u5e94\u8fd4\u56de \u5e76\u4e14\u4ec5\u5f53\u8fd4\u56de<samp>x.equals(y)truey.equals(x)true<\/samp>\u4f20\u9012\uff1a\u5982\u679c return \u548c returns \uff0c\u5219\u5e94\u8fd4\u56de<samp>x.equals(y)truey.equals(z)truex.equals(z)true<\/samp>\u4e00\u81f4\uff1a\u591a\u6b21\u8c03\u7528\u4e00\u81f4 return \u6216 \u59cb\u7ec8\u5982\u4e00\u7684\u56de\u62a5<samp>x.equals(y)truefalse<\/samp>\u5bf9\u4e8e\u4efb\u4f55\u975e null \u5f15\u7528\u503c x\uff0c\u5e94\u8fd4\u56de<samp>x.equals(null)false<\/samp><\/li><\/samp>\u4e2d\u7684\u65b9\u6cd5 Apex \u57fa\u4e8e\u00a0\u722a\u54c7\u3002<samp>equals<\/samp><\/li>\n\n\n\n<li>\u8fd9\u4e2a\u65b9\u6cd5 \u7b7e\u540d\uff1a<samp>hashCode<\/samp><code>public Integer hashCode() { \/\/ Your implementation }<\/code>\u4fdd\u6301 \u5728\u5b9e\u73b0\u8be5\u65b9\u6cd5\u65f6\uff0c\u8bf7\u8bb0\u4f4f\u4ee5\u4e0b\u51e0\u70b9\u3002<samp>hashCode<li>\u5982\u679c\u65b9\u6cd5 \u5728\u6267\u884c\u671f\u95f4\u5bf9\u540c\u4e00\u5bf9\u8c61\u591a\u6b21\u8c03\u7528 Apex \u8bf7\u6c42\uff0c\u5b83\u5fc5\u987b\u8fd4\u56de\u76f8\u540c\u7684\u503c\u3002<samp>hashCode<\/samp>\u5982\u679c\u4e24\u4e2a\u5bf9\u8c61\u76f8\u7b49\uff0c\u5219\u6839\u636e\u8be5\u65b9\u6cd5\uff0c\u5fc5\u987b\u8fd4\u56de \u76f8\u540c\u7684\u503c\u3002<samp>equalshashCode<\/samp>\u5982\u679c\u4e24\u4e2a\u5bf9\u8c61\u4e0d\u76f8\u7b49\uff0c\u5219\u6839\u636e\u8be5\u65b9\u6cd5\u7684\u7ed3\u679c\uff0c\u5b83\u4e0d\u662f \u9700\u8981\u8fd4\u56de\u975e\u91cd\u590d\u503c\u3002<samp>equalshashCode<\/samp><\/li><\/samp>\u65b9\u6cd5 \u5728 Apex \u4e2d\u57fa\u4e8e\u00a0\u722a\u54c7\u3002<samp>hashCode<\/samp><\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">\u5728\u7c7b\u4e2d\u63d0\u4f9b\u8be5\u65b9\u6cd5\u7684\u53e6\u4e00\u4e2a\u597d\u5904\u662f\uff0c\u5b83\u7b80\u5316\u4e86\u5bf9\u8c61\u7684\u6bd4\u8f83\u3002\u60a8\u5c06\u80fd\u591f \u8981\u4f7f\u7528\u8fd0\u7b97\u7b26\u6bd4\u8f83\u5bf9\u8c61\uff0c \u6216\u65b9\u6cd5\u3002\u4e3a \u4f8b\uff1a<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><samp>equals<\/samp><samp>==<\/samp><samp>equals<\/samp><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>\/\/ obj1 and obj2 are instances of MyClass\nif (obj1 == obj2) {\n    \/\/ Do something\n}\n\nif (obj1.equals(obj2)) {\n    \/\/ Do something\n}<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">\u6837\u672c<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">\u6b64\u793a\u4f8b\u6f14\u793a\u5982\u4f55\u5b9e\u73b0 and \u65b9\u6cd5\u3002\u8be5\u7c7b \u524d\u63d0\u662f\u8fd9\u4e9b\u65b9\u6cd5\u9996\u5148\u5217\u51fa\u3002\u5b83\u8fd8\u5305\u542b\u4e00\u4e2a\u6784\u9020\u51fd\u6570\uff0c\u8be5\u6784\u9020\u51fd\u6570\u91c7\u7528 \u4e24\u4e2a\u6574\u6570\u3002\u7b2c\u4e8c\u4e2a\u793a\u4f8b\u662f\u4e00\u4e2a\u4ee3\u7801\u7247\u6bb5\uff0c\u5b83\u521b\u5efa\u4e86 \u7c7b\uff0c\u5176\u4e2d\u4e24\u4e2a\u5177\u6709\u76f8\u540c\u7684\u503c\u3002\u63a5\u4e0b\u6765\uff0c\u4f7f\u7528\u5bf9\u6dfb\u52a0\u5730\u56fe\u6761\u76ee \u5bf9\u8c61\u4f5c\u4e3a\u952e\u3002\u8be5\u793a\u4f8b\u9a8c\u8bc1\u6620\u5c04\u662f\u5426\u53ea\u6709\u4e24\u4e2a\u6761\u76ee\uff0c\u56e0\u4e3a \u6700\u540e\u6dfb\u52a0\u7684\u6761\u76ee\u4e0e\u7b2c\u4e00\u4e2a\u6761\u76ee\u5177\u6709\u76f8\u540c\u7684\u952e\uff0c\u56e0\u6b64\u88ab\u8986\u76d6 \u5b83\u3002\u7136\u540e\uff0c\u8be5\u793a\u4f8b\u4f7f\u7528\u8fd0\u7b97\u7b26 \u5b83\u6309\u9884\u671f\u5de5\u4f5c\uff0c\u56e0\u4e3a\u8be5\u7c7b\u5b9e\u73b0\u4e86 .\u6b64\u5916\uff0c\u8fd8\u4f1a\u6267\u884c\u4e00\u4e9b\u989d\u5916\u7684\u6620\u5c04\u64cd\u4f5c\uff0c\u4f8b\u5982 \u68c0\u67e5\u6620\u5c04\u662f\u5426\u5305\u542b\u67d0\u4e9b\u952e\uff0c\u5e76\u5c06\u6240\u6709\u952e\u548c\u503c\u5199\u5165 \u8c03\u8bd5\u65e5\u5fd7\u3002\u6700\u540e\uff0c\u8be5\u793a\u4f8b\u521b\u5efa\u4e00\u4e2a\u96c6\u5408\uff0c\u5e76\u5411\u5176\u6dfb\u52a0\u76f8\u540c\u7684\u5bf9\u8c61\u3002\u5b83 \u9a8c\u8bc1\u8bbe\u7f6e\u7684\u5927\u5c0f\u662f\u5426\u4e3a 2\uff0c\u56e0\u4e3a\u4e09\u4e2a\u5bf9\u8c61\u4e2d\u53ea\u6709 2 \u4e2a\u662f \u72ec\u7279\u3002<samp>equals<\/samp><samp>hashCode<\/samp><samp>==<\/samp><samp>equals<\/samp><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>public class PairNumbers {\n    Integer x,y;\n\n    public PairNumbers(Integer a, Integer b) {\n        x=a;\n        y=b;\n    }\n\n    public Boolean equals(Object obj) {\n        if (obj instanceof PairNumbers) {\n            PairNumbers p = (PairNumbers)obj;\n            return ((x==p.x) &amp;&amp; (y==p.y));\n        }\n        return false;\n    }\n\n    public Integer hashCode() {\n        return (31 * x) ^ y;\n    }\n}<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u6b64\u4ee3\u7801\u7247\u6bb5\u4f7f\u7528\u8be5\u7c7b\u3002<samp>PairNumbers<\/samp><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>Map&lt;PairNumbers, String&gt; m = new Map&lt;PairNumbers, String&gt;();\nPairNumbers p1 = new PairNumbers(1,2);\nPairNumbers p2 = new PairNumbers(3,4);\n\/\/ Duplicate key\nPairNumbers p3 = new PairNumbers(1,2);\nm.put(p1, 'first');\nm.put(p2, 'second');\nm.put(p3, 'third');\n\n\/\/ Map size is 2 because the entry with \n\/\/ the duplicate key overwrote the first entry.\nSystem.assertEquals(2, m.size());\n\n\/\/ Use the == operator\nif (p1 == p3) {\n    System.debug('p1 and p3 are equal.');\n}\n\n\/\/ Perform some other operations\nSystem.assertEquals(true, m.containsKey(p1));\nSystem.assertEquals(true, m.containsKey(p2));\nSystem.assertEquals(false, m.containsKey(new PairNumbers(5,6)));\n\nfor(PairNumbers pn : m.keySet()) {\n    System.debug('Key: ' + pn);\n}\n\nList&lt;String&gt; mValues = m.values();\nSystem.debug('m.values: ' + mValues);\n\n\/\/ Create a set\nSet&lt;PairNumbers&gt; s1 = new Set&lt;PairNumbers&gt;();\ns1.add(p1);\ns1.add(p2);\ns1.add(p3);\n\n\/\/ Verify that we have only two elements\n\/\/ since the p3 is equal to p1.\nSystem.assertEquals(2, s1.size());<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>\u4e3a\u4e86\u5e2e\u52a9\u5411\u540e\u517c\u5bb9\uff0c\u7c7b\u548c\u89e6\u53d1\u5668\u4e0e\u7248\u672c\u4e00\u8d77\u5b58\u50a8 \u7279\u5b9a Salesforce API \u7248\u672c\u7684\u8bbe\u7f6e\u3002<\/p>\n<p>\u5982\u679c Apex \u7c7b\u6216\u89e6\u53d1\u5668\u5f15\u7528\u7ec4\u4ef6\uff0c\u4f8b\u5982 \u81ea\u5b9a\u4e49\u5bf9\u8c61\uff0c\u5728\u5df2\u5b89\u88c5\u7684\u6258\u7ba1\u5305\u4e2d\uff0c\u6bcf\u4e2a\u6258\u7ba1\u5305\u7684\u7248\u672c\u8bbe\u7f6e \u7c7b\u5f15\u7528\u7684\u5305\u4e5f\u4f1a\u88ab\u4fdd\u5b58\u3002\u8fd9\u786e\u4fdd\u4e86\u4f5c\u4e3a Apex\uff0c API\uff0c\u5e76\u4e14\u6258\u7ba1\u5305\u4e2d\u7684\u7ec4\u4ef6\u5728\u540e\u7eed\u53d1\u5e03\u7684\u7248\u672c\u4e2d\u4e0d\u65ad\u53d1\u5c55\uff0c\u4e00\u4e2a \u7c7b\u6216\u89e6\u53d1\u5668\u4ecd\u7ed1\u5b9a\u5230\u5177\u6709\u7279\u5b9a\u5df2\u77e5\u884c\u4e3a\u7684\u7248\u672c\u3002<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[199],"tags":[],"class_list":["post-3649","post","type-post","status-publish","format-standard","hentry","category-apex-"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v21.7 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Apex \u4ee3\u7801\u7248\u672c - \u767d\u767d\u968f\u7b14<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"http:\/\/www.ponybai.com\/?p=3649\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Apex \u4ee3\u7801\u7248\u672c - \u767d\u767d\u968f\u7b14\" \/>\n<meta property=\"og:description\" content=\"\u4e3a\u4e86\u5e2e\u52a9\u5411\u540e\u517c\u5bb9\uff0c\u7c7b\u548c\u89e6\u53d1\u5668\u4e0e\u7248\u672c\u4e00\u8d77\u5b58\u50a8 \u7279\u5b9a Salesforce API \u7248\u672c\u7684\u8bbe\u7f6e\u3002 \u5982\u679c Apex \u7c7b\u6216\u89e6\u53d1\u5668\u5f15\u7528\u7ec4\u4ef6\uff0c\u4f8b\u5982 \u81ea\u5b9a\u4e49\u5bf9\u8c61\uff0c\u5728\u5df2\u5b89\u88c5\u7684\u6258\u7ba1\u5305\u4e2d\uff0c\u6bcf\u4e2a\u6258\u7ba1\u5305\u7684\u7248\u672c\u8bbe\u7f6e \u7c7b\u5f15\u7528\u7684\u5305\u4e5f\u4f1a\u88ab\u4fdd\u5b58\u3002\u8fd9\u786e\u4fdd\u4e86\u4f5c\u4e3a Apex\uff0c API\uff0c\u5e76\u4e14\u6258\u7ba1\u5305\u4e2d\u7684\u7ec4\u4ef6\u5728\u540e\u7eed\u53d1\u5e03\u7684\u7248\u672c\u4e2d\u4e0d\u65ad\u53d1\u5c55\uff0c\u4e00\u4e2a \u7c7b\u6216\u89e6\u53d1\u5668\u4ecd\u7ed1\u5b9a\u5230\u5177\u6709\u7279\u5b9a\u5df2\u77e5\u884c\u4e3a\u7684\u7248\u672c\u3002\" \/>\n<meta property=\"og:url\" content=\"http:\/\/www.ponybai.com\/?p=3649\" \/>\n<meta property=\"og:site_name\" content=\"\u767d\u767d\u968f\u7b14\" \/>\n<meta property=\"article:published_time\" content=\"2023-11-24T07:19:33+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2023-11-21T07:24:18+00:00\" \/>\n<meta property=\"og:image\" content=\"http:\/\/www.ponybai.com\/wp-content\/uploads\/2023\/11\/cropped-weixin2.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"248\" \/>\n\t<meta property=\"og:image:height\" content=\"248\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"ponybai\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u4f5c\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"ponybai\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4\" \/>\n\t<meta name=\"twitter:data2\" content=\"3 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"http:\/\/www.ponybai.com\/?p=3649#article\",\"isPartOf\":{\"@id\":\"http:\/\/www.ponybai.com\/?p=3649\"},\"author\":{\"name\":\"ponybai\",\"@id\":\"http:\/\/www.ponybai.com\/#\/schema\/person\/935c7592c850c65e1e5eba4530dbf883\"},\"headline\":\"Apex \u4ee3\u7801\u7248\u672c\",\"datePublished\":\"2023-11-24T07:19:33+00:00\",\"dateModified\":\"2023-11-21T07:24:18+00:00\",\"mainEntityOfPage\":{\"@id\":\"http:\/\/www.ponybai.com\/?p=3649\"},\"wordCount\":141,\"publisher\":{\"@id\":\"http:\/\/www.ponybai.com\/#\/schema\/person\/935c7592c850c65e1e5eba4530dbf883\"},\"articleSection\":[\"Apex \u5f00\u53d1\u4eba\u5458\u6307\u5357\"],\"inLanguage\":\"zh-Hans\"},{\"@type\":\"WebPage\",\"@id\":\"http:\/\/www.ponybai.com\/?p=3649\",\"url\":\"http:\/\/www.ponybai.com\/?p=3649\",\"name\":\"Apex \u4ee3\u7801\u7248\u672c - \u767d\u767d\u968f\u7b14\",\"isPartOf\":{\"@id\":\"http:\/\/www.ponybai.com\/#website\"},\"datePublished\":\"2023-11-24T07:19:33+00:00\",\"dateModified\":\"2023-11-21T07:24:18+00:00\",\"breadcrumb\":{\"@id\":\"http:\/\/www.ponybai.com\/?p=3649#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"http:\/\/www.ponybai.com\/?p=3649\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"http:\/\/www.ponybai.com\/?p=3649#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"http:\/\/www.ponybai.com\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Apex \u4ee3\u7801\u7248\u672c\"}]},{\"@type\":\"WebSite\",\"@id\":\"http:\/\/www.ponybai.com\/#website\",\"url\":\"http:\/\/www.ponybai.com\/\",\"name\":\"\u767d\u767d\u968f\u7b14\",\"description\":\"Salesforce\u5b98\u65b9\u8bb2\u5e08\",\"publisher\":{\"@id\":\"http:\/\/www.ponybai.com\/#\/schema\/person\/935c7592c850c65e1e5eba4530dbf883\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"http:\/\/www.ponybai.com\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"zh-Hans\"},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"http:\/\/www.ponybai.com\/#\/schema\/person\/935c7592c850c65e1e5eba4530dbf883\",\"name\":\"ponybai\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"http:\/\/www.ponybai.com\/#\/schema\/person\/image\/\",\"url\":\"http:\/\/www.ponybai.com\/wp-content\/uploads\/2025\/03\/cropped-Ihsans-WeChatQR.jpg\",\"contentUrl\":\"http:\/\/www.ponybai.com\/wp-content\/uploads\/2025\/03\/cropped-Ihsans-WeChatQR.jpg\",\"width\":248,\"height\":248,\"caption\":\"ponybai\"},\"logo\":{\"@id\":\"http:\/\/www.ponybai.com\/#\/schema\/person\/image\/\"},\"sameAs\":[\"http:\/\/121.37.188.161\"],\"url\":\"http:\/\/www.ponybai.com\/?author=1\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Apex \u4ee3\u7801\u7248\u672c - \u767d\u767d\u968f\u7b14","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":"http:\/\/www.ponybai.com\/?p=3649","og_locale":"zh_CN","og_type":"article","og_title":"Apex \u4ee3\u7801\u7248\u672c - \u767d\u767d\u968f\u7b14","og_description":"\u4e3a\u4e86\u5e2e\u52a9\u5411\u540e\u517c\u5bb9\uff0c\u7c7b\u548c\u89e6\u53d1\u5668\u4e0e\u7248\u672c\u4e00\u8d77\u5b58\u50a8 \u7279\u5b9a Salesforce API \u7248\u672c\u7684\u8bbe\u7f6e\u3002 \u5982\u679c Apex \u7c7b\u6216\u89e6\u53d1\u5668\u5f15\u7528\u7ec4\u4ef6\uff0c\u4f8b\u5982 \u81ea\u5b9a\u4e49\u5bf9\u8c61\uff0c\u5728\u5df2\u5b89\u88c5\u7684\u6258\u7ba1\u5305\u4e2d\uff0c\u6bcf\u4e2a\u6258\u7ba1\u5305\u7684\u7248\u672c\u8bbe\u7f6e \u7c7b\u5f15\u7528\u7684\u5305\u4e5f\u4f1a\u88ab\u4fdd\u5b58\u3002\u8fd9\u786e\u4fdd\u4e86\u4f5c\u4e3a Apex\uff0c API\uff0c\u5e76\u4e14\u6258\u7ba1\u5305\u4e2d\u7684\u7ec4\u4ef6\u5728\u540e\u7eed\u53d1\u5e03\u7684\u7248\u672c\u4e2d\u4e0d\u65ad\u53d1\u5c55\uff0c\u4e00\u4e2a \u7c7b\u6216\u89e6\u53d1\u5668\u4ecd\u7ed1\u5b9a\u5230\u5177\u6709\u7279\u5b9a\u5df2\u77e5\u884c\u4e3a\u7684\u7248\u672c\u3002","og_url":"http:\/\/www.ponybai.com\/?p=3649","og_site_name":"\u767d\u767d\u968f\u7b14","article_published_time":"2023-11-24T07:19:33+00:00","article_modified_time":"2023-11-21T07:24:18+00:00","og_image":[{"width":248,"height":248,"url":"http:\/\/www.ponybai.com\/wp-content\/uploads\/2023\/11\/cropped-weixin2.jpg","type":"image\/jpeg"}],"author":"ponybai","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"ponybai","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"3 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"http:\/\/www.ponybai.com\/?p=3649#article","isPartOf":{"@id":"http:\/\/www.ponybai.com\/?p=3649"},"author":{"name":"ponybai","@id":"http:\/\/www.ponybai.com\/#\/schema\/person\/935c7592c850c65e1e5eba4530dbf883"},"headline":"Apex \u4ee3\u7801\u7248\u672c","datePublished":"2023-11-24T07:19:33+00:00","dateModified":"2023-11-21T07:24:18+00:00","mainEntityOfPage":{"@id":"http:\/\/www.ponybai.com\/?p=3649"},"wordCount":141,"publisher":{"@id":"http:\/\/www.ponybai.com\/#\/schema\/person\/935c7592c850c65e1e5eba4530dbf883"},"articleSection":["Apex \u5f00\u53d1\u4eba\u5458\u6307\u5357"],"inLanguage":"zh-Hans"},{"@type":"WebPage","@id":"http:\/\/www.ponybai.com\/?p=3649","url":"http:\/\/www.ponybai.com\/?p=3649","name":"Apex \u4ee3\u7801\u7248\u672c - \u767d\u767d\u968f\u7b14","isPartOf":{"@id":"http:\/\/www.ponybai.com\/#website"},"datePublished":"2023-11-24T07:19:33+00:00","dateModified":"2023-11-21T07:24:18+00:00","breadcrumb":{"@id":"http:\/\/www.ponybai.com\/?p=3649#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["http:\/\/www.ponybai.com\/?p=3649"]}]},{"@type":"BreadcrumbList","@id":"http:\/\/www.ponybai.com\/?p=3649#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"http:\/\/www.ponybai.com\/"},{"@type":"ListItem","position":2,"name":"Apex \u4ee3\u7801\u7248\u672c"}]},{"@type":"WebSite","@id":"http:\/\/www.ponybai.com\/#website","url":"http:\/\/www.ponybai.com\/","name":"\u767d\u767d\u968f\u7b14","description":"Salesforce\u5b98\u65b9\u8bb2\u5e08","publisher":{"@id":"http:\/\/www.ponybai.com\/#\/schema\/person\/935c7592c850c65e1e5eba4530dbf883"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"http:\/\/www.ponybai.com\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"zh-Hans"},{"@type":["Person","Organization"],"@id":"http:\/\/www.ponybai.com\/#\/schema\/person\/935c7592c850c65e1e5eba4530dbf883","name":"ponybai","image":{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"http:\/\/www.ponybai.com\/#\/schema\/person\/image\/","url":"http:\/\/www.ponybai.com\/wp-content\/uploads\/2025\/03\/cropped-Ihsans-WeChatQR.jpg","contentUrl":"http:\/\/www.ponybai.com\/wp-content\/uploads\/2025\/03\/cropped-Ihsans-WeChatQR.jpg","width":248,"height":248,"caption":"ponybai"},"logo":{"@id":"http:\/\/www.ponybai.com\/#\/schema\/person\/image\/"},"sameAs":["http:\/\/121.37.188.161"],"url":"http:\/\/www.ponybai.com\/?author=1"}]}},"_links":{"self":[{"href":"http:\/\/www.ponybai.com\/index.php?rest_route=\/wp\/v2\/posts\/3649","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/www.ponybai.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.ponybai.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.ponybai.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.ponybai.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=3649"}],"version-history":[{"count":1,"href":"http:\/\/www.ponybai.com\/index.php?rest_route=\/wp\/v2\/posts\/3649\/revisions"}],"predecessor-version":[{"id":3650,"href":"http:\/\/www.ponybai.com\/index.php?rest_route=\/wp\/v2\/posts\/3649\/revisions\/3650"}],"wp:attachment":[{"href":"http:\/\/www.ponybai.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=3649"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.ponybai.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=3649"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.ponybai.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=3649"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}