{"id":4243,"date":"2024-10-10T09:14:05","date_gmt":"2024-10-10T01:14:05","guid":{"rendered":"https:\/\/www.talktop.cn\/?p=4243"},"modified":"2024-11-12T10:18:30","modified_gmt":"2024-11-12T02:18:30","slug":"%e5%9f%ba%e4%ba%8emybatis%e5%92%8cmysql%e6%89%93%e9%80%a0%e9%ab%98%e6%95%88%e5%88%86%e5%b8%83%e5%bc%8f%e9%94%81%ef%bc%8c%e5%ae%9e%e7%8e%b0%e6%95%b0%e6%8d%ae%e4%b8%80%e8%87%b4%e6%80%a7","status":"publish","type":"post","link":"https:\/\/www.talktop.cn\/?p=4243","title":{"rendered":"\u57fa\u4e8eMySQL\u6253\u9020\u9ad8\u6548\u5206\u5e03\u5f0f\u9501\uff0c\u5b9e\u73b0\u6570\u636e\u4e00\u81f4\u6027"},"content":{"rendered":"\n<h5 class=\"wp-block-heading\"><strong>\u4e00\u3001\u57fa\u4e8e\u6570\u636e\u5e93\u5b9e\u73b0\u5206\u5e03\u5f0f\u9501<\/strong><\/h5>\n\n\n\n<p><strong>\uff081\uff09\u5229\u7528\u6570\u636e\u5e93\u884c\u7ea7\u9501\u5b9a\u529f\u80fd\u5b9e\u73b0\u60b2\u89c2\u9501<\/strong><\/p>\n\n\n\n<p>\u5728\u64cd\u4f5c\u6570\u636e\u671f\u95f4\uff0c\u901a\u8fc7select &#8230; for update\u8bed\u53e5\u9501\u5b9a\u6539\u884c\uff0c\u5176\u4ed6\u4e8b\u52a1\u65e0\u6cd5\u4fee\u6539\u3002\u9002\u7528\u4e8e\u9ad8\u5e76\u53d1\u5199\u64cd\u4f5c\u3001\u957f\u4e8b\u52a1\u5904\u7406\u3002<\/p>\n\n\n\n<p>inventory\u8868\u7ed3\u6784\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code has-white-color has-black-background-color has-text-color has-background has-link-color wp-elements-57faf755131161d35a4b3d4b6a637372\"><code>CREATE TABLE inventory (\n    id INT PRIMARY KEY,\n    product_name VARCHAR(100),\n    quantity INT,\n    updated_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP\n);<\/code><\/pre>\n\n\n\n<p>Mybatis\u5b9e\u73b0Mapper\u793a\u4f8b\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code has-white-color has-black-background-color has-text-color has-background has-link-color wp-elements-fe923d9b1a3c55dc2be1dfbb1ae19a20\"><code>import org.apache.ibatis.annotations.Mapper;\nimport org.apache.ibatis.annotations.Select;\nimport org.apache.ibatis.annotations.Update;\n\n@Mapper\npublic interface InventoryMapper {\n    \n    @Select(\"SELECT quantity FROM inventory WHERE id = #{id} FOR UPDATE\")\n    Integer selectForUpdate(int id);\n    \n    @Update(\"UPDATE inventory SET quantity = quantity - 1 WHERE id = #{id}\")\n    void decrementQuantity(int id);\n}<\/code><\/pre>\n\n\n\n<p>Service\u5c42\u52a0\u9501\u3001\u89e3\u9501\u793a\u4f8b\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code has-white-color has-black-background-color has-text-color has-background has-link-color wp-elements-898d2fe05a365a40b8565c72c08200d1\"><code>import org.springframework.beans.factory.annotation.Autowired;\nimport org.springframework.stereotype.Service;\nimport org.springframework.transaction.annotation.Transactional;\n\n@Service\npublic class InventoryService {\n\n    @Autowired\n    private InventoryMapper inventoryMapper;\n\n    @Transactional\n    public void updateInventory(int productId) {\n        \/\/ \u52a0\u9501\n        Integer quantity = inventoryMapper.selectForUpdate(productId);\n        \n        if (quantity != null &amp;&amp; quantity &gt; 0) {\n            \/\/ \u6263\u51cf\u5e93\u5b58\n            inventoryMapper.decrementQuantity(productId);\n            \/\/ \u63d0\u4ea4\u4e8b\u52a1\uff0c\u89e3\u9501\n        } else {\n            throw new RuntimeException(\"\u5e93\u5b58\u4e0d\u8db3\");\n        }\n    }\n}<\/code><\/pre>\n\n\n\n<p>\u4f7f\u7528\u4e86 @Transactional \u6ce8\u89e3\u6765\u7ba1\u7406\u4e8b\u52a1\u3002Spring \u4f1a\u5728\u65b9\u6cd5\u5f00\u59cb\u65f6\u5f00\u542f\u4e00\u4e2a\u4e8b\u52a1\uff0c\u6267\u884c\u7684 SQL \u8bed\u53e5\uff08\u5982SELECT &#8230; FOR UPDATE\uff09\u5c06\u4f1a\u5728\u8be5\u4e8b\u52a1\u4e2d\u88ab\u52a0\u9501\uff0c\u76f4\u5230\u4e8b\u52a1\u63d0\u4ea4\u6216\u5f02\u5e38\u56de\u6eda\u88ab\u89e3\u9501\u3002<\/p>\n\n\n\n<p><strong>\uff082\uff09\u901a\u8fc7\u9012\u589e\u7248\u672c\u53f7\u5b57\u6bb5\u5b9e\u73b0\u4e50\u89c2\u9501\u3002<\/strong><\/p>\n\n\n\n<p>\u5728\u6570\u636e\u8868\u4e2d\u589e\u52a0\u4e00\u4e2a\u7248\u672c\u53f7\u5b57\u6bb5\uff0c\u6bcf\u6b21\u66f4\u65b0\u65f6\u68c0\u67e5\u7248\u672c\u53f7\u662f\u5426\u4e00\u81f4\u3002\u7248\u672c\u53f7\u4e0d\u4e00\u81f4\u5219\u8868\u793a\u6709\u5176\u4ed6\u4e8b\u52a1\u4fee\u6539\u4e86\u8be5\u8bb0\u5f55\u3002\u9002\u7528\u4e8e\u8bfb\u591a\u5199\u5c11\u573a\u666f\u3002<\/p>\n\n\n\n<p>inventory\u8868\u7ed3\u6784\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code has-white-color has-black-background-color has-text-color has-background has-link-color wp-elements-0150545b91504e44761a3bb8feb44d43\"><code>CREATE TABLE inventory (\n    id INT PRIMARY KEY,\n    product_name VARCHAR(100),\n    quantity INT,\n    version INT DEFAULT 0, -- \u7248\u672c\u53f7\u5b57\u6bb5\n    updated_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP\n);<\/code><\/pre>\n\n\n\n<p>Mybatis\u5b9e\u73b0Mapper\u793a\u4f8b\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code has-white-color has-black-background-color has-text-color has-background has-link-color wp-elements-9dd62d178c8dbec8d25d86bd4ef48a63\"><code>import org.apache.ibatis.annotations.Mapper;\nimport org.apache.ibatis.annotations.Select;\nimport org.apache.ibatis.annotations.Update;\n\n@Mapper\npublic interface InventoryMapper {\n    \n    @Select(\"SELECT quantity, version FROM inventory WHERE id = #{id}\")\n    Inventory selectInventory(int id);\n    \n    @Update(\"UPDATE inventory SET quantity = quantity - 1, version = version + 1 WHERE id = #{id} AND version = #{version}\")\n    int decrementQuantity(int id, int version);\n}<\/code><\/pre>\n\n\n\n<p>Service\u5c42\u5b9e\u73b0\u4e50\u89c2\u9501\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code has-white-color has-black-background-color has-text-color has-background has-link-color wp-elements-e531c718ea01921f90a4594048d96d27\"><code>import org.springframework.beans.factory.annotation.Autowired;\nimport org.springframework.stereotype.Service;\nimport org.springframework.transaction.annotation.Transactional;\n\n@Service\npublic class InventoryService {\n\n    @Autowired\n    private InventoryMapper inventoryMapper;\n\n    @Transactional\n    public void updateInventory(int productId) {\n        \/\/ \u67e5\u8be2\u5e93\u5b58\u4fe1\u606f\n        Inventory inventory = inventoryMapper.selectInventory(productId);\n        \n        if (inventory != null &amp;&amp; inventory.getQuantity() &gt; 0) {\n            \/\/ \u6263\u51cf\u5e93\u5b58\n            int affectedRows = inventoryMapper.decrementQuantity(productId, inventory.getVersion());\n            if (affectedRows == 0) {\n                throw new RuntimeException(\"\u5e93\u5b58\u5df2\u88ab\u5176\u4ed6\u4e8b\u52a1\u4fee\u6539\uff0c\u8bf7\u91cd\u8bd5\");\n            }\n        } else {\n            throw new RuntimeException(\"\u5e93\u5b58\u4e0d\u8db3\");\n        }\n    }\n}<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>\u4e00\u3001\u57fa\u4e8e\u6570\u636e\u5e93\u5b9e\u73b0\u5206\u5e03\u5f0f\u9501 \uff081\uff09\u5229\u7528\u6570\u636e\u5e93\u884c\u7ea7\u9501\u5b9a\u529f\u80fd\u5b9e\u73b0\u60b2\u89c2\u9501 \u5728\u64cd\u4f5c\u6570\u636e\u671f\u95f4\uff0c\u901a\u8fc7select &#038;#82 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[118],"tags":[186,16],"class_list":["post-4243","post","type-post","status-publish","format-standard","hentry","category-118","tag-186","tag-java"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v23.8 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>\u57fa\u4e8eMySQL\u6253\u9020\u9ad8\u6548\u5206\u5e03\u5f0f\u9501\uff0c\u5b9e\u73b0\u6570\u636e\u4e00\u81f4\u6027<\/title>\n<meta name=\"description\" content=\"\u5229\u7528\u6570\u636e\u5e93\u884c\u7ea7\u9501\u5b9a\u529f\u80fd\u5b9e\u73b0\u60b2\u89c2\u9501\uff0c\u5728\u64cd\u4f5c\u6570\u636e\u671f\u95f4\uff0c\u901a\u8fc7select ... for update\u8bed\u53e5\u9501\u5b9a\u6539\u884c\uff0c\u5176\u4ed6\u4e8b\u52a1\u65e0\u6cd5\u4fee\u6539\u3002\u9002\u7528\u4e8e\u9ad8\u5e76\u53d1\u5199\u64cd\u4f5c\u3001\u957f\u4e8b\u52a1\u5904\u7406\u3002\" \/>\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.talktop.cn\/?p=4243\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.talktop.cn\/?p=4243#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.talktop.cn\/?p=4243\"},\"author\":{\"name\":\"AI\u98ce\u5411\u6807\",\"@id\":\"https:\/\/www.talktop.cn\/#\/schema\/person\/25908db5f654913a22bc38d48fad71ab\"},\"headline\":\"\u57fa\u4e8eMySQL\u6253\u9020\u9ad8\u6548\u5206\u5e03\u5f0f\u9501\uff0c\u5b9e\u73b0\u6570\u636e\u4e00\u81f4\u6027\",\"datePublished\":\"2024-10-10T01:14:05+00:00\",\"dateModified\":\"2024-11-12T02:18:30+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.talktop.cn\/?p=4243\"},\"wordCount\":18,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/www.talktop.cn\/#\/schema\/person\/25908db5f654913a22bc38d48fad71ab\"},\"keywords\":[\"\u5206\u5e03\u5f0f\u9501\",\"\u7f16\u7a0b\"],\"articleSection\":[\"\u540e\u7aef\u5f00\u53d1\"],\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.talktop.cn\/?p=4243#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.talktop.cn\/?p=4243\",\"url\":\"https:\/\/www.talktop.cn\/?p=4243\",\"name\":\"\u57fa\u4e8eMySQL\u6253\u9020\u9ad8\u6548\u5206\u5e03\u5f0f\u9501\uff0c\u5b9e\u73b0\u6570\u636e\u4e00\u81f4\u6027\",\"isPartOf\":{\"@id\":\"https:\/\/www.talktop.cn\/#website\"},\"datePublished\":\"2024-10-10T01:14:05+00:00\",\"dateModified\":\"2024-11-12T02:18:30+00:00\",\"description\":\"\u5229\u7528\u6570\u636e\u5e93\u884c\u7ea7\u9501\u5b9a\u529f\u80fd\u5b9e\u73b0\u60b2\u89c2\u9501\uff0c\u5728\u64cd\u4f5c\u6570\u636e\u671f\u95f4\uff0c\u901a\u8fc7select ... for update\u8bed\u53e5\u9501\u5b9a\u6539\u884c\uff0c\u5176\u4ed6\u4e8b\u52a1\u65e0\u6cd5\u4fee\u6539\u3002\u9002\u7528\u4e8e\u9ad8\u5e76\u53d1\u5199\u64cd\u4f5c\u3001\u957f\u4e8b\u52a1\u5904\u7406\u3002\",\"breadcrumb\":{\"@id\":\"https:\/\/www.talktop.cn\/?p=4243#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.talktop.cn\/?p=4243\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.talktop.cn\/?p=4243#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.talktop.cn\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"\u57fa\u4e8eMySQL\u6253\u9020\u9ad8\u6548\u5206\u5e03\u5f0f\u9501\uff0c\u5b9e\u73b0\u6570\u636e\u4e00\u81f4\u6027\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.talktop.cn\/#website\",\"url\":\"https:\/\/www.talktop.cn\/\",\"name\":\"AI\u98ce\u5411\u6807\",\"description\":\"ChatGPT \u4eba\u5de5\u667a\u80fd \u7f16\u7a0b\u6280\u672f AIGC \u540e\u7aef\u6280\u672f \u524d\u7aef\u6280\u672f \u70ed\u95e8\u63d2\u4ef6 \u8fd0\u8425\u76f8\u5173 ChatGPT\u8ba2\u9605 Claude\u5145\u503c \u6d77\u5916\u5145\u503c \u8c37\u6b4c\u90ae\u7bb1\",\"publisher\":{\"@id\":\"https:\/\/www.talktop.cn\/#\/schema\/person\/25908db5f654913a22bc38d48fad71ab\"},\"alternateName\":\"AI\u98ce\u5411\u6807\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.talktop.cn\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"zh-Hans\"},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"https:\/\/www.talktop.cn\/#\/schema\/person\/25908db5f654913a22bc38d48fad71ab\",\"name\":\"AI\u98ce\u5411\u6807\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.talktop.cn\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/www.talktop.cn\/wp-content\/uploads\/2023\/10\/cropped-f09060ba975518b80d3b0b63b47108a6.jpeg\",\"contentUrl\":\"https:\/\/www.talktop.cn\/wp-content\/uploads\/2023\/10\/cropped-f09060ba975518b80d3b0b63b47108a6.jpeg\",\"width\":512,\"height\":512,\"caption\":\"AI\u98ce\u5411\u6807\"},\"logo\":{\"@id\":\"https:\/\/www.talktop.cn\/#\/schema\/person\/image\/\"},\"sameAs\":[\"http:\/\/\/\"]}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"\u57fa\u4e8eMySQL\u6253\u9020\u9ad8\u6548\u5206\u5e03\u5f0f\u9501\uff0c\u5b9e\u73b0\u6570\u636e\u4e00\u81f4\u6027","description":"\u5229\u7528\u6570\u636e\u5e93\u884c\u7ea7\u9501\u5b9a\u529f\u80fd\u5b9e\u73b0\u60b2\u89c2\u9501\uff0c\u5728\u64cd\u4f5c\u6570\u636e\u671f\u95f4\uff0c\u901a\u8fc7select ... for update\u8bed\u53e5\u9501\u5b9a\u6539\u884c\uff0c\u5176\u4ed6\u4e8b\u52a1\u65e0\u6cd5\u4fee\u6539\u3002\u9002\u7528\u4e8e\u9ad8\u5e76\u53d1\u5199\u64cd\u4f5c\u3001\u957f\u4e8b\u52a1\u5904\u7406\u3002","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.talktop.cn\/?p=4243","schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.talktop.cn\/?p=4243#article","isPartOf":{"@id":"https:\/\/www.talktop.cn\/?p=4243"},"author":{"name":"AI\u98ce\u5411\u6807","@id":"https:\/\/www.talktop.cn\/#\/schema\/person\/25908db5f654913a22bc38d48fad71ab"},"headline":"\u57fa\u4e8eMySQL\u6253\u9020\u9ad8\u6548\u5206\u5e03\u5f0f\u9501\uff0c\u5b9e\u73b0\u6570\u636e\u4e00\u81f4\u6027","datePublished":"2024-10-10T01:14:05+00:00","dateModified":"2024-11-12T02:18:30+00:00","mainEntityOfPage":{"@id":"https:\/\/www.talktop.cn\/?p=4243"},"wordCount":18,"commentCount":0,"publisher":{"@id":"https:\/\/www.talktop.cn\/#\/schema\/person\/25908db5f654913a22bc38d48fad71ab"},"keywords":["\u5206\u5e03\u5f0f\u9501","\u7f16\u7a0b"],"articleSection":["\u540e\u7aef\u5f00\u53d1"],"inLanguage":"zh-Hans","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.talktop.cn\/?p=4243#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.talktop.cn\/?p=4243","url":"https:\/\/www.talktop.cn\/?p=4243","name":"\u57fa\u4e8eMySQL\u6253\u9020\u9ad8\u6548\u5206\u5e03\u5f0f\u9501\uff0c\u5b9e\u73b0\u6570\u636e\u4e00\u81f4\u6027","isPartOf":{"@id":"https:\/\/www.talktop.cn\/#website"},"datePublished":"2024-10-10T01:14:05+00:00","dateModified":"2024-11-12T02:18:30+00:00","description":"\u5229\u7528\u6570\u636e\u5e93\u884c\u7ea7\u9501\u5b9a\u529f\u80fd\u5b9e\u73b0\u60b2\u89c2\u9501\uff0c\u5728\u64cd\u4f5c\u6570\u636e\u671f\u95f4\uff0c\u901a\u8fc7select ... for update\u8bed\u53e5\u9501\u5b9a\u6539\u884c\uff0c\u5176\u4ed6\u4e8b\u52a1\u65e0\u6cd5\u4fee\u6539\u3002\u9002\u7528\u4e8e\u9ad8\u5e76\u53d1\u5199\u64cd\u4f5c\u3001\u957f\u4e8b\u52a1\u5904\u7406\u3002","breadcrumb":{"@id":"https:\/\/www.talktop.cn\/?p=4243#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.talktop.cn\/?p=4243"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.talktop.cn\/?p=4243#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.talktop.cn\/"},{"@type":"ListItem","position":2,"name":"\u57fa\u4e8eMySQL\u6253\u9020\u9ad8\u6548\u5206\u5e03\u5f0f\u9501\uff0c\u5b9e\u73b0\u6570\u636e\u4e00\u81f4\u6027"}]},{"@type":"WebSite","@id":"https:\/\/www.talktop.cn\/#website","url":"https:\/\/www.talktop.cn\/","name":"AI\u98ce\u5411\u6807","description":"ChatGPT \u4eba\u5de5\u667a\u80fd \u7f16\u7a0b\u6280\u672f AIGC \u540e\u7aef\u6280\u672f \u524d\u7aef\u6280\u672f \u70ed\u95e8\u63d2\u4ef6 \u8fd0\u8425\u76f8\u5173 ChatGPT\u8ba2\u9605 Claude\u5145\u503c \u6d77\u5916\u5145\u503c \u8c37\u6b4c\u90ae\u7bb1","publisher":{"@id":"https:\/\/www.talktop.cn\/#\/schema\/person\/25908db5f654913a22bc38d48fad71ab"},"alternateName":"AI\u98ce\u5411\u6807","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.talktop.cn\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"zh-Hans"},{"@type":["Person","Organization"],"@id":"https:\/\/www.talktop.cn\/#\/schema\/person\/25908db5f654913a22bc38d48fad71ab","name":"AI\u98ce\u5411\u6807","image":{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.talktop.cn\/#\/schema\/person\/image\/","url":"https:\/\/www.talktop.cn\/wp-content\/uploads\/2023\/10\/cropped-f09060ba975518b80d3b0b63b47108a6.jpeg","contentUrl":"https:\/\/www.talktop.cn\/wp-content\/uploads\/2023\/10\/cropped-f09060ba975518b80d3b0b63b47108a6.jpeg","width":512,"height":512,"caption":"AI\u98ce\u5411\u6807"},"logo":{"@id":"https:\/\/www.talktop.cn\/#\/schema\/person\/image\/"},"sameAs":["http:\/\/\/"]}]}},"_links":{"self":[{"href":"https:\/\/www.talktop.cn\/index.php?rest_route=\/wp\/v2\/posts\/4243","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.talktop.cn\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.talktop.cn\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.talktop.cn\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.talktop.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=4243"}],"version-history":[{"count":0,"href":"https:\/\/www.talktop.cn\/index.php?rest_route=\/wp\/v2\/posts\/4243\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.talktop.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=4243"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.talktop.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=4243"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.talktop.cn\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=4243"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}