{"id":1030,"date":"2025-11-26T08:16:16","date_gmt":"2025-11-26T00:16:16","guid":{"rendered":"http:\/\/www.preluna.xyz\/?p=1030"},"modified":"2025-11-27T15:18:45","modified_gmt":"2025-11-27T07:18:45","slug":"getwpmore","status":"publish","type":"post","link":"http:\/\/www.preluna.xyz\/index.php\/2025\/11\/26\/getwpmore\/preluna\/technology\/career-skills\/tech-writing\/","title":{"rendered":"\u7f51\u9875\u63d0\u53d6\u7684\u8fdb\u4e00\u6b65\u4f18\u5316"},"content":{"rendered":"\n<h2 class=\"wp-block-heading\">\u91cd\u65b0\u8bbe\u8ba1\u5de5\u4f5c\u6d41\u7a0b\uff1a\u4ece\u83b7\u53d6\u5143\u6570\u636e\u5230\u6570\u636e\u5bf9\u6bd4<\/h2>\n\n\n\n<p>\u76f4\u63a5\u4eceWordPress\u83b7\u53d6\u7684\u5143\u6570\u636e\u4e0d\u80fd\u76f4\u63a5\u7528\u4e8e\u5bf9\u6bd4\uff0c\u9700\u8981\u5148\u4e0e\u6570\u636e\u5e93\u4e2d\u7684\u8bb0\u5f55\u8fdb\u884c\u5173\u8054\u3002\u91cd\u65b0\u8bbe\u8ba1\u8fd9\u4e2a\u5173\u952e\u73af\u8282\u3002<\/p>\n\n\n\n<p><strong>\u91cd\u65b0\u8bbe\u8ba1\u7684\u5de5\u4f5c\u6d41\u7a0b<\/strong><\/p>\n\n\n\n<p>[\u83b7\u53d6WordPress\u5143\u6570\u636e] \u2192 [\u83b7\u53d6\u6570\u636e\u5e93\u8bb0\u5f55] \u2192 [\u6570\u636e\u5173\u8054\u4e0e\u5bf9\u6bd4] \u2192 [\u53d8\u66f4\u68c0\u6d4b] \u2192 [\u5206\u652f\u5904\u7406]<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">\u5177\u4f53\u5b9e\u73b0\u6b65\u9aa4<\/h3>\n\n\n\n<h4 class=\"wp-block-heading\"><strong>\u6b65\u9aa41\uff1a\u83b7\u53d6WordPress\u6587\u7ae0\u5143\u6570\u636e<\/strong><\/h4>\n\n\n\n<p><strong>HTTP Request \u8282\u70b9\u914d\u7f6e<\/strong>\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>\/\/ \u83b7\u53d6WordPress\u6587\u7ae0\u5217\u8868\uff08\u4ec5\u5143\u6570\u636e\uff09\n- URL: https:\/\/\u4f60\u7684\u535a\u5ba2.com\/wp-json\/wp\/v2\/posts\n- \u65b9\u6cd5: GET\n- \u53c2\u6570:\n  ?per_page=100\n  &amp;orderby=modified\n  &amp;order=desc\n  &amp;_fields=id,slug,modified,title<\/code><\/pre>\n\n\n\n<p>\u5982\u679c\u51fa\u73b0\u95ee\u9898:\u660e\u660e\u8282\u70b9\u6267\u884c\u6210\u529f\uff0c\u4f46\u662f\u6ca1\u6709\u4efb\u4f55\u8fd4\u56de\u7ed3\u679c\uff0c\u8ddf\u636eget\u8bf7\u6c42,\u76f4\u63a5\u5c06\u8bf7\u6c42\u53c2\u6570\u5408\u5e76\u5230url\u4e2d:<a href=\"http:\/\/www.preluna.xyz\/wp-json\/wp\/v2\/posts?per_page=10&amp;orderby=modified&amp;order=desc&amp;_fields=id,title,slug,modified&amp;_**cacheBuster={{**Date.now()**}}*\">http:\/\/www.preluna.xyz\/wp-json\/wp\/v2\/posts?per_page=10&amp;orderby=modified&amp;order=desc&amp;_fields=id,title,slug,modified&amp;_**cacheBuster={{**Date.now()**}}*<\/a><\/p>\n\n\n\n<p><strong>\u8f93\u51fa\u6570\u636e\u7ed3\u6784<\/strong>\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&#91;\n  {\n    \"id\": 123,                    \/\/ \u2192 wp_post_id\n    \"slug\": \"my-first-post\",      \/\/ \u2192 slug\n    \"modified\": \"2024-01-15T10:30:00\", \/\/ \u2192 last_modified\n    \"title\": {\"rendered\": \"\u6211\u7684\u7b2c\u4e00\u7bc7\u6587\u7ae0\"} \/\/ \u2192 title\n  },\n  \/\/ ... \u66f4\u591a\u6587\u7ae0\n]<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image size-full\"><div class='fancybox-wrapper lazyload-container-unload' data-fancybox='post-images' href='http:\/\/www.preluna.xyz\/wp-content\/uploads\/2025\/11\/\u7f51\u9875\u63d0\u53d6\u7684\u8fdb\u4e00\u6b65\u4f18\u53161.png'><img class=\"lazyload lazyload-style-1\" src=\"data:image\/svg+xml;base64,PCEtLUFyZ29uTG9hZGluZy0tPgo8c3ZnIHdpZHRoPSIxIiBoZWlnaHQ9IjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgc3Ryb2tlPSIjZmZmZmZmMDAiPjxnPjwvZz4KPC9zdmc+\"  loading=\"lazy\" decoding=\"async\" width=\"1019\" height=\"848\" data-original=\"http:\/\/www.preluna.xyz\/wp-content\/uploads\/2025\/11\/\u7f51\u9875\u63d0\u53d6\u7684\u8fdb\u4e00\u6b65\u4f18\u53161.png\" src=\"data:image\/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsQAAA7EAZUrDhsAAAANSURBVBhXYzh8+PB\/AAffA0nNPuCLAAAAAElFTkSuQmCC\" alt=\"\" class=\"wp-image-1035\"  sizes=\"auto, (max-width: 1019px) 100vw, 1019px\" \/><\/div><\/figure>\n\n\n\n<figure class=\"wp-block-image size-full\"><div class='fancybox-wrapper lazyload-container-unload' data-fancybox='post-images' href='http:\/\/www.preluna.xyz\/wp-content\/uploads\/2025\/11\/\u7f51\u9875\u63d0\u53d6\u7684\u8fdb\u4e00\u6b65\u4f18\u53162.png'><img class=\"lazyload lazyload-style-1\" src=\"data:image\/svg+xml;base64,PCEtLUFyZ29uTG9hZGluZy0tPgo8c3ZnIHdpZHRoPSIxIiBoZWlnaHQ9IjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgc3Ryb2tlPSIjZmZmZmZmMDAiPjxnPjwvZz4KPC9zdmc+\"  loading=\"lazy\" decoding=\"async\" width=\"1002\" height=\"909\" data-original=\"http:\/\/www.preluna.xyz\/wp-content\/uploads\/2025\/11\/\u7f51\u9875\u63d0\u53d6\u7684\u8fdb\u4e00\u6b65\u4f18\u53162.png\" src=\"data:image\/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsQAAA7EAZUrDhsAAAANSURBVBhXYzh8+PB\/AAffA0nNPuCLAAAAAElFTkSuQmCC\" alt=\"\" class=\"wp-image-1036\"  sizes=\"auto, (max-width: 1002px) 100vw, 1002px\" \/><\/div><\/figure>\n\n\n\n<p><strong><em>\u9644:\u53c2\u6570\u67e5\u8be2\u7684\u8bbe\u8ba1<\/em><\/strong><\/p>\n\n\n\n<p>\u8fd9\u91cc\u7684\u53c2\u6570\u67e5\u8be2\uff0c\u5e94\u8be5\u4e0e\u81ea\u5df1\u7684\u6570\u636e\u5e93\u76f8\u5173\uff0c\u6ca1\u5fc5\u8981\u67e5\u8be2\u4e00\u4e9b\u6beb\u65e0\u610f\u4e49\u7684\u53c2\u6570<\/p>\n\n\n\n<p><strong><em>\u6570\u636e\u5e93\u521d\u59cb\u5316<\/em><\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>-- \u4f18\u5316\u540e\u7684\u6587\u7ae0\u8868\nCREATE TABLE IF NOT EXISTS articles (\n    id INT AUTO_INCREMENT PRIMARY KEY,\n    wp_post_id INT UNIQUE NOT NULL,           -- WordPress\u6587\u7ae0ID\n    slug VARCHAR(255) NOT NULL,               -- \u6587\u7ae0\u522b\u540d\n    last_modified TIMESTAMP NOT NULL,         -- \u6700\u540e\u4fee\u6539\u65f6\u95f4\n    title TEXT,                               -- \u6587\u7ae0\u6807\u9898\uff08\u7528\u4e8e\u663e\u793a\uff09\n    \n    -- \u7d22\u5f15\u4f18\u5316\n    INDEX idx_wp_post_id (wp_post_id),\n    INDEX idx_slug (slug),\n    INDEX idx_last_modified (last_modified)\n);<\/code><\/pre>\n\n\n\n<p>\u6267\u884c\u540e\u521b\u5efa\u7684\u8868,<strong>\u53ea\u67091\u4e2a\u8868<\/strong>&nbsp;&#8211;&nbsp;articles&nbsp;\u8868<\/p>\n\n\n\n<p>\u4e3b\u8981\u5b58\u50a8\u5b57\u6bb5\uff1a<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>id&nbsp;&#8211; \u4e3b\u952e\u6807\u8bc6<\/li>\n\n\n\n<li>wp_post_id&nbsp;&#8211; WordPress\u6587\u7ae0\u5173\u8054ID<\/li>\n\n\n\n<li>slug&nbsp;&#8211; \u6587\u7ae0\u522b\u540d\uff08\u7528\u4e8eURL\uff09<\/li>\n\n\n\n<li>last_modified&nbsp;&#8211; \u6700\u540e\u4fee\u6539\u65f6\u95f4<\/li>\n\n\n\n<li>title&nbsp;&#8211; \u6587\u7ae0\u6807\u9898<\/li>\n<\/ol>\n\n\n\n<h4 class=\"wp-block-heading\"><strong>\u6b65\u9aa42\uff1a\u83b7\u53d6\u6570\u636e\u5e93\u73b0\u6709\u8bb0\u5f55<\/strong><\/h4>\n\n\n\n<p><strong>MySQL \u8282\u70b9\u914d\u7f6e<\/strong>\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>-- \u53ea\u83b7\u53d6\u5fc5\u8981\u7684\u5bf9\u6bd4\u5b57\u6bb5\nSELECT \n    id,\n    wp_post_id,\n    slug, \n    last_modified\nFROM articles \nWHERE is_deleted = 0;<\/code><\/pre>\n\n\n\n<p><strong>\u8f93\u51fa\u6570\u636e\u7ed3\u6784<\/strong>\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&#91;\n  {\n    \"id\": 1,\n    \"wp_post_id\": 123,\n    \"slug\": \"my-first-post\", \n    \"last_modified\": \"2024-01-14T15:20:00\"\n  },\n  \/\/ ... \u66f4\u591a\u8bb0\u5f55\n]<\/code><\/pre>\n\n\n\n<h4 class=\"wp-block-heading\">\u6b65\u9aa43\uff1a\u5feb\u901f\u6570\u636e\u5bf9\u6bd4\uff08\u7b80\u5316\u7248\uff09<\/h4>\n\n\n\n<p><strong>Code \u8282\u70b9 &#8211; \u7cbe\u7b80\u5bf9\u6bd4\u903b\u8f91<\/strong>\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>\/\/ \u83b7\u53d6\u4e24\u4e2a\u6570\u636e\u6e90\nconst wpArticles = $input&#91;0].json; \/\/ WordPress\u6570\u636e\nconst dbArticles = $input&#91;1].json; \/\/ \u6570\u636e\u5e93\u6570\u636e\n\n\/\/ \u521b\u5efa\u6570\u636e\u5e93\u6587\u7ae0\u7684\u5feb\u901f\u67e5\u627e\u6620\u5c04\nconst dbMap = new Map();\ndbArticles.forEach(dbArticle =&gt; {\n  dbMap.set(dbArticle.wp_post_id, dbArticle);\n});\n\n\/\/ \u6267\u884c\u5feb\u901f\u5bf9\u6bd4\nconst changes = {\n  to_process: &#91;], \/\/ \u9700\u8981\u5904\u7406\u7684\u65b0\u589e\u548c\u66f4\u65b0\u6587\u7ae0\n  to_delete: &#91;]   \/\/ \u9700\u8981\u5220\u9664\u7684\u6587\u7ae0\n};\n\n\/\/ \u5904\u7406WordPress\u4e2d\u7684\u6587\u7ae0\nwpArticles.forEach(wpArticle =&gt; {\n  const wpId = wpArticle.id;\n  const dbArticle = dbMap.get(wpId);\n  \n  if (!dbArticle) {\n    \/\/ \u65b0\u589e\u6587\u7ae0\n    changes.to_process.push({\n      wp_post_id: wpId,\n      slug: wpArticle.slug,\n      last_modified: wpArticle.modified,\n      title: wpArticle.title.rendered,\n      change_type: 'new'\n    });\n  } else {\n    const wpModified = new Date(wpArticle.modified);\n    const dbModified = new Date(dbArticle.last_modified);\n    \n    if (wpModified &gt; dbModified) {\n      \/\/ \u66f4\u65b0\u6587\u7ae0\n      changes.to_process.push({\n        wp_post_id: wpId,\n        slug: wpArticle.slug,\n        last_modified: wpArticle.modified,\n        title: wpArticle.title.rendered,\n        change_type: 'updated',\n        db_id: dbArticle.id\n      });\n    }\n    \/\/ \u79fb\u9664\u5df2\u5904\u7406\u7684\u8bb0\u5f55\n    dbMap.delete(wpId);\n  }\n});\n\n\/\/ \u5269\u4f59\u5728dbMap\u4e2d\u7684\u5c31\u662f\u9700\u8981\u5220\u9664\u7684\u6587\u7ae0\ndbMap.forEach((dbArticle, wpId) =&gt; {\n  changes.to_delete.push({\n    wp_post_id: wpId,\n    slug: dbArticle.slug,\n    db_id: dbArticle.id,\n    change_type: 'deleted'\n  });\n});\n\n\/\/ \u6dfb\u52a0\u7b80\u5355\u7edf\u8ba1\nchanges.stats = {\n  total_wordpress: wpArticles.length,\n  total_database: dbArticles.length,\n  to_process: changes.to_process.length,\n  to_delete: changes.to_delete.length\n};\n\nreturn &#91;changes];<\/code><\/pre>\n\n\n\n<p><strong><em>&nbsp;\u6570\u636e\u51c6\u5907\u9636\u6bb5<\/em><\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>\/\/ \u521b\u5efa\u6570\u636e\u5e93\u6587\u7ae0\u7684\u5feb\u901f\u67e5\u627e\u6620\u5c04\nconst dbMap = new Map();\ndbArticles.forEach(dbArticle =&gt; {\n  dbMap.set(dbArticle.wp_post_id, dbArticle);\n});<\/code><\/pre>\n\n\n\n<p><strong>\u76ee\u7684\uff1a<\/strong>\u5c06\u6570\u636e\u5e93\u8bb0\u5f55\u8f6c\u6362\u4e3a\u4ee5 wp_post_id \u4e3a\u952e\u7684 Map\uff0c\u5b9e\u73b0 O(1) \u65f6\u95f4\u590d\u6742\u5ea6\u7684\u67e5\u627e<\/p>\n\n\n\n<p><strong><em>\u6838\u5fc3\u5bf9\u6bd4\u903b\u8f91<\/em><\/strong><\/p>\n\n\n\n<p><strong>\u65b0\u589e\u6587\u7ae0\u68c0\u6d4b\uff1a<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>if (!dbArticle) {\n  \/\/ WordPress\u6709\u4f46\u6570\u636e\u5e93\u6ca1\u6709 \u2192 \u65b0\u589e\n  changes.to_process.push({\n    change_type: 'new'\n  });\n}<\/code><\/pre>\n\n\n\n<p><strong>\u66f4\u65b0\u6587\u7ae0\u68c0\u6d4b\uff1a<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>if (wpModified &gt; dbModified) {\n  \/\/ WordPress\u4fee\u6539\u65f6\u95f4\u66f4\u665a \u2192 \u66f4\u65b0\n  changes.to_process.push({\n    change_type: 'updated'\n  });\n}<\/code><\/pre>\n\n\n\n<p><strong>\u5220\u9664\u6587\u7ae0\u68c0\u6d4b\uff1a<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>\/\/ \u5904\u7406\u5b8cWordPress\u6587\u7ae0\u540e\uff0cdbMap\u4e2d\u5269\u4f59\u7684\u8bb0\u5f55\ndbMap.forEach((dbArticle, wpId) =&gt; {\n  changes.to_delete.push({\n    change_type: 'deleted'\n  });\n});<\/code><\/pre>\n\n\n\n<p>\u901a\u8fc7&nbsp;dbMap.delete(wpId)&nbsp;\u9010\u6b65\u79fb\u9664\u5df2\u5b58\u5728\u7684\u8bb0\u5f55\uff0c\u5269\u4e0b\u7684\u5c31\u662f\u9700\u8981\u5220\u9664\u7684<\/p>\n\n\n\n<p><strong>\u8f93\u51fa\u6570\u636e\u7ed3\u6784<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>{\n  to_process: &#91;    \/\/ \u9700\u8981\u5904\u7406\u7684\u6587\u7ae0\uff08\u65b0\u589e+\u66f4\u65b0\uff09\n    {\n      wp_post_id: number,    \/\/ WordPress ID\n      slug: string,          \/\/ \u6587\u7ae0\u522b\u540d\n      last_modified: string, \/\/ \u4fee\u6539\u65f6\u95f4\n      title: string,         \/\/ \u6587\u7ae0\u6807\u9898\n      change_type: 'new'|'updated',\n      db_id?: number         \/\/ \u4ec5\u66f4\u65b0\u65f6\u6709\uff0c\u6570\u636e\u5e93\u4e3b\u952eID\n    }\n  ],\n  to_delete: &#91;     \/\/ \u9700\u8981\u5220\u9664\u7684\u6587\u7ae0\n    {\n      wp_post_id: number,\n      slug: string,\n      db_id: number,         \/\/ \u6570\u636e\u5e93\u4e3b\u952eID\n      change_type: 'deleted'\n    }\n  ],\n  stats: {         \/\/ \u7edf\u8ba1\u4fe1\u606f\n    total_wordpress: number,\n    total_database: number,\n    to_process: number,\n    to_delete: number\n  }\n}<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">\u53ef\u7b80\u5355\u7684\u65b9\u6cd5(\u53ef\u9009)<\/h2>\n\n\n\n<p>\u5f53\u7136\u4ee5\u4e0a\u770b\u4e0d\u61c2\u4e5f\u4e0d\u8981\u7d27\uff0c\u5982\u679c\u4f60\u8bf4n8n\u7684\u8f93\u5165\u8f93\u51fa\u7ed3\u6784\u592a\u8fc7\u4e8e\u4e25\u82db\u4e5f\u4e0d\u8981\u7d27\u3002\u6211\u8fd8\u6709\u4e00\u4e2a\u66f4\u52a0\u7b80\u5355\u7684\u65b9\u6cd5\uff0c\u5f53\u7136\u529f\u80fd\u6027\u548c\u6269\u5c55\u6027\uff0c\u53ef\u8bfb\u6027\u90fd\u4f1a\u53d7\u5230\u5927\u5927\u7684\u51cf\u5c11\uff0c\u4f46\u662f\u81f3\u5c11\u53ef\u4ee5\u4fdd\u8bc1\u4f60\u6574\u4e2a\u6d41\u7a0b\u80fd\u52c9\u5f3a\u7684\u8fd0\u884c\u3002<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><div class='fancybox-wrapper lazyload-container-unload' data-fancybox='post-images' href='http:\/\/www.preluna.xyz\/wp-content\/uploads\/2025\/11\/getwpmore-10-1024x334.png'><img class=\"lazyload lazyload-style-1\" src=\"data:image\/svg+xml;base64,PCEtLUFyZ29uTG9hZGluZy0tPgo8c3ZnIHdpZHRoPSIxIiBoZWlnaHQ9IjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgc3Ryb2tlPSIjZmZmZmZmMDAiPjxnPjwvZz4KPC9zdmc+\"  loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"334\" data-original=\"http:\/\/www.preluna.xyz\/wp-content\/uploads\/2025\/11\/getwpmore-10-1024x334.png\" src=\"data:image\/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsQAAA7EAZUrDhsAAAANSURBVBhXYzh8+PB\/AAffA0nNPuCLAAAAAElFTkSuQmCC\" alt=\"\" class=\"wp-image-1047\"  sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/div><\/figure>\n\n\n\n<p>\u5148\u6309\u7740\u56fe\u7247\u642d\u5efa\u8282\u70b9\uff0c\u5e76\u8fde\u7ebf\uff0c\u7136\u540e\u518d\u5f80\u91cc\u9762\u8f93\u5165\u5177\u4f53\u4ee3\u7801\uff0c\u6ce8\u610f\u8282\u70b9\u4e4b\u95f4\u7684\u8f93\u5165\u7aef\uff0c\u8fd9\u91cc\u9762\u4e00\u4e2a\u90fd\u4e0d\u80fd\u9519\u3002\uff08\u5df2\u7ecf\u975e\u5e38\u7b80\u5316\u4e86\uff0c\u603b\u4e0d\u80fd\u8fd8\u4e0d\u4f1a\u5427\uff09<\/p>\n\n\n\n<p><strong><em>\u91cd\u7f6e\u6570\u636e\u8868<\/em><\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>DROP TABLE IF EXISTS articles;\nCREATE TABLE articles (\n    slug VARCHAR(255) PRIMARY KEY,\n    modified TIMESTAMP NOT NULL,\n    INDEX idx_slug (slug),\n    INDEX idx_last_modified (modified)\n);<\/code><\/pre>\n\n\n\n<p><strong><em>\u5728\u5de5\u4f5c\u6d41\u5f00\u59cb\u65f6\u9a8c\u8bc1\u8868\u7ed3\u6784<\/em><\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>SELECT \n    CASE \n        WHEN COUNT(*) = 2 THEN '\u8868\u7ed3\u6784\u6b63\u786e'\n        ELSE '\u8868\u7ed3\u6784\u9519\u8bef\uff0c\u671f\u671b2\u4e2a\u5b57\u6bb5\u4f46\u627e\u5230' || COUNT(*) || '\u4e2a'\n    END as validation_result\nFROM INFORMATION_SCHEMA.COLUMNS \nWHERE TABLE_SCHEMA = 'article_system' \nAND TABLE_NAME = 'articles'\nAND COLUMN_NAME IN ('slug', 'modified');<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image size-large\"><div class='fancybox-wrapper lazyload-container-unload' data-fancybox='post-images' href='http:\/\/www.preluna.xyz\/wp-content\/uploads\/2025\/11\/getwpmore-2-1024x435.png'><img class=\"lazyload lazyload-style-1\" src=\"data:image\/svg+xml;base64,PCEtLUFyZ29uTG9hZGluZy0tPgo8c3ZnIHdpZHRoPSIxIiBoZWlnaHQ9IjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgc3Ryb2tlPSIjZmZmZmZmMDAiPjxnPjwvZz4KPC9zdmc+\"  loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"435\" data-original=\"http:\/\/www.preluna.xyz\/wp-content\/uploads\/2025\/11\/getwpmore-2-1024x435.png\" src=\"data:image\/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsQAAA7EAZUrDhsAAAANSURBVBhXYzh8+PB\/AAffA0nNPuCLAAAAAElFTkSuQmCC\" alt=\"\" class=\"wp-image-1039\"  sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/div><\/figure>\n\n\n\n<p><strong><em>\u7b2c1\u6b21\u62c9\u53d6\u6570\u636e\u5e93<\/em><\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>SELECT slug, modified FROM articles;\n<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image size-full\"><div class='fancybox-wrapper lazyload-container-unload' data-fancybox='post-images' href='http:\/\/www.preluna.xyz\/wp-content\/uploads\/2025\/11\/getwpmore-3.png'><img class=\"lazyload lazyload-style-1\" src=\"data:image\/svg+xml;base64,PCEtLUFyZ29uTG9hZGluZy0tPgo8c3ZnIHdpZHRoPSIxIiBoZWlnaHQ9IjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgc3Ryb2tlPSIjZmZmZmZmMDAiPjxnPjwvZz4KPC9zdmc+\"  loading=\"lazy\" decoding=\"async\" width=\"480\" height=\"319\" data-original=\"http:\/\/www.preluna.xyz\/wp-content\/uploads\/2025\/11\/getwpmore-3.png\" src=\"data:image\/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsQAAA7EAZUrDhsAAAANSURBVBhXYzh8+PB\/AAffA0nNPuCLAAAAAElFTkSuQmCC\" alt=\"\" class=\"wp-image-1040\"  sizes=\"auto, (max-width: 480px) 100vw, 480px\" \/><\/div><\/figure>\n\n\n\n<p><strong><em>\u83b7\u53d6wordpress\u5217\u8868<\/em><\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>http:&#47;&#47;www.preluna.xyz\/wp-json\/wp\/v2\/posts?per_page=5&amp;orderby=modified&amp;order=desc&amp;_fields=slug,modified<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image size-full\"><div class='fancybox-wrapper lazyload-container-unload' data-fancybox='post-images' href='http:\/\/www.preluna.xyz\/wp-content\/uploads\/2025\/11\/getwpmore-4.png'><img class=\"lazyload lazyload-style-1\" src=\"data:image\/svg+xml;base64,PCEtLUFyZ29uTG9hZGluZy0tPgo8c3ZnIHdpZHRoPSIxIiBoZWlnaHQ9IjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgc3Ryb2tlPSIjZmZmZmZmMDAiPjxnPjwvZz4KPC9zdmc+\"  loading=\"lazy\" decoding=\"async\" width=\"601\" height=\"330\" data-original=\"http:\/\/www.preluna.xyz\/wp-content\/uploads\/2025\/11\/getwpmore-4.png\" src=\"data:image\/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsQAAA7EAZUrDhsAAAANSURBVBhXYzh8+PB\/AAffA0nNPuCLAAAAAElFTkSuQmCC\" alt=\"\" class=\"wp-image-1041\"  sizes=\"auto, (max-width: 601px) 100vw, 601px\" \/><\/div><\/figure>\n\n\n\n<p><strong><em>\u5bf9\u6bd4\u5f97\u88ab\u5220\u9664\u7684\u6587\u7ae0<\/em><\/strong><\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><div class='fancybox-wrapper lazyload-container-unload' data-fancybox='post-images' href='http:\/\/www.preluna.xyz\/wp-content\/uploads\/2025\/11\/getwpmore-5.png'><img class=\"lazyload lazyload-style-1\" src=\"data:image\/svg+xml;base64,PCEtLUFyZ29uTG9hZGluZy0tPgo8c3ZnIHdpZHRoPSIxIiBoZWlnaHQ9IjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgc3Ryb2tlPSIjZmZmZmZmMDAiPjxnPjwvZz4KPC9zdmc+\"  loading=\"lazy\" decoding=\"async\" width=\"365\" height=\"595\" data-original=\"http:\/\/www.preluna.xyz\/wp-content\/uploads\/2025\/11\/getwpmore-5.png\" src=\"data:image\/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsQAAA7EAZUrDhsAAAANSURBVBhXYzh8+PB\/AAffA0nNPuCLAAAAAElFTkSuQmCC\" alt=\"\" class=\"wp-image-1042\"  sizes=\"auto, (max-width: 365px) 100vw, 365px\" \/><\/div><\/figure>\n\n\n\n<p><em><strong>\u6e05\u9664\u88ab\u5220\u9664\u7684\u6587\u7ae0<\/strong><\/em><\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><div class='fancybox-wrapper lazyload-container-unload' data-fancybox='post-images' href='http:\/\/www.preluna.xyz\/wp-content\/uploads\/2025\/11\/getwpmore-6.png'><img class=\"lazyload lazyload-style-1\" src=\"data:image\/svg+xml;base64,PCEtLUFyZ29uTG9hZGluZy0tPgo8c3ZnIHdpZHRoPSIxIiBoZWlnaHQ9IjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgc3Ryb2tlPSIjZmZmZmZmMDAiPjxnPjwvZz4KPC9zdmc+\"  loading=\"lazy\" decoding=\"async\" width=\"873\" height=\"832\" data-original=\"http:\/\/www.preluna.xyz\/wp-content\/uploads\/2025\/11\/getwpmore-6.png\" src=\"data:image\/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsQAAA7EAZUrDhsAAAANSURBVBhXYzh8+PB\/AAffA0nNPuCLAAAAAElFTkSuQmCC\" alt=\"\" class=\"wp-image-1043\"  sizes=\"auto, (max-width: 873px) 100vw, 873px\" \/><\/div><\/figure>\n\n\n\n<p><strong><em>\u9a8c\u8bc1\u5220\u9664\u6210\u679c<\/em><\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>SELECT * FROM articles ORDER BY modified DESC;<\/code><\/pre>\n\n\n\n<p><strong><em>\u5408\u5e76\u5f97\u65b0\u589e\u6216\u66f4\u65b0\u7684\u6587\u7ae0<\/em><\/strong><\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><div class='fancybox-wrapper lazyload-container-unload' data-fancybox='post-images' href='http:\/\/www.preluna.xyz\/wp-content\/uploads\/2025\/11\/getwpmore-8.png'><img class=\"lazyload lazyload-style-1\" src=\"data:image\/svg+xml;base64,PCEtLUFyZ29uTG9hZGluZy0tPgo8c3ZnIHdpZHRoPSIxIiBoZWlnaHQ9IjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgc3Ryb2tlPSIjZmZmZmZmMDAiPjxnPjwvZz4KPC9zdmc+\"  loading=\"lazy\" decoding=\"async\" width=\"373\" height=\"546\" data-original=\"http:\/\/www.preluna.xyz\/wp-content\/uploads\/2025\/11\/getwpmore-8.png\" src=\"data:image\/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsQAAA7EAZUrDhsAAAANSURBVBhXYzh8+PB\/AAffA0nNPuCLAAAAAElFTkSuQmCC\" alt=\"\" class=\"wp-image-1044\"  sizes=\"auto, (max-width: 373px) 100vw, 373px\" \/><\/div><\/figure>\n\n\n\n<p><strong><em>\u63d2\u5165\u66f4\u65b0\u7684\u6587\u7ae0<\/em><\/strong><\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><div class='fancybox-wrapper lazyload-container-unload' data-fancybox='post-images' href='http:\/\/www.preluna.xyz\/wp-content\/uploads\/2025\/11\/getwpmore-9.png'><img class=\"lazyload lazyload-style-1\" src=\"data:image\/svg+xml;base64,PCEtLUFyZ29uTG9hZGluZy0tPgo8c3ZnIHdpZHRoPSIxIiBoZWlnaHQ9IjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgc3Ryb2tlPSIjZmZmZmZmMDAiPjxnPjwvZz4KPC9zdmc+\"  loading=\"lazy\" decoding=\"async\" width=\"877\" height=\"946\" data-original=\"http:\/\/www.preluna.xyz\/wp-content\/uploads\/2025\/11\/getwpmore-9.png\" src=\"data:image\/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsQAAA7EAZUrDhsAAAANSURBVBhXYzh8+PB\/AAffA0nNPuCLAAAAAElFTkSuQmCC\" alt=\"\" class=\"wp-image-1045\"  sizes=\"auto, (max-width: 877px) 100vw, 877px\" \/><\/div><\/figure>\n\n\n\n<p><strong><em>\u9a8c\u8bc1\u6210\u679c<\/em><\/strong><\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><div class='fancybox-wrapper lazyload-container-unload' data-fancybox='post-images' href='http:\/\/www.preluna.xyz\/wp-content\/uploads\/2025\/11\/getwpmore-1.png'><img class=\"lazyload lazyload-style-1\" src=\"data:image\/svg+xml;base64,PCEtLUFyZ29uTG9hZGluZy0tPgo8c3ZnIHdpZHRoPSIxIiBoZWlnaHQ9IjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgc3Ryb2tlPSIjZmZmZmZmMDAiPjxnPjwvZz4KPC9zdmc+\"  loading=\"lazy\" decoding=\"async\" width=\"570\" height=\"564\" data-original=\"http:\/\/www.preluna.xyz\/wp-content\/uploads\/2025\/11\/getwpmore-1.png\" src=\"data:image\/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsQAAA7EAZUrDhsAAAANSURBVBhXYzh8+PB\/AAffA0nNPuCLAAAAAElFTkSuQmCC\" alt=\"\" class=\"wp-image-1046\"  sizes=\"auto, (max-width: 570px) 100vw, 570px\" \/><\/div><\/figure>\n","protected":false},"excerpt":{"rendered":"<p>\u91cd\u65b0\u8bbe\u8ba1\u5de5\u4f5c\u6d41\u7a0b\uff1a\u4ece\u83b7\u53d6\u5143\u6570\u636e\u5230\u6570\u636e\u5bf9\u6bd4 \u76f4\u63a5\u4eceWordPress\u83b7\u53d6\u7684\u5143\u6570\u636e\u4e0d\u80fd\u76f4\u63a5\u7528\u4e8e\u5bf9\u6bd4\uff0c\u9700\u8981\u5148\u4e0e\u6570\u636e\u5e93 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[28,30,55,29],"tags":[],"class_list":["post-1030","post","type-post","status-publish","format-standard","hentry","category-tech-writing","category-technology-horizon","category-technology","category-efficient-workflow"],"_links":{"self":[{"href":"http:\/\/www.preluna.xyz\/index.php\/wp-json\/wp\/v2\/posts\/1030","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/www.preluna.xyz\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.preluna.xyz\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.preluna.xyz\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.preluna.xyz\/index.php\/wp-json\/wp\/v2\/comments?post=1030"}],"version-history":[{"count":4,"href":"http:\/\/www.preluna.xyz\/index.php\/wp-json\/wp\/v2\/posts\/1030\/revisions"}],"predecessor-version":[{"id":1048,"href":"http:\/\/www.preluna.xyz\/index.php\/wp-json\/wp\/v2\/posts\/1030\/revisions\/1048"}],"wp:attachment":[{"href":"http:\/\/www.preluna.xyz\/index.php\/wp-json\/wp\/v2\/media?parent=1030"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.preluna.xyz\/index.php\/wp-json\/wp\/v2\/categories?post=1030"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.preluna.xyz\/index.php\/wp-json\/wp\/v2\/tags?post=1030"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}