{"id":55801,"date":"2025-08-14T08:35:05","date_gmt":"2025-08-14T00:35:05","guid":{"rendered":"https:\/\/www.wsisp.com\/helps\/55801.html"},"modified":"2025-08-14T08:35:05","modified_gmt":"2025-08-14T00:35:05","slug":"%e5%9f%ba%e4%ba%8e-mybatisplus-%e5%b0%86%e7%99%be%e5%ba%a6%e5%a4%a9%e6%b0%94%e6%95%b0%e6%8d%ae%e5%ad%98%e5%82%a8%e8%87%b3-postgresql-%e6%95%b0%e6%8d%ae%e5%ba%93%e7%9a%84%e5%ae%9e%e8%b7%b5","status":"publish","type":"post","link":"https:\/\/www.wsisp.com\/helps\/55801.html","title":{"rendered":"\u57fa\u4e8e MybatisPlus \u5c06\u767e\u5ea6\u5929\u6c14\u6570\u636e\u5b58\u50a8\u81f3 PostgreSQL \u6570\u636e\u5e93\u7684\u5b9e\u8df5"},"content":{"rendered":"<p id=\"main-toc\">\u76ee\u5f55<\/p>\n<p id=\"-toc\" style=\"margin-left:0px\">\n<p id=\"%E5%89%8D%E8%A8%80-toc\" style=\"margin-left:0px\">\u524d\u8a00<\/p>\n<p id=\"%E4%B8%80%E3%80%81PG%E6%95%B0%E6%8D%AE%E5%BA%93%E8%AE%BE%E8%AE%A1%E4%B8%8E%E5%AE%9E%E7%8E%B0-toc\" style=\"margin-left:0px\">\u4e00\u3001PG\u6570\u636e\u5e93\u8bbe\u8ba1\u4e0e\u5b9e\u73b0<\/p>\n<p id=\"1%E3%80%81PG%E6%95%B0%E6%8D%AE%E5%BA%93%E6%A8%A1%E5%9E%8B%E8%AE%BE%E8%AE%A1-toc\" style=\"margin-left:40px\">1\u3001PG\u6570\u636e\u5e93\u6a21\u578b\u8bbe\u8ba1<\/p>\n<p id=\"2%E3%80%81%E5%AD%98%E5%82%A8%E5%A4%A9%E6%B0%94%E7%89%A9%E7%90%86%E8%A1%A8%E7%BB%93%E6%9E%84-toc\" style=\"margin-left:40px\">2\u3001\u5b58\u50a8\u5929\u6c14\u7269\u7406\u8868\u7ed3\u6784<\/p>\n<p id=\"%E4%BA%8C%E3%80%81MybatisPlus%E4%B8%AD%E5%AE%9E%E4%BD%93%E5%AE%9E%E7%8E%B0-toc\" style=\"margin-left:0px\">\u4e8c\u3001MybatisPlus\u4e2d\u5b9e\u4f53\u5b9e\u73b0<\/p>\n<p id=\"1%E3%80%81MybatisPlus%E5%AE%9E%E4%BD%93%E7%B1%BB%E5%9B%BE%E8%AE%BE%E8%AE%A1-toc\" style=\"margin-left:40px\">1\u3001MybatisPlus\u5b9e\u4f53\u7c7b\u56fe\u8bbe\u8ba1<\/p>\n<p id=\"2%E3%80%81MybatisPlus%E4%B8%AD%E7%9B%B8%E5%85%B3%E7%B1%BB%E5%AE%9E%E7%8E%B0-toc\" style=\"margin-left:40px\">2\u3001MybatisPlus\u4e2d\u76f8\u5173\u7c7b\u5b9e\u73b0<\/p>\n<p id=\"%E4%B8%89%E3%80%81PostgreSQL%E6%8C%81%E4%B9%85%E5%8C%96%E5%AE%9E%E7%8E%B0-toc\" style=\"margin-left:0px\">\u4e09\u3001PostgreSQL\u6301\u4e45\u5316\u5b9e\u73b0<\/p>\n<p id=\"1%E3%80%81%E5%A4%A9%E6%B0%94%E6%95%B0%E6%8D%AE%E5%85%A5%E5%BA%93%E6%97%B6%E5%BA%8F%E5%9B%BE-toc\" style=\"margin-left:40px\">1\u3001\u5929\u6c14\u6570\u636e\u5165\u5e93\u65f6\u5e8f\u56fe<\/p>\n<p id=\"2%E3%80%81%E8%B0%83%E7%94%A8%E7%A8%8B%E5%BA%8F%E6%89%A7%E8%A1%8C-toc\" style=\"margin-left:40px\">2\u3001\u8c03\u7528\u7a0b\u5e8f\u6267\u884c<\/p>\n<p id=\"3%E3%80%81%E6%95%B0%E6%8D%AE%E5%85%A5%E5%BA%93%E7%BB%93%E6%9E%9C-toc\" style=\"margin-left:40px\">3\u3001\u6570\u636e\u5165\u5e93\u7ed3\u679c<\/p>\n<p id=\"%E5%9B%9B%E3%80%81%E6%80%BB%E7%BB%93-toc\" style=\"margin-left:0px\">\u56db\u3001\u603b\u7ed3<\/p>\n<hr id=\"hr-toc\" \/>\n<h2>\u524d\u8a00<\/h2>\n<p>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u5728\u5f53\u4eca\u6570\u5b57\u5316\u65f6\u4ee3&#xff0c;\u6570\u636e\u7684\u83b7\u53d6\u3001\u5b58\u50a8\u4e0e\u5206\u6790\u5df2\u6210\u4e3a\u63a8\u52a8\u4f17\u591a\u9886\u57df\u53d1\u5c55\u7684\u91cd\u8981\u9a71\u52a8\u529b\u3002\u5929\u6c14\u6570\u636e\u4f5c\u4e3a\u4e00\u79cd\u6781\u5177\u4ef7\u503c\u7684\u516c\u5171\u8d44\u6e90&#xff0c;\u5e7f\u6cdb\u5e94\u7528\u4e8e\u519c\u4e1a\u3001\u4ea4\u901a\u3001\u65c5\u6e38\u3001\u80fd\u6e90\u7b49\u8bf8\u591a\u884c\u4e1a\u3002\u767e\u5ea6\u5929\u6c14\u4f5c\u4e3a\u56fd\u5185\u77e5\u540d\u7684\u5929\u6c14\u4fe1\u606f\u670d\u52a1\u5e73\u53f0&#xff0c;\u63d0\u4f9b\u4e86\u4e30\u5bcc\u4e14\u5b9e\u65f6\u7684\u5929\u6c14\u6570\u636e&#xff0c;\u82e5\u80fd\u5c06\u5176\u6709\u6548\u5b58\u50a8\u5e76\u52a0\u4ee5\u5229\u7528&#xff0c;\u5c06\u4e3a\u76f8\u5173\u4e1a\u52a1\u51b3\u7b56\u3001\u7814\u7a76\u5206\u6790\u7b49\u63d0\u4f9b\u6709\u529b\u652f\u6301\u3002\u5c06\u767e\u5ea6\u5929\u6c14\u6570\u636e\u5b58\u50a8\u81f3 PostgreSQL \u6570\u636e\u5e93&#xff0c;\u8fd9\u4e00\u8fc7\u7a0b\u6d89\u53ca\u6570\u636e\u7684\u83b7\u53d6\u3001\u89e3\u6790\u3001\u8f6c\u6362\u4ee5\u53ca\u6700\u7ec8\u7684\u5b58\u50a8\u7b49\u591a\u4e2a\u73af\u8282\u3002\u901a\u8fc7 MybatisPlus \u6846\u67b6\u6765\u5b9e\u73b0\u8fd9\u4e00\u76ee\u6807&#xff0c;\u4e0d\u4ec5\u53ef\u4ee5\u5145\u5206\u5229\u7528\u5176\u5f3a\u5927\u7684 ORM&#xff08;\u5bf9\u8c61\u5173\u7cfb\u6620\u5c04&#xff09;\u80fd\u529b&#xff0c;\u5c06\u5929\u6c14\u6570\u636e\u7684\u5b9e\u4f53\u7c7b\u4e0e\u6570\u636e\u5e93\u8868\u7ed3\u6784\u8fdb\u884c\u9ad8\u6548\u6620\u5c04&#xff0c;\u8fd8\u80fd\u501f\u52a9\u5176\u63d0\u4f9b\u7684\u4fbf\u6377\u64cd\u4f5c\u63a5\u53e3&#xff0c;\u8f7b\u677e\u5b8c\u6210\u6570\u636e\u7684\u589e\u5220\u6539\u67e5\u7b49\u64cd\u4f5c\u3002\u6b64\u5916&#xff0c;MybatisPlus \u7684\u5206\u9875\u63d2\u4ef6\u3001\u7f13\u5b58\u673a\u5236\u7b49\u7279\u6027&#xff0c;\u4e5f\u80fd\u591f\u5728\u5904\u7406\u5927\u91cf\u5929\u6c14\u6570\u636e\u65f6&#xff0c;\u6709\u6548\u63d0\u5347\u7cfb\u7edf\u7684\u6027\u80fd\u548c\u54cd\u5e94\u901f\u5ea6&#xff0c;\u786e\u4fdd\u6570\u636e\u5b58\u50a8\u8fc7\u7a0b\u7684\u9ad8\u6548\u4e0e\u7a33\u5b9a\u3002<\/p>\n<p class=\"img-center\"><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"1863\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/08\/20250814003451-689d2f2b9ebfe.png\" width=\"3129\" \/><\/p>\n<p>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u8fd9\u4e00\u5b9e\u8df5\u8fc7\u7a0b\u4e0d\u4ec5\u6d89\u53ca\u5230\u6280\u672f\u5c42\u9762\u7684\u591a\u79cd\u77e5\u8bc6\u878d\u5408&#xff0c;\u5982\u7f51\u7edc\u7f16\u7a0b\u3001JSON \u6570\u636e\u5904\u7406\u3001\u6570\u636e\u5e93\u64cd\u4f5c\u4ee5\u53ca\u6846\u67b6\u5e94\u7528\u7b49&#xff0c;\u8fd8\u9762\u4e34\u7740\u8bf8\u5982\u6570\u636e\u51c6\u786e\u6027\u3001\u5b58\u50a8\u6548\u7387\u3001\u7cfb\u7edf\u7a33\u5b9a\u6027\u7b49\u8bf8\u591a\u6311\u6218\u3002\u901a\u8fc7\u5bf9\u6574\u4e2a\u6d41\u7a0b\u7684\u6df1\u5165\u7814\u7a76\u548c\u5b9e\u8df5\u63a2\u7d22&#xff0c;\u6211\u4eec\u5e0c\u671b\u80fd\u591f\u4e3a\u5f00\u53d1\u8005\u63d0\u4f9b\u4e00\u5957\u5b8c\u6574\u3001\u9ad8\u6548\u4e14\u53ef\u9760\u7684\u89e3\u51b3\u65b9\u6848&#xff0c;\u52a9\u529b\u5927\u5bb6\u66f4\u597d\u5730\u5229\u7528\u767e\u5ea6\u5929\u6c14\u6570\u636e&#xff0c;\u6316\u6398\u5176\u6f5c\u5728\u4ef7\u503c&#xff0c;\u540c\u65f6\u4e5f\u4e3a\u7c7b\u4f3c\u7684\u6570\u636e\u5b58\u50a8\u9879\u76ee\u63d0\u4f9b\u6709\u76ca\u7684\u53c2\u8003\u548c\u501f\u9274\u3002\u529b\u6c42\u4ee5\u6e05\u6670\u3001\u6613\u61c2\u7684\u65b9\u5f0f&#xff0c;\u5e26\u9886\u8bfb\u8005\u9010\u6b65\u6df1\u5165\u8fd9\u4e00\u5b9e\u8df5\u8fc7\u7a0b&#xff0c;\u5171\u540c\u63a2\u7d22\u6570\u636e\u5b58\u50a8\u4e0e\u5e94\u7528\u7684\u65e0\u9650\u53ef\u80fd\u3002\u672c\u6587\u91cd\u70b9\u5728\u4e8e\u8be6\u7ec6\u5f97\u4ecb\u7ecd\u5728MybatisPlus\u6846\u67b6\u4e2d\u5982\u4f55\u5c06\u767e\u5ea6\u5929\u6c14\u4fe1\u606f\u6301\u4e45\u5316\u5230PG\u6570\u636e\u5e93\u4e2d&#xff0c;\u9996\u5148\u4ecb\u7ecd\u5177\u4f53\u7684PG\u6570\u636e\u5e93\u7684\u8bbe\u8ba1\u4e0e\u5b9e\u73b0&#xff0c;\u7136\u540e\u8be6\u7ec6\u4ecb\u7ecdMybatisPlus\u7684\u5b9e\u4f53\u8bbe\u8ba1&#xff0c;\u6700\u540e\u4ee5\u6e90\u4ee3\u7801\u7684\u5f62\u5f0f\u4ecb\u7ecd\u5982\u4f55\u5c06\u6570\u636e\u8fdb\u884c\u6301\u4e45\u5316&#xff0c;\u671f\u5f85\u4e3a\u5927\u5bb6\u63d0\u4f9b\u4e00\u79cd\u826f\u597d\u7684\u89e3\u51b3\u65b9\u6848\u548c\u53c2\u8003\u3002<\/p>\n<h2 id=\"%E4%B8%80%E3%80%81PG%E6%95%B0%E6%8D%AE%E5%BA%93%E8%AE%BE%E8%AE%A1%E4%B8%8E%E5%AE%9E%E7%8E%B0\" style=\"background-color:transparent\">\u4e00\u3001PG\u6570\u636e\u5e93\u8bbe\u8ba1\u4e0e\u5b9e\u73b0<\/h2>\n<p>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0PostgreSQL \u4f5c\u4e3a\u4e00\u79cd\u529f\u80fd\u5f3a\u5927\u7684\u5f00\u6e90\u5173\u7cfb\u578b\u6570\u636e\u5e93\u7ba1\u7406\u7cfb\u7edf&#xff0c;\u4ee5\u5176\u51fa\u8272\u7684\u6027\u80fd\u3001\u9ad8\u5ea6\u7684\u53ef\u6269\u5c55\u6027\u4ee5\u53ca\u5bf9\u590d\u6742\u6570\u636e\u7c7b\u578b\u7684\u826f\u597d\u652f\u6301&#xff0c;\u53d7\u5230\u8d8a\u6765\u8d8a\u591a\u5f00\u53d1\u8005\u7684\u9752\u7750\u3002\u5b83\u80fd\u591f\u9ad8\u6548\u5730\u5b58\u50a8\u548c\u7ba1\u7406\u5927\u89c4\u6a21\u6570\u636e&#xff0c;\u4e3a\u6570\u636e\u7684\u67e5\u8be2\u3001\u5206\u6790\u4e0e\u6316\u6398\u63d0\u4f9b\u4e86\u575a\u5b9e\u57fa\u7840\u3002\u672c\u8282\u9996\u5148\u5c06\u4ee5\u5b58\u50a8\u767e\u5ea6\u5929\u6c14\u6570\u636e\u4e3a\u80cc\u666f&#xff0c;\u4ecb\u7ecd\u5982\u4f55\u8fdb\u884c\u6570\u636e\u5e93\u7684\u7269\u7406\u8868\u8bbe\u8ba1&#xff0c;\u4e3a\u4e86\u65b9\u4fbf\u5927\u5bb6\u5b66\u4e60&#xff0c;\u8fd9\u91cc\u53ef\u4ee5\u5206\u4eab\u76f8\u5173\u7684\u5efa\u8868\u8bed\u53e5\u3002<\/p>\n<h3 id=\"1%E3%80%81PG%E6%95%B0%E6%8D%AE%E5%BA%93%E6%A8%A1%E5%9E%8B%E8%AE%BE%E8%AE%A1\">1\u3001PG\u6570\u636e\u5e93\u6a21\u578b\u8bbe\u8ba1<\/h3>\n<p>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u5728\u524d\u4e00\u7bc7\u7684\u5185\u5bb9\u4e2d&#xff0c;\u6211\u4eec\u8be6\u7ec6\u7684\u4ecb\u7ecd\u4e86\u5982\u4f55\u5c06\u767e\u5ea6\u5929\u6c14\u7684\u8fd4\u56de\u6570\u636e\u8f6c\u6362\u4e3aJavaBean&#xff0c;GSON \u6846\u67b6\u4e0b\u767e\u5ea6\u5929\u6c14 JSON \u6570\u636e\u8f6c JavaBean \u7684\u5b9e\u6218\u653b\u7565\u3002\u5728\u5b9e\u9645\u5e94\u7528\u7cfb\u7edf\u67e5\u8be2\u8fc7\u7a0b\u4e2d&#xff0c;\u6211\u4eec\u9664\u4e86\u8981\u5b9a\u4e49JavaBean&#xff0c;\u4e5f\u9700\u8981\u5b9a\u4e49\u7528\u6765\u4fdd\u5b58\u5929\u6c14\u6570\u636e\u7684\u6570\u636e\u5e93\u6a21\u578b\u3002\u6839\u636e\u63a5\u53e3\u6587\u6863&#xff0c;\u6211\u4eec\u53ef\u4ee5\u6309\u7167\u4e1a\u52a1\u7ef4\u5ea6\u8bbe\u8ba1\u4ee5\u4e0b\u6570\u636e\u5e93\u6a21\u578b&#xff0c;\u5206\u522b\u7528\u6765\u5b58\u50a8\u5929\u6c14\u63a5\u53e3\u8fd4\u56de\u7684\u6570\u636e&#xff1a;<\/p>\n<p class=\"img-center\"><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"448\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/08\/20250814003454-689d2f2e92125.png\" width=\"897\" \/><\/p>\n<h3 id=\"2%E3%80%81%E5%AD%98%E5%82%A8%E5%A4%A9%E6%B0%94%E7%89%A9%E7%90%86%E8%A1%A8%E7%BB%93%E6%9E%84\">2\u3001\u5b58\u50a8\u5929\u6c14\u7269\u7406\u8868\u7ed3\u6784<\/h3>\n<p>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u8fd9\u91cc\u5c06\u6839\u636e\u4e0a\u9762\u7684\u7269\u7406\u6a21\u578b\u521b\u5efa\u76f8\u5e94\u7684\u5929\u6c14\u4fe1\u606f\u8868&#xff0c;\u8fd9\u91cc\u5c06\u5206\u522b\u7ed9\u51fa\u8fd9\u4e94\u5f20\u8868\u7684\u7269\u7406\u7ed3\u6784\u8bed\u53e5\u3002\u5b58\u50a8\u5b9e\u65f6\u5929\u6c14\u4fe1\u606f&#xff1a;<\/p>\n<p>create table biz_weather_now (<br \/>\n   pk_id                INT8                 not null,<br \/>\n   location_code        VARCHAR(6)           not null default &#039;&#039;,<br \/>\n   temp                 DECIMAL(8,2)         not null default 999999,<br \/>\n   feels_like           DECIMAL(8,2)         not null default 999999,<br \/>\n   rh                   DECIMAL(8,2)         not null default 999999,<br \/>\n   wind_class           VARCHAR(10)          null,<br \/>\n   wind_dir             VARCHAR(10)          null,<br \/>\n   text                 VARCHAR(50)          null,<br \/>\n   prec_1h              DECIMAL(8,2)         null default 999999,<br \/>\n   clouds               DECIMAL(8,2)         null default 999999,<br \/>\n   vis                  DECIMAL(8,2)         null default 999999,<br \/>\n   aqi                  DECIMAL(8,2)         null default 999999,<br \/>\n   pm25                 DECIMAL(8,2)         null default 999999,<br \/>\n   pm10                 DECIMAL(8,2)         null default 999999,<br \/>\n   no2                  DECIMAL(8,2)         null default 999999,<br \/>\n   so2                  DECIMAL(8,2)         null default 999999,<br \/>\n   o3                   DECIMAL(8,2)         null default 999999,<br \/>\n   co                   DECIMAL(8,2)         null default 999999,<br \/>\n   uptime               TIMESTAMP            null,<br \/>\n   constraint PK_BIZ_WEATHER_NOW primary key (pk_id)<br \/>\n);<br \/>\ncomment on table biz_weather_now is<br \/>\n&#039;\u5b58\u50a8\u5b9e\u65f6\u5929\u6c14\u4fe1\u606f&#039;;<br \/>\ncomment on column biz_weather_now.pk_id is<br \/>\n&#039;\u4e3b\u952e&#039;;<br \/>\ncomment on column biz_weather_now.location_code is<br \/>\n&#039;\u884c\u653f\u533a\u5212code&#039;;<br \/>\ncomment on column biz_weather_now.temp is<br \/>\n&#039;\u6e29\u5ea6&#xff08;\u2103&#xff09;&#039;;<br \/>\ncomment on column biz_weather_now.feels_like is<br \/>\n&#039;\u4f53\u611f\u6e29\u5ea6(\u2103)&#039;;<br \/>\ncomment on column biz_weather_now.rh is<br \/>\n&#039;\u76f8\u5bf9\u6e7f\u5ea6(%)&#039;;<br \/>\ncomment on column biz_weather_now.wind_class is<br \/>\n&#039;\u98ce\u529b\u7b49\u7ea7&#039;;<br \/>\ncomment on column biz_weather_now.wind_dir is<br \/>\n&#039;\u98ce\u5411\u63cf\u8ff0&#039;;<br \/>\ncomment on column biz_weather_now.text is<br \/>\n&#039;\u5929\u6c14\u73b0\u8c61&#039;;<br \/>\ncomment on column biz_weather_now.prec_1h is<br \/>\n&#039;1\u5c0f\u65f6\u7d2f\u8ba1\u964d\u6c34\u91cf(mm)&#039;;<br \/>\ncomment on column biz_weather_now.clouds is<br \/>\n&#039;\u4e91\u91cf(%)&#039;;<br \/>\ncomment on column biz_weather_now.vis is<br \/>\n&#039;\u80fd\u89c1\u5ea6(m)&#039;;<br \/>\ncomment on column biz_weather_now.aqi is<br \/>\n&#039;\u7a7a\u6c14\u8d28\u91cf\u6307\u6570\u6570\u503c&#039;;<br \/>\ncomment on column biz_weather_now.pm25 is<br \/>\n&#039;pm2.5\u6d53\u5ea6(\u03bcg\/m3)&#039;;<br \/>\ncomment on column biz_weather_now.pm10 is<br \/>\n&#039;pm10\u6d53\u5ea6(\u03bcg\/m3)&#039;;<br \/>\ncomment on column biz_weather_now.no2 is<br \/>\n&#039;\u4e8c\u6c27\u5316\u6c2e\u6d53\u5ea6(\u03bcg\/m3)&#039;;<br \/>\ncomment on column biz_weather_now.so2 is<br \/>\n&#039;\u4e8c\u6c27\u5316\u786b\u6d53\u5ea6(\u03bcg\/m3)&#039;;<br \/>\ncomment on column biz_weather_now.o3 is<br \/>\n&#039;\u81ed\u6c27\u6d53\u5ea6(\u03bcg\/m3)&#039;;<br \/>\ncomment on column biz_weather_now.co is<br \/>\n&#039;\u4e00\u6c27\u5316\u78b3\u6d53\u5ea6(mg\/m3)&#039;;<br \/>\ncomment on column biz_weather_now.uptime is<br \/>\n&#039;\u6570\u636e\u66f4\u65b0\u65f6\u95f4&#xff0c;\u5317\u4eac\u65f6\u95f4&#039;; <\/p>\n<p>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u8fd9\u91cc\u9700\u8981\u6ce8\u610f\u7684\u662f&#xff0c;\u5728\u4fdd\u5b58\u76f8\u5e94\u7684\u5982\u6c14\u6e29\u6216\u8005\u6307\u6570\u65f6&#xff0c;\u91c7\u7528\u7684\u6570\u636e\u5e93\u7c7b\u578b\u4e0d\u662fInt&#xff0c;\u8fd9\u4e5f\u662f\u4e3a\u4e86\u517c\u5bb9\u53ef\u80fd\u7684\u51fa\u73b0\u6d6e\u70b9\u6570\u7684\u60c5\u51b5&#xff0c;\u800c\u5c0f\u6570\u4f4d&#xff0c;\u8fd9\u91cc\u521d\u6b65\u8bbe\u8ba1\u62102\u4f4d&#xff0c;\u5927\u5bb6\u53ef\u4ee5\u6839\u636e\u5b9e\u9645\u9700\u6c42\u8fdb\u884c\u8c03\u6574\u3002<\/p>\n<p>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u5929\u6c14\u8b66\u62a5\u4fe1\u606f\u8868&#xff1a;<\/p>\n<p>create table biz_weather_alerts (<br \/>\n   pk_id                INT8                 not null,<br \/>\n   weather_pk_id        INT8                 null,<br \/>\n   type                 VARCHAR(20)          null,<br \/>\n   level                VARCHAR(10)          null,<br \/>\n   title                VARCHAR(128)         null,<br \/>\n   desc_info            VARCHAR(512)         null,<br \/>\n   constraint PK_BIZ_WEATHER_ALERTS primary key (pk_id)<br \/>\n);<br \/>\ncomment on table biz_weather_alerts is<br \/>\n&#039;\u5929\u6c14\u8b66\u62a5\u4fe1\u606f\u8868&#039;;<br \/>\ncomment on column biz_weather_alerts.pk_id is<br \/>\n&#039;\u4e3b\u952e&#039;;<br \/>\ncomment on column biz_weather_alerts.weather_pk_id is<br \/>\n&#039;\u5b9e\u65f6\u5929\u6c14\u4fe1\u606f\u4e3b\u952e&#039;;<br \/>\ncomment on column biz_weather_alerts.type is<br \/>\n&#039;\u9884\u8b66\u4e8b\u4ef6\u7c7b\u578b,\u53c2\u8003 \u5929\u6c14\u53d6\u503c\u5bf9\u7167\u8868\u4e2d\u7684\u9884\u8b66\u7c7b\u578b&#039;;<br \/>\ncomment on column biz_weather_alerts.level is<br \/>\n&#039;\u9884\u8b66\u4e8b\u4ef6\u7b49\u7ea7&#039;;<br \/>\ncomment on column biz_weather_alerts.title is<br \/>\n&#039;\u9884\u8b66\u6807\u9898&#039;;<br \/>\ncomment on column biz_weather_alerts.desc_info is<br \/>\n&#039;\u9884\u8b66\u8be6\u7ec6\u63d0\u793a\u4fe1\u606f&#039;;<\/p>\n<p>\u00a0 \u00a0 \u00a0 \u00a0\u9700\u8981\u6ce8\u610f\u7684\u662f&#xff0c;\u5728\u8b66\u62a5\u4fe1\u606f\u4e2d&#xff0c;desc\u5b57\u6bb5\u7531\u4e8e\u662f\u6570\u636e\u5e93\u7684\u5173\u952e\u5b57&#xff0c;\u5728\u539f\u59cb\u63a5\u53e3\u4e2d\u8fd4\u56de\u7684desc\u6211\u4eec\u9700\u8981\u53d8\u6210desc_info\u5b57\u6bb5&#xff0c;\u5929\u6c14\u6307\u6570\u4fe1\u606f\u8868&#xff1a;<\/p>\n<p>create table biz_weather_indexes (<br \/>\n   pk_id                INT8                 not null,<br \/>\n   weather_pk_id        INT8                 null,<br \/>\n   name                 VARCHAR(10)          null,<br \/>\n   brief                VARCHAR(10)          null,<br \/>\n   detail               VARCHAR(128)         null,<br \/>\n   constraint PK_BIZ_WEATHER_INDEXES primary key (pk_id)<br \/>\n);<br \/>\ncomment on column biz_weather_indexes.pk_id is<br \/>\n&#039;\u4e3b\u952e&#039;;<br \/>\ncomment on column biz_weather_indexes.weather_pk_id is<br \/>\n&#039;\u5b9e\u65f6\u5929\u6c14\u4fe1\u606f\u4e3b\u952e&#039;;<br \/>\ncomment on column biz_weather_indexes.name is<br \/>\n&#039;\u751f\u6d3b\u6307\u6570\u4e2d\u6587\u540d\u79f0&#039;;<br \/>\ncomment on column biz_weather_indexes.brief is<br \/>\n&#039;\u751f\u6d3b\u6307\u6570\u6982\u8981\u8bf4\u660e&#039;;<br \/>\ncomment on column biz_weather_indexes.detail is<br \/>\n&#039;\u751f\u6d3b\u6307\u6570\u8be6\u7ec6\u8bf4\u660e&#039;; <\/p>\n<p>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u5929\u6c14\u9884\u62a5\u4fe1\u606f\u8868&#xff1a;<\/p>\n<p>create table biz_weather_forecasts (<br \/>\n   pk_id                INT8                 not null,<br \/>\n   weather_pk_id        INT8                 null,<br \/>\n   date                 TIMESTAMP            null,<br \/>\n   week                 VARCHAR(3)           null,<br \/>\n   high                 DECIMAL(8,2)         null default 999999,<br \/>\n   low                  DECIMAL(8,2)         null default 999999,<br \/>\n   wc_day               VARCHAR(10)          null,<br \/>\n   wc_night             VARCHAR(10)          null,<br \/>\n   wd_day               VARCHAR(10)          null,<br \/>\n   wd_night             VARCHAR(10)          null,<br \/>\n   text_day             VARCHAR(20)          null,<br \/>\n   text_night           VARCHAR(20)          null,<br \/>\n   constraint PK_BIZ_WEATHER_FORECASTS primary key (pk_id)<br \/>\n);<br \/>\ncomment on column biz_weather_forecasts.pk_id is<br \/>\n&#039;\u4e3b\u952e&#039;;<br \/>\ncomment on column biz_weather_forecasts.weather_pk_id is<br \/>\n&#039;\u5b9e\u65f6\u5929\u6c14\u4fe1\u606f\u4e3b\u952e&#039;;<br \/>\ncomment on column biz_weather_forecasts.date is<br \/>\n&#039;\u65e5\u671f&#xff0c;\u5317\u4eac\u65f6\u533a&#039;;<br \/>\ncomment on column biz_weather_forecasts.week is<br \/>\n&#039;\u661f\u671f&#xff0c;\u5317\u4eac\u65f6\u533a&#039;;<br \/>\ncomment on column biz_weather_forecasts.high is<br \/>\n&#039;\u6700\u9ad8\u6e29\u5ea6(\u2103)&#039;;<br \/>\ncomment on column biz_weather_forecasts.low is<br \/>\n&#039;\u6700\u4f4e\u6e29\u5ea6(\u2103)&#039;;<br \/>\ncomment on column biz_weather_forecasts.wc_day is<br \/>\n&#039;\u767d\u5929\u98ce\u529b&#039;;<br \/>\ncomment on column biz_weather_forecasts.wc_night is<br \/>\n&#039;\u665a\u4e0a\u98ce\u529b&#039;;<br \/>\ncomment on column biz_weather_forecasts.wd_day is<br \/>\n&#039;\u767d\u5929\u98ce\u5411&#039;;<br \/>\ncomment on column biz_weather_forecasts.wd_night is<br \/>\n&#039;\u665a\u4e0a\u98ce\u5411&#039;;<br \/>\ncomment on column biz_weather_forecasts.text_day is<br \/>\n&#039;\u767d\u5929\u5929\u6c14\u73b0\u8c61,\u53c2\u8003\u5929\u6c14\u53d6\u503c\u5bf9\u7167\u8868&#039;;<br \/>\ncomment on column biz_weather_forecasts.text_night is<br \/>\n&#039;\u665a\u4e0a\u5929\u6c14\u73b0\u8c61&#039;; <\/p>\n<p>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u5c0f\u65f6\u5929\u6c14\u9884\u62a5\u8868&#xff1a;<\/p>\n<p>create table biz_weather_forecast_hours (<br \/>\n   pk_id                INT8                 not null,<br \/>\n   weather_pk_id        INT8                 null,<br \/>\n   text                 VARCHAR(20)          null,<br \/>\n   temp_fc              DECIMAL(8,2)         null,<br \/>\n   wind_class           VARCHAR(10)          null,<br \/>\n   wind_dir             VARCHAR(10)          null,<br \/>\n   rh                   DECIMAL(8,2)         null,<br \/>\n   prec_1h              NUMERIC(8,2)         null,<br \/>\n   clouds               DECIMAL(8,2)         null,<br \/>\n   data_time            TIMESTAMP            null,<br \/>\n   constraint PK_BIZ_WEATHER_FORECAST_HOURS primary key (pk_id)<br \/>\n);<br \/>\ncomment on column biz_weather_forecast_hours.pk_id is<br \/>\n&#039;\u4e3b\u952e&#039;;<br \/>\ncomment on column biz_weather_forecast_hours.weather_pk_id is<br \/>\n&#039;\u5b9e\u65f6\u5929\u6c14\u4fe1\u606f\u4e3b\u952e&#039;;<br \/>\ncomment on column biz_weather_forecast_hours.text is<br \/>\n&#039;\u5929\u6c14\u73b0\u8c61&#039;;<br \/>\ncomment on column biz_weather_forecast_hours.temp_fc is<br \/>\n&#039;\u6e29\u5ea6(\u2103)&#039;;<br \/>\ncomment on column biz_weather_forecast_hours.wind_class is<br \/>\n&#039;\u98ce\u529b\u7b49\u7ea7&#039;;<br \/>\ncomment on column biz_weather_forecast_hours.wind_dir is<br \/>\n&#039;\u98ce\u5411\u63cf\u8ff0&#039;;<br \/>\ncomment on column biz_weather_forecast_hours.rh is<br \/>\n&#039;\u76f8\u5bf9\u6e7f\u5ea6&#039;;<br \/>\ncomment on column biz_weather_forecast_hours.prec_1h is<br \/>\n&#039;1\u5c0f\u65f6\u7d2f\u8ba1\u964d\u6c34\u91cf(mm)&#039;;<br \/>\ncomment on column biz_weather_forecast_hours.clouds is<br \/>\n&#039;\u4e91\u91cf(%)&#039;;<br \/>\ncomment on column biz_weather_forecast_hours.data_time is<br \/>\n&#039;\u6570\u636e\u65f6\u95f4&#039;; <\/p>\n<h2 id=\"%E4%BA%8C%E3%80%81MybatisPlus%E4%B8%AD%E5%AE%9E%E4%BD%93%E5%AE%9E%E7%8E%B0\" style=\"background-color:transparent\">\u4e8c\u3001MybatisPlus\u4e2d\u5b9e\u4f53\u5b9e\u73b0<\/h2>\n<p>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0MybatisPlus \u5219\u662f\u57fa\u4e8e Mybatis \u7684\u589e\u5f3a\u7248\u672c&#xff0c;\u5b83\u4e0d\u4ec5\u7ee7\u627f\u4e86 Mybatis \u7684\u7075\u6d3b\u6027\u548c\u6613\u7528\u6027&#xff0c;\u8fd8\u901a\u8fc7\u4e00\u7cfb\u5217\u63d2\u4ef6\u548c\u6269\u5c55\u529f\u80fd&#xff0c;\u6781\u5927\u5730\u7b80\u5316\u4e86\u6570\u636e\u5e93\u64cd\u4f5c\u6d41\u7a0b&#xff0c;\u63d0\u9ad8\u4e86\u5f00\u53d1\u6548\u7387&#xff0c;\u5c24\u5176\u5728\u5904\u7406\u590d\u6742\u4e1a\u52a1\u903b\u8f91\u548c\u6570\u636e\u6301\u4e45\u5316\u65b9\u9762\u8868\u73b0\u51fa\u8272\u3002\u5728\u4e4b\u524d\u7684\u535a\u5ba2\u4e2d\u5df2\u7ecf\u4ecb\u7ecd\u4e86\u76f8\u5173\u7c7b\u7684\u8bbe\u8ba1&#xff0c;\u4e0b\u9762\u5c06\u7ed3\u5408MybatisPlus\u6765\u6df1\u5165\u8bb2\u89e3\u8fd9\u4e9b\u5b9e\u4f53\u7684\u8bbe\u8ba1&#xff0c;\u5206\u522b\u4ece\u7c7b\u56fe\u548c\u5177\u4f53\u5b9e\u73b0\u4e24\u4e2a\u65b9\u9762\u5c55\u5f00\u3002<\/p>\n<h3 id=\"1%E3%80%81MybatisPlus%E5%AE%9E%E4%BD%93%E7%B1%BB%E5%9B%BE%E8%AE%BE%E8%AE%A1\" style=\"text-align:center\">1\u3001MybatisPlus\u5b9e\u4f53\u7c7b\u56fe\u8bbe\u8ba1<\/h3>\n<p style=\"text-align:center\"><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"2013\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/08\/20250814003454-689d2f2ecde9a.png\" width=\"3333\" \/><\/p>\n<p>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u901a\u8fc7\u5206\u6790\u539f\u6765\u7684\u63a5\u53e3\u4ee5\u53ca\u68b3\u7406\u5bf9\u8c61\u7684\u5173\u7cfb&#xff0c;\u53ef\u4ee5\u6574\u7406\u51fa\u76f8\u5173\u7684\u6570\u636e\u5173\u7cfb&#xff0c;\u6bd4\u5982\u5b9e\u65f6\u5929\u6c14\u4fe1\u606f\u4e0e\u9884\u8b66\u4fe1\u606f\u3001\u751f\u6d3b\u6307\u6570\u4fe1\u606f\u3001\u9010\u65e5\u9884\u62a5\u4fe1\u606f\u548c\u9010\u5c0f\u65f6\u9884\u62a5\u4fe1\u606f\u5747\u662f\u4e00\u5bf9\u591a\u7684\u60c5\u51b5\u3002<\/p>\n<h3 id=\"2%E3%80%81MybatisPlus%E4%B8%AD%E7%9B%B8%E5%85%B3%E7%B1%BB%E5%AE%9E%E7%8E%B0\">2\u3001MybatisPlus\u4e2d\u76f8\u5173\u7c7b\u5b9e\u73b0<\/h3>\n<p>\u00a0 \u00a0 \u00a0 \u00a0 \u7531\u4e8e\u7bc7\u5e45\u6709\u9650&#xff0c;\u8fd9\u91cc\u5c06\u524d\u9762\u7684\u5185\u5bb9\u4e2d\u5269\u4e0b\u7684\u51e0\u4e2aJavaBean\u7684\u4ee3\u7801\u7ed9\u51fa&#xff0c;\u5728\u4e4b\u524d\u7684\u5185\u5bb9\u4e2d\u5df2\u7ecf\u5bf9BdWeatherDTO.java\u3001WeatherInfoDTO.java\u3001WeatherIndexes.java\u8fdb\u884c\u4e86\u8bf4\u660e\u3002\u9884\u8b66\u4fe1\u606fJavaBean\u5982\u4e0b&#xff1a;<\/p>\n<p>package com.yelang.project.weather.domain;<br \/>\nimport java.io.Serializable;<br \/>\nimport com.baomidou.mybatisplus.annotation.TableField;<br \/>\nimport com.baomidou.mybatisplus.annotation.TableId;<br \/>\nimport com.baomidou.mybatisplus.annotation.TableName;<br \/>\nimport com.google.gson.annotations.SerializedName;<br \/>\nimport lombok.AllArgsConstructor;<br \/>\nimport lombok.Getter;<br \/>\nimport lombok.NoArgsConstructor;<br \/>\nimport lombok.Setter;<br \/>\nimport lombok.ToString;<br \/>\n&#064;TableName(value &#061; &#034;biz_weather_alerts&#034;)<br \/>\n&#064;NoArgsConstructor<br \/>\n&#064;AllArgsConstructor<br \/>\n&#064;Setter<br \/>\n&#064;Getter<br \/>\n&#064;ToString<br \/>\npublic class WeatherAlerts implements Serializable{<br \/>\nprivate static final long serialVersionUID &#061; 9180445236146165608L;<br \/>\n&#064;TableId(value &#061;&#034;pk_id&#034;)<br \/>\nprivate Long pkId ;\/\/\u4e3b\u952e<br \/>\n&#064;TableField(value&#061;&#034;weather_pk_id&#034;)<br \/>\nprivate Long weatherPkId;\/\/\u5b9e\u65f6\u5929\u6c14\u4fe1\u606f\u4e3b\u952e<br \/>\nprivate String type;\/\/\u9884\u8b66\u4e8b\u4ef6\u7c7b\u578b,\u53c2\u8003 \u5929\u6c14\u53d6\u503c\u5bf9\u7167\u8868\u4e2d\u7684\u9884\u8b66\u7c7b\u578b<br \/>\nprivate String level;\/\/\u9884\u8b66\u4e8b\u4ef6\u7b49\u7ea7<br \/>\nprivate String title;\/\/\u9884\u8b66\u6807\u9898<br \/>\n&#064;TableField(value&#061;&#034;desc_info&#034;)<br \/>\n&#064;SerializedName(&#034;desc&#034;)<br \/>\nprivate String descInfo;\/\/\u9884\u8b66\u8be6\u7ec6\u63d0\u793a\u4fe1\u606f<br \/>\n} <\/p>\n<p>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u9010\u65e5\u5929\u6c14\u9884\u62a5JavaBean\u4ee3\u7801\u5982\u4e0b&#xff1a;<\/p>\n<p>package com.yelang.project.weather.domain;<br \/>\nimport java.io.Serializable;<br \/>\nimport java.math.BigDecimal;<br \/>\nimport java.util.Date;<br \/>\nimport com.baomidou.mybatisplus.annotation.TableField;<br \/>\nimport com.baomidou.mybatisplus.annotation.TableId;<br \/>\nimport com.baomidou.mybatisplus.annotation.TableName;<br \/>\nimport com.fasterxml.jackson.annotation.JsonFormat;<br \/>\nimport com.google.gson.annotations.SerializedName;<br \/>\nimport lombok.AllArgsConstructor;<br \/>\nimport lombok.Getter;<br \/>\nimport lombok.NoArgsConstructor;<br \/>\nimport lombok.Setter;<br \/>\nimport lombok.ToString;<br \/>\n&#064;TableName(value &#061; &#034;biz_weather_forecasts&#034;)<br \/>\n&#064;NoArgsConstructor<br \/>\n&#064;AllArgsConstructor<br \/>\n&#064;Setter<br \/>\n&#064;Getter<br \/>\n&#064;ToString<br \/>\npublic class WeatherForecasts implements Serializable{<br \/>\nprivate static final long serialVersionUID &#061; 4929733391294381721L;<br \/>\n&#064;TableId(value &#061;&#034;pk_id&#034;)<br \/>\nprivate Long pkId ;\/\/\u4e3b\u952e<br \/>\n&#064;TableField(value&#061;&#034;weather_pk_id&#034;)<br \/>\nprivate Long weatherPkId;\/\/\u5b9e\u65f6\u5929\u6c14\u4fe1\u606f\u4e3b\u952e<br \/>\n&#064;JsonFormat(pattern &#061; &#034;yyyy-MM-dd HH:mm:ss&#034;)<br \/>\nprivate Date date;\/\/\u65e5\u671f&#xff0c;\u5317\u4eac\u65f6\u533a<br \/>\nprivate String week;\/\/\u661f\u671f&#xff0c;\u5317\u4eac\u65f6\u533a<br \/>\nprivate BigDecimal high &#061; new BigDecimal(999999);\/\/\u6700\u9ad8\u6e29\u5ea6(\u2103)<br \/>\nprivate BigDecimal low &#061; new BigDecimal(999999);\/\/\u6700\u4f4e\u6e29\u5ea6(\u2103)<br \/>\n&#064;TableField(value&#061;&#034;wc_day&#034;)<br \/>\n&#064;SerializedName(&#034;wc_day&#034;)<br \/>\nprivate String wcDay;\/\/\u767d\u5929\u98ce\u529b<br \/>\n&#064;TableField(value&#061;&#034;wc_night&#034;)<br \/>\n&#064;SerializedName(&#034;wc_night&#034;)<br \/>\nprivate String wcNight;\/\/\u665a\u4e0a\u98ce\u529b<br \/>\n&#064;TableField(value&#061;&#034;wd_day&#034;)<br \/>\n&#064;SerializedName(&#034;wd_day&#034;)<br \/>\nprivate String wdDay;\/\/\u767d\u5929\u98ce\u5411<br \/>\n&#064;TableField(value&#061;&#034;wd_night&#034;)<br \/>\n&#064;SerializedName(&#034;wd_night&#034;)<br \/>\nprivate String wdNight;\/\/\u665a\u4e0a\u98ce\u5411<br \/>\n&#064;TableField(value&#061;&#034;text_day&#034;)<br \/>\n&#064;SerializedName(&#034;text_day&#034;)<br \/>\nprivate String textDay;\/\/\u767d\u5929\u5929\u6c14\u73b0\u8c61,\u53c2\u8003\u5929\u6c14\u53d6\u503c\u5bf9\u7167\u8868<br \/>\n&#064;TableField(value&#061;&#034;text_night&#034;)<br \/>\n&#064;SerializedName(&#034;text_night&#034;)<br \/>\nprivate String textNight;\/\/\u665a\u4e0a\u5929\u6c14\u73b0\u8c61<br \/>\n} <\/p>\n<p>\u6700\u540e\u8fd8\u6709\u9010\u5c0f\u65f6\u7684\u5929\u6c14\u9884\u62a5\u4fe1\u606fJavaBean&#xff1a;<\/p>\n<p>package com.yelang.project.weather.domain;<br \/>\nimport java.io.Serializable;<br \/>\nimport java.math.BigDecimal;<br \/>\nimport java.util.Date;<br \/>\nimport com.baomidou.mybatisplus.annotation.TableField;<br \/>\nimport com.baomidou.mybatisplus.annotation.TableId;<br \/>\nimport com.baomidou.mybatisplus.annotation.TableName;<br \/>\nimport com.fasterxml.jackson.annotation.JsonFormat;<br \/>\nimport com.google.gson.annotations.SerializedName;<br \/>\nimport lombok.AllArgsConstructor;<br \/>\nimport lombok.Getter;<br \/>\nimport lombok.NoArgsConstructor;<br \/>\nimport lombok.Setter;<br \/>\nimport lombok.ToString;<br \/>\n&#064;TableName(value &#061; &#034;biz_weather_forecast_hours&#034;)<br \/>\n&#064;NoArgsConstructor<br \/>\n&#064;AllArgsConstructor<br \/>\n&#064;Setter<br \/>\n&#064;Getter<br \/>\n&#064;ToString<br \/>\npublic class WeatherForecastHours implements Serializable{<br \/>\nprivate static final long serialVersionUID &#061; -18102820381727782L;<br \/>\n&#064;TableId(value &#061;&#034;pk_id&#034;)<br \/>\nprivate Long pkId ;\/\/\u4e3b\u952e<br \/>\n&#064;TableField(value&#061;&#034;weather_pk_id&#034;)<br \/>\nprivate Long weatherPkId;\/\/\u5b9e\u65f6\u5929\u6c14\u4fe1\u606f\u4e3b\u952e<br \/>\nprivate String text;\/\/\u5929\u6c14\u73b0\u8c61<br \/>\n&#064;TableField(value&#061;&#034;temp_fc&#034;)<br \/>\n&#064;SerializedName(&#034;temp_fc&#034;)<br \/>\nprivate BigDecimal tempFc;\/\/\u6e29\u5ea6(\u2103)<br \/>\n&#064;TableField(value&#061;&#034;wind_class&#034;)<br \/>\n&#064;SerializedName(&#034;wind_class&#034;)<br \/>\nprivate String windClass;\/\/\u98ce\u529b\u7b49\u7ea7<br \/>\n&#064;TableField(value&#061;&#034;wind_dir&#034;)<br \/>\n&#064;SerializedName(&#034;wind_dir&#034;)<br \/>\nprivate String windDir;\/\/\u98ce\u5411\u63cf\u8ff0<br \/>\nprivate BigDecimal rh;\/\/\u76f8\u5bf9\u6e7f\u5ea6<br \/>\n&#064;TableField(value&#061;&#034;prec_1h&#034;)<br \/>\n&#064;SerializedName(&#034;prec_1h&#034;)<br \/>\nprivate BigDecimal prec1h;\/\/1\u5c0f\u65f6\u7d2f\u8ba1\u964d\u6c34\u91cf(mm)<br \/>\nprivate BigDecimal clouds;\/\/\u4e91\u91cf(%)<br \/>\n&#064;JsonFormat(pattern &#061; &#034;yyyy-MM-dd HH:mm:ss&#034;)<br \/>\n&#064;TableField(value&#061;&#034;data_time&#034;)<br \/>\n&#064;SerializedName(&#034;data_time&#034;)<br \/>\nprivate Date dataTime;\/\/\u6570\u636e\u65f6\u95f4<br \/>\n} <\/p>\n<p>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u7ecf\u8fc7\u4ee5\u4e0a\u7684\u6b65\u9aa4&#xff0c;\u6211\u4eec\u5c31\u5b8c\u6210\u4e86\u5168\u90e8\u7684\u767e\u5ea6\u5929\u6c14\u76f8\u5173\u7684JavaBean\u7684\u5b9a\u4e49&#xff0c;\u63a5\u4e0b\u6765\u6211\u4eec\u5c06\u8be6\u7ec6\u4ecb\u7ecd\u5982\u4f55\u5b9e\u73b0\u5c06\u6570\u636e\u6301\u4e45\u5316\u5230PG\u6570\u636e\u5e93\u4e2d\u3002<\/p>\n<h2 id=\"%E4%B8%89%E3%80%81PostgreSQL%E6%8C%81%E4%B9%85%E5%8C%96%E5%AE%9E%E7%8E%B0\" style=\"background-color:transparent\">\u4e09\u3001PostgreSQL\u6301\u4e45\u5316\u5b9e\u73b0<\/h2>\n<p>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u5728\u5b9e\u9645\u5f00\u53d1\u8fc7\u7a0b\u4e2d&#xff0c;\u6211\u4eec\u9996\u5148\u9700\u8981\u901a\u8fc7\u767e\u5ea6\u5929\u6c14 API \u83b7\u53d6\u539f\u59cb\u7684\u5929\u6c14\u6570\u636e&#xff0c;\u8fd9\u4e9b\u6570\u636e\u901a\u5e38\u4ee5 JSON \u683c\u5f0f\u8fd4\u56de&#xff0c;\u5305\u542b\u4e86\u57ce\u5e02\u3001\u65e5\u671f\u3001\u6e29\u5ea6\u3001\u6e7f\u5ea6\u3001\u98ce\u529b\u3001\u5929\u6c14\u72b6\u51b5\u7b49\u8bf8\u591a\u4fe1\u606f\u3002\u968f\u540e&#xff0c;\u5229\u7528 Java \u7b49\u7f16\u7a0b\u8bed\u8a00\u5bf9\u8fd9\u4e9b JSON \u6570\u636e\u8fdb\u884c\u89e3\u6790&#xff0c;\u5c06\u5176\u8f6c\u6362\u4e3a\u7b26\u5408\u6570\u636e\u5e93\u5b58\u50a8\u8981\u6c42\u7684\u7ed3\u6784\u5316\u6570\u636e\u3002\u63a5\u7740&#xff0c;\u501f\u52a9 MybatisPlus \u6846\u67b6&#xff0c;\u5c06\u8fd9\u4e9b\u7ed3\u6784\u5316\u6570\u636e\u6620\u5c04\u5230\u5bf9\u5e94\u7684\u5b9e\u4f53\u7c7b\u4e2d&#xff0c;\u5e76\u901a\u8fc7\u914d\u7f6e MybatisPlus \u7684 SQL \u4f1a\u8bdd\u5de5\u5382\u3001\u6570\u636e\u6e90\u4ee5\u53ca\u76f8\u5173\u6620\u5c04\u6587\u4ef6&#xff0c;\u5b9e\u73b0\u4e0e PostgreSQL \u6570\u636e\u5e93\u7684\u8fde\u63a5\u548c\u6570\u636e\u7684\u6301\u4e45\u5316\u5b58\u50a8\u3002\u5173\u4e8e\u5982\u4f55\u91c7\u96c6\u6570\u636e\u3001JSON\u6570\u636e\u8f6c\u6362\u7684\u5185\u5bb9\u5728\u4e4b\u524d\u7684\u535a\u5ba2\u4e2d\u90fd\u6709\u6240\u6d89\u53ca&#xff0c;\u63a5\u4e0b\u6765\u6211\u4eec\u6765\u8bb2\u89e3\u6700\u540e\u4e00\u4e2a\u73af\u8282&#xff0c;\u5373\u5982\u4f55\u5c06\u91c7\u96c6\u548c\u8f6c\u6362\u540e\u7684\u6570\u636e\u6301\u4e45\u5230PG\u6570\u636e\u5e93\u4e2d\u3002<\/p>\n<h3 id=\"1%E3%80%81%E5%A4%A9%E6%B0%94%E6%95%B0%E6%8D%AE%E5%85%A5%E5%BA%93%E6%97%B6%E5%BA%8F%E5%9B%BE\">1\u3001\u5929\u6c14\u6570\u636e\u5165\u5e93\u65f6\u5e8f\u56fe<\/h3>\n<p class=\"img-center\"><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"1863\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/08\/20250814003458-689d2f327ae2a.png\" width=\"3129\" \/><\/p>\n<p>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u4e0a\u56fe\u8be6\u7ec6\u7684\u5c55\u793a\u4e86\u5982\u4f55\u5728\u53ef\u8fd0\u884c\u7a0b\u5e8f\u4e2d\u96c6\u6210\u767e\u5ea6\u63a5\u53e3&#xff0c;\u91c7\u7528\u65f6\u5e8f\u56fe\u7684\u65b9\u5f0f\u8fdb\u884c\u4e86\u8be6\u7ec6\u4ea4\u4e92\u8fc7\u7a0b\u7684\u9610\u8ff0\u3002\u6574\u4e2a\u8fc7\u7a0b\u4e00\u5171\u5206\u4e3a11\u4e2a\u6b65\u9aa4&#xff0c;\u4ece\u5165\u53e3\u7a0b\u5e8f\u8c03\u7528\u5f00\u59cb&#xff0c;\u9996\u5148\u8c03\u7528\u767e\u5ea6\u5730\u56fe\u7684\u63a5\u53e3&#xff0c;\u7136\u540e\u767e\u5ea6\u5730\u56fe\u8fd4\u56deJSON\u7ed3\u679c&#xff0c;\u7a0b\u5e8f\u89e3\u6790JSON\u53cd\u5e8f\u5217\u5316\u6210DTO\u7684JavaBean&#xff0c;\u7136\u540e\u8c03\u7528\u5929\u6c14\u670d\u52a1\u7c7b&#xff0c;\u5206\u522b\u5b9e\u73b0\u5b9e\u65f6\u5929\u6c14\u3001\u9884\u8b66\u4fe1\u606f\u3001\u751f\u6d3b\u6307\u6570\u4fe1\u606f\u3001\u9010\u65e5\u9884\u62a5\u4fe1\u606f\u3001\u9010\u5c0f\u65f6\u9884\u62a5\u4fe1\u606f\u7684PG\u5165\u5e93&#xff0c;\u6700\u540e\u8fd4\u56de\u5199\u5165\u72b6\u6001\u3002\u65f6\u5e8f\u56fe\u5728\u7ed8\u5236\u65f6&#xff0c;\u4e3a\u4e86\u7f8e\u89c2\u5728Service\u7684\u540d\u79f0\u4e0a\u6709\u4e00\u5b9a\u7701\u7565&#xff0c;\u5e0c\u671b\u4e0d\u5f71\u54cd\u9605\u8bfb\u3002<\/p>\n<h3 id=\"2%E3%80%81%E8%B0%83%E7%94%A8%E7%A8%8B%E5%BA%8F%E6%89%A7%E8%A1%8C\">2\u3001\u8c03\u7528\u7a0b\u5e8f\u6267\u884c<\/h3>\n<p>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u5173\u4e8eMybatisPlus\u4e2d\u6d89\u53ca\u7684Mapper\u3001Service\u53ca\u5176\u5b9e\u73b0\u7c7b\u5728\u6b64\u4e0d\u518d\u8fdb\u884c\u8d58\u8ff0&#xff0c;\u901a\u7528\u7684\u7a0b\u5e8f\u90fd\u6bd4\u8f83\u7b80\u5355&#xff0c;\u8fd9\u91cc\u5c06\u6838\u5fc3\u7684\u5929\u6c14\u7a0b\u5e8f\u5165\u53e3\u548c\u6301\u4e45\u5316\u5165\u53e3\u4ee5\u53ca\u5177\u4f53\u7684\u5929\u6c14\u4fe1\u606f\u5165\u5e93\u65b9\u6cd5\u5728\u8fd9\u91cc\u8ddf\u5927\u5bb6\u5206\u4eab\u3002\u5165\u53e3\u6838\u5fc3\u7a0b\u5e8f\u5982\u4e0b\u6240\u793a&#xff1a;<\/p>\n<p>package com.yelang.project.unihttp;<br \/>\nimport org.junit.Test;<br \/>\nimport org.junit.runner.RunWith;<br \/>\nimport org.springframework.beans.factory.annotation.Autowired;<br \/>\nimport org.springframework.boot.test.context.SpringBootTest;<br \/>\nimport org.springframework.test.context.junit4.SpringRunner;<br \/>\nimport com.baomidou.mybatisplus.core.toolkit.IdWorker;<br \/>\nimport com.burukeyou.uniapi.http.core.response.HttpResponse;<br \/>\nimport com.google.gson.Gson;<br \/>\nimport com.yelang.project.thridinterface.BaiduWeatherApiServcie;<br \/>\nimport com.yelang.project.weather.domain.BdWeatherDTO;<br \/>\nimport com.yelang.project.weather.domain.WeatherInfoDTO;<br \/>\nimport com.yelang.project.weather.service.IWeatherNowService;<br \/>\n&#064;SpringBootTest<br \/>\n&#064;RunWith(SpringRunner.class)<br \/>\npublic class BaiduWeather2DBCase {<br \/>\nprivate static final String DATA_TYPE &#061; &#034;all&#034;;<br \/>\n&#064;Autowired<br \/>\nprivate BaiduWeatherApiServcie baiduWeatherApiService;<br \/>\n&#064;Autowired<br \/>\nprivate IWeatherNowService weatherService;<br \/>\n&#064;Test<br \/>\npublic void bdWeather2PG() {<br \/>\nString district_id &#061; &#034;430626&#034;;\/\/\u8868\u793a\u5177\u4f53\u7684\u884c\u653f\u533a\u5212\u4ee3\u53f7<br \/>\nHttpResponse&lt;String&gt; result  &#061; baiduWeatherApiService.getWeather(district_id, DATA_TYPE);<br \/>\nSystem.out.println(result.getBodyResult());<br \/>\nGson gson &#061; new Gson();<br \/>\nBdWeatherDTO bdWeatherInfo &#061; gson.fromJson(result.getBodyResult(), BdWeatherDTO.class);<br \/>\nWeatherInfoDTO bdResult &#061; bdWeatherInfo.getResult();<br \/>\n\/\/\u5c06\u5929\u6c14\u4fe1\u606f\u6301\u4e45\u5316\u5230\u6570\u636e\u5e93\u4e2d<br \/>\nif(null !&#061; bdResult) {<br \/>\nLong weatherId &#061; IdWorker.getId();<br \/>\nbdResult.getWeatherNow().setPkId(weatherId);<br \/>\nbdResult.getWeatherNow().setLocationCode(district_id);<br \/>\nweatherService.insertWeatherInfo(bdResult);<br \/>\n}<br \/>\n}<br \/>\n}<\/p>\n<p>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u4e3a\u4e86\u5b9e\u73b0\u5929\u6c14\u6570\u636e\u7684\u5165\u5e93&#xff0c;\u5728\u4fdd\u5b58\u76f8\u5173\u7684\u751f\u6d3b\u6307\u6570\u4fe1\u606f\u3001\u9884\u8b66\u4fe1\u606f\u3001\u9010\u65e5\/\u5c0f\u65f6\u5929\u6c14\u9884\u62a5\u4fe1\u606f\u65f6&#xff0c;\u6211\u4eec\u8fd8\u8981\u5c06\u5b9e\u65f6\u5929\u6c14\u4e3b\u952e\u7ed9\u76f8\u5173\u7684\u5b50\u8868\u8d4b\u503c&#xff0c;\u8fd9\u91cc\u7ed9\u51fa\u5929\u6c14\u4fe1\u606f\u7684\u6301\u4e45\u5316\u8be6\u7ec6\u65b9\u6cd5&#xff1a;<\/p>\n<p>package com.yelang.project.weather.service.impl;<br \/>\nimport java.util.List;<br \/>\nimport org.springframework.beans.factory.annotation.Autowired;<br \/>\nimport org.springframework.stereotype.Service;<br \/>\nimport org.springframework.transaction.annotation.Propagation;<br \/>\nimport org.springframework.transaction.annotation.Transactional;<br \/>\nimport com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;<br \/>\nimport com.yelang.common.utils.StringUtils;<br \/>\nimport com.yelang.project.weather.domain.WeatherAlerts;<br \/>\nimport com.yelang.project.weather.domain.WeatherForecastHours;<br \/>\nimport com.yelang.project.weather.domain.WeatherForecasts;<br \/>\nimport com.yelang.project.weather.domain.WeatherIndexes;<br \/>\nimport com.yelang.project.weather.domain.WeatherInfoDTO;<br \/>\nimport com.yelang.project.weather.domain.WeatherNow;<br \/>\nimport com.yelang.project.weather.mapper.WeatherNowMapper;<br \/>\nimport com.yelang.project.weather.service.IWeatherAlertsService;<br \/>\nimport com.yelang.project.weather.service.IWeatherForecastHoursService;<br \/>\nimport com.yelang.project.weather.service.IWeatherForecastsService;<br \/>\nimport com.yelang.project.weather.service.IWeatherIndexesService;<br \/>\nimport com.yelang.project.weather.service.IWeatherNowService;<br \/>\n&#064;Service<br \/>\npublic class WeatherNowServiceImpl extends ServiceImpl&lt;WeatherNowMapper, WeatherNow&gt; implements IWeatherNowService{<br \/>\n&#064;Autowired<br \/>\nprivate IWeatherAlertsService alertsService;<br \/>\n&#064;Autowired<br \/>\nprivate IWeatherForecastHoursService forecastHoursService;<br \/>\n&#064;Autowired<br \/>\nprivate IWeatherForecastsService forecastsService;<br \/>\n&#064;Autowired<br \/>\nprivate IWeatherIndexesService indexesService;<br \/>\n&#064;Transactional(propagation&#061;Propagation.REQUIRED,rollbackFor&#061;Exception.class)<br \/>\n&#064;Override<br \/>\npublic void insertWeatherInfo(WeatherInfoDTO infoDto) {<br \/>\nWeatherNow now &#061; infoDto.getWeatherNow();<br \/>\n\/\/step1\u3001\u4fdd\u5b58\u5b9e\u65f6\u5929\u6c14\u4fe1\u606f<br \/>\nthis.baseMapper.insert(now);<br \/>\nLong weatherId &#061; now.getPkId();<br \/>\n\/\/step2\u3001\u4fdd\u5b58\u751f\u6d3b\u6307\u6570\u4fe1\u606f<br \/>\nList&lt;WeatherAlerts&gt; alerts &#061; infoDto.getAlerts();<br \/>\nif(StringUtils.isNotEmpty(alerts)) {<br \/>\nfor(WeatherAlerts alert : alerts) {<br \/>\nalert.setWeatherPkId(weatherId);<br \/>\n}<br \/>\nalertsService.saveBatch(alerts);<br \/>\n}<br \/>\n\/\/step3\u3001\u4fdd\u5b58\u9884\u8b66\u4fe1\u606f<br \/>\nList&lt;WeatherIndexes&gt; indexes &#061; infoDto.getIndexes();<br \/>\nif(StringUtils.isNotEmpty(indexes)) {<br \/>\nfor(WeatherIndexes index : indexes) {<br \/>\nindex.setWeatherPkId(weatherId);<br \/>\n}<br \/>\nindexesService.saveBatch(indexes);<br \/>\n}<br \/>\n\/\/step4\u3001\u4fdd\u5b58\u5929\u6c14\u9884\u62a5<br \/>\nList&lt;WeatherForecasts&gt; forecasts &#061; infoDto.getForecasts();<br \/>\nif(StringUtils.isNotEmpty(forecasts)) {<br \/>\nfor(WeatherForecasts forecast : forecasts) {<br \/>\nforecast.setWeatherPkId(weatherId);<br \/>\n}<br \/>\nforecastsService.saveBatch(forecasts);<br \/>\n}<br \/>\n\/\/step5\u3001\u4fdd\u5b58\u9010\u5c0f\u65f6\u5929\u6c14\u9884\u62a5<br \/>\nList&lt;WeatherForecastHours&gt; forecastHours &#061; infoDto.getForecastHours();<br \/>\nif(StringUtils.isNotEmpty(forecastHours)) {<br \/>\nfor(WeatherForecastHours forecastHour : forecastHours) {<br \/>\nforecastHour.setWeatherPkId(weatherId);<br \/>\n}<br \/>\nforecastHoursService.saveBatch(forecastHours);<br \/>\n}<br \/>\n}<br \/>\n} <\/p>\n<p>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u81f3\u6b64\u57fa\u672c\u5b8c\u6210\u4e86\u8c03\u7528\u7a0b\u5e8f\u548c\u5165\u53e3\u7a0b\u5e8f\u7684\u7f16\u5199&#xff0c;\u63a5\u4e0b\u6765\u5728PG\u6570\u636e\u5e93\u4e2d\u770b\u4e00\u4e0b\u5b9e\u9645\u7684\u6548\u679c\u3002<\/p>\n<h3 id=\"3%E3%80%81%E6%95%B0%E6%8D%AE%E5%85%A5%E5%BA%93%E7%BB%93%E6%9E%9C\">3\u3001\u6570\u636e\u5165\u5e93\u7ed3\u679c<\/h3>\n<p>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u6267\u884c\u4ee5\u4e0a\u7a0b\u5e8f\u53ef\u4ee5\u5728\u63a7\u5236\u53f0\u4e2d\u770b\u5230\u4ee5\u4e0b\u8f93\u51fa&#xff0c;\u8bf4\u660e\u6b63\u5e38\u7684\u5411PG\u6570\u636e\u5e93\u8fdb\u884c\u6570\u636e\u6301\u4e45\u5316\u3002<\/p>\n<p class=\"img-center\"><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"615\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/08\/20250814003502-689d2f3607c42.png\" width=\"1365\" \/><\/p>\n<p>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u6700\u540e\u6211\u4eec\u5230\u6570\u636e\u5e93\u4e2d\u67e5\u8be2\u4e00\u4e0b\u662f\u5426\u5c06\u6570\u636e\u6210\u529f\u7684\u5199\u5165&#xff0c;\u6267\u884c\u7684SQL\u5982\u4e0b&#xff1a;<\/p>\n<p>select * from biz_weather_now;<\/p>\n<p>select * from biz_weather_alerts;<\/p>\n<p>select * from biz_weather_forecasts<br \/>\nwhere weather_pk_id &#061; 1955642733221658626; <\/p>\n<p class=\"img-center\"><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"562\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/08\/20250814003502-689d2f36886ba.png\" width=\"1127\" \/><\/p>\n<p style=\"text-align:center\">\u5b9e\u65f6\u5929\u6c14\u6570\u636e<\/p>\n<p class=\"img-center\"><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"569\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/08\/20250814003503-689d2f373b4f7.png\" width=\"1104\" \/><\/p>\n<p style=\"text-align:center\">\u9010\u5c0f\u65f6\u5929\u6c14\u9884\u62a5<\/p>\n<h2 id=\"%E5%9B%9B%E3%80%81%E6%80%BB%E7%BB%93\">\u56db\u3001\u603b\u7ed3<\/h2>\n<p>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u4ee5\u4e0a\u5c31\u662f\u672c\u6587\u7684\u4e3b\u8981\u5185\u5bb9&#xff0c;\u672c\u6587\u91cd\u70b9\u5728\u4e8e\u8be6\u7ec6\u5f97\u4ecb\u7ecd\u5728MybatisPlus\u6846\u67b6\u4e2d\u5982\u4f55\u5c06\u767e\u5ea6\u5929\u6c14\u4fe1\u606f\u6301\u4e45\u5316\u5230PG\u6570\u636e\u5e93\u4e2d&#xff0c;\u9996\u5148\u4ecb\u7ecd\u5177\u4f53\u7684PG\u6570\u636e\u5e93\u7684\u8bbe\u8ba1\u4e0e\u5b9e\u73b0&#xff0c;\u7136\u540e\u8be6\u7ec6\u4ecb\u7ecdMybatisPlus\u7684\u5b9e\u4f53\u8bbe\u8ba1&#xff0c;\u6700\u540e\u4ee5\u6e90\u4ee3\u7801\u7684\u5f62\u5f0f\u4ecb\u7ecd\u5982\u4f55\u5c06\u6570\u636e\u8fdb\u884c\u6301\u4e45\u5316&#xff0c;\u671f\u5f85\u4e3a\u5927\u5bb6\u63d0\u4f9b\u4e00\u79cd\u826f\u597d\u7684\u89e3\u51b3\u65b9\u6848\u548c\u53c2\u8003\u3002\u8fd9\u4e00\u5b9e\u8df5\u8fc7\u7a0b\u4e0d\u4ec5\u6d89\u53ca\u5230\u6280\u672f\u5c42\u9762\u7684\u591a\u79cd\u77e5\u8bc6\u878d\u5408&#xff0c;\u5982\u7f51\u7edc\u7f16\u7a0b\u3001JSON \u6570\u636e\u5904\u7406\u3001\u6570\u636e\u5e93\u64cd\u4f5c\u4ee5\u53ca\u6846\u67b6\u5e94\u7528\u7b49&#xff0c;\u8fd8\u9762\u4e34\u7740\u8bf8\u5982\u6570\u636e\u51c6\u786e\u6027\u3001\u5b58\u50a8\u6548\u7387\u3001\u7cfb\u7edf\u7a33\u5b9a\u6027\u7b49\u8bf8\u591a\u6311\u6218\u3002\u901a\u8fc7\u5bf9\u6574\u4e2a\u6d41\u7a0b\u7684\u6df1\u5165\u7814\u7a76\u548c\u5b9e\u8df5\u63a2\u7d22&#xff0c;\u6211\u4eec\u5e0c\u671b\u80fd\u591f\u4e3a\u5f00\u53d1\u8005\u63d0\u4f9b\u4e00\u5957\u5b8c\u6574\u3001\u9ad8\u6548\u4e14\u53ef\u9760\u7684\u89e3\u51b3\u65b9\u6848&#xff0c;\u52a9\u529b\u5927\u5bb6\u66f4\u597d\u5730\u5229\u7528\u767e\u5ea6\u5929\u6c14\u6570\u636e&#xff0c;\u6316\u6398\u5176\u6f5c\u5728\u4ef7\u503c&#xff0c;\u540c\u65f6\u4e5f\u4e3a\u7c7b\u4f3c\u7684\u6570\u636e\u5b58\u50a8\u9879\u76ee\u63d0\u4f9b\u6709\u76ca\u7684\u53c2\u8003\u548c\u501f\u9274\u3002\u884c\u6587\u4ed3\u4fc3&#xff0c;\u5b9a\u6709\u8bb8\u591a\u7684\u4e0d\u8db3\u4e4b\u5904&#xff0c;\u6b22\u8fce\u5404\u4f4d\u670b\u53cb\u5728\u8bc4\u8bba\u533a\u6279\u8bc4\u6307\u6b63&#xff0c;\u4e0d\u80dc\u611f\u6fc0\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u6587\u7ae0\u6d4f\u89c8\u9605\u8bfb832\u6b21\uff0c\u70b9\u8d5e28\u6b21\uff0c\u6536\u85cf21\u6b21\u3002\u672c\u6587\u91cd\u70b9\u5728\u4e8e\u8be6\u7ec6\u5f97\u4ecb\u7ecd\u5728MybatisPlus\u6846\u67b6\u4e2d\u5982\u4f55\u5c06\u767e\u5ea6\u5929\u6c14\u4fe1\u606f\u6301\u4e45\u5316\u5230PG\u6570\u636e\u5e93\u4e2d\uff0c\u9996\u5148\u4ecb\u7ecd\u5177\u4f53\u7684PG\u6570\u636e\u5e93\u7684\u8bbe\u8ba1\u4e0e\u5b9e\u73b0\uff0c\u7136\u540e\u8be6\u7ec6\u4ecb\u7ecdMybatisPlus\u7684\u5b9e\u4f53\u8bbe\u8ba1\uff0c\u6700\u540e\u4ee5\u6e90\u4ee3\u7801\u7684\u5f62\u5f0f\u4ecb\u7ecd\u5982\u4f55\u5c06\u6570\u636e\u8fdb\u884c\u6301\u4e45\u5316\uff0c\u671f\u5f85\u4e3a\u5927\u5bb6\u63d0\u4f9b\u4e00\u79cd\u826f\u597d\u7684\u89e3\u51b3\u65b9\u6848\u548c\u53c2\u8003\u3002<\/p>\n","protected":false},"author":2,"featured_media":55794,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[99,5761,5759,5760],"topic":[],"class_list":{"0":"post-55801","1":"post","2":"type-post","3":"status-publish","4":"format-standard","5":"has-post-thumbnail","6":"hentry","7":"category-server","8":"tag-java","10":"tag-pg","11":"tag-5760"},"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v20.3 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>\u57fa\u4e8e MybatisPlus \u5c06\u767e\u5ea6\u5929\u6c14\u6570\u636e\u5b58\u50a8\u81f3 PostgreSQL \u6570\u636e\u5e93\u7684\u5b9e\u8df5 - \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\/55801.html\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"\u57fa\u4e8e MybatisPlus \u5c06\u767e\u5ea6\u5929\u6c14\u6570\u636e\u5b58\u50a8\u81f3 PostgreSQL \u6570\u636e\u5e93\u7684\u5b9e\u8df5 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"og:description\" content=\"\u6587\u7ae0\u6d4f\u89c8\u9605\u8bfb832\u6b21\uff0c\u70b9\u8d5e28\u6b21\uff0c\u6536\u85cf21\u6b21\u3002\u672c\u6587\u91cd\u70b9\u5728\u4e8e\u8be6\u7ec6\u5f97\u4ecb\u7ecd\u5728MybatisPlus\u6846\u67b6\u4e2d\u5982\u4f55\u5c06\u767e\u5ea6\u5929\u6c14\u4fe1\u606f\u6301\u4e45\u5316\u5230PG\u6570\u636e\u5e93\u4e2d\uff0c\u9996\u5148\u4ecb\u7ecd\u5177\u4f53\u7684PG\u6570\u636e\u5e93\u7684\u8bbe\u8ba1\u4e0e\u5b9e\u73b0\uff0c\u7136\u540e\u8be6\u7ec6\u4ecb\u7ecdMybatisPlus\u7684\u5b9e\u4f53\u8bbe\u8ba1\uff0c\u6700\u540e\u4ee5\u6e90\u4ee3\u7801\u7684\u5f62\u5f0f\u4ecb\u7ecd\u5982\u4f55\u5c06\u6570\u636e\u8fdb\u884c\u6301\u4e45\u5316\uff0c\u671f\u5f85\u4e3a\u5927\u5bb6\u63d0\u4f9b\u4e00\u79cd\u826f\u597d\u7684\u89e3\u51b3\u65b9\u6848\u548c\u53c2\u8003\u3002\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.wsisp.com\/helps\/55801.html\" \/>\n<meta property=\"og:site_name\" content=\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"article:published_time\" content=\"2025-08-14T00:35:05+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/08\/20250814003451-689d2f2b9ebfe.png\" \/>\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=\"10 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/55801.html\",\"url\":\"https:\/\/www.wsisp.com\/helps\/55801.html\",\"name\":\"\u57fa\u4e8e MybatisPlus \u5c06\u767e\u5ea6\u5929\u6c14\u6570\u636e\u5b58\u50a8\u81f3 PostgreSQL \u6570\u636e\u5e93\u7684\u5b9e\u8df5 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"isPartOf\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\"},\"datePublished\":\"2025-08-14T00:35:05+00:00\",\"dateModified\":\"2025-08-14T00:35:05+00:00\",\"author\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/55801.html#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.wsisp.com\/helps\/55801.html\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/55801.html#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.wsisp.com\/helps\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"\u57fa\u4e8e MybatisPlus \u5c06\u767e\u5ea6\u5929\u6c14\u6570\u636e\u5b58\u50a8\u81f3 PostgreSQL \u6570\u636e\u5e93\u7684\u5b9e\u8df5\"}]},{\"@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":"\u57fa\u4e8e MybatisPlus \u5c06\u767e\u5ea6\u5929\u6c14\u6570\u636e\u5b58\u50a8\u81f3 PostgreSQL \u6570\u636e\u5e93\u7684\u5b9e\u8df5 - \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\/55801.html","og_locale":"zh_CN","og_type":"article","og_title":"\u57fa\u4e8e MybatisPlus \u5c06\u767e\u5ea6\u5929\u6c14\u6570\u636e\u5b58\u50a8\u81f3 PostgreSQL \u6570\u636e\u5e93\u7684\u5b9e\u8df5 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","og_description":"\u6587\u7ae0\u6d4f\u89c8\u9605\u8bfb832\u6b21\uff0c\u70b9\u8d5e28\u6b21\uff0c\u6536\u85cf21\u6b21\u3002\u672c\u6587\u91cd\u70b9\u5728\u4e8e\u8be6\u7ec6\u5f97\u4ecb\u7ecd\u5728MybatisPlus\u6846\u67b6\u4e2d\u5982\u4f55\u5c06\u767e\u5ea6\u5929\u6c14\u4fe1\u606f\u6301\u4e45\u5316\u5230PG\u6570\u636e\u5e93\u4e2d\uff0c\u9996\u5148\u4ecb\u7ecd\u5177\u4f53\u7684PG\u6570\u636e\u5e93\u7684\u8bbe\u8ba1\u4e0e\u5b9e\u73b0\uff0c\u7136\u540e\u8be6\u7ec6\u4ecb\u7ecdMybatisPlus\u7684\u5b9e\u4f53\u8bbe\u8ba1\uff0c\u6700\u540e\u4ee5\u6e90\u4ee3\u7801\u7684\u5f62\u5f0f\u4ecb\u7ecd\u5982\u4f55\u5c06\u6570\u636e\u8fdb\u884c\u6301\u4e45\u5316\uff0c\u671f\u5f85\u4e3a\u5927\u5bb6\u63d0\u4f9b\u4e00\u79cd\u826f\u597d\u7684\u89e3\u51b3\u65b9\u6848\u548c\u53c2\u8003\u3002","og_url":"https:\/\/www.wsisp.com\/helps\/55801.html","og_site_name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","article_published_time":"2025-08-14T00:35:05+00:00","og_image":[{"url":"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2025\/08\/20250814003451-689d2f2b9ebfe.png"}],"author":"admin","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"admin","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"10 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.wsisp.com\/helps\/55801.html","url":"https:\/\/www.wsisp.com\/helps\/55801.html","name":"\u57fa\u4e8e MybatisPlus \u5c06\u767e\u5ea6\u5929\u6c14\u6570\u636e\u5b58\u50a8\u81f3 PostgreSQL \u6570\u636e\u5e93\u7684\u5b9e\u8df5 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","isPartOf":{"@id":"https:\/\/www.wsisp.com\/helps\/#website"},"datePublished":"2025-08-14T00:35:05+00:00","dateModified":"2025-08-14T00:35:05+00:00","author":{"@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41"},"breadcrumb":{"@id":"https:\/\/www.wsisp.com\/helps\/55801.html#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.wsisp.com\/helps\/55801.html"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.wsisp.com\/helps\/55801.html#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.wsisp.com\/helps"},{"@type":"ListItem","position":2,"name":"\u57fa\u4e8e MybatisPlus \u5c06\u767e\u5ea6\u5929\u6c14\u6570\u636e\u5b58\u50a8\u81f3 PostgreSQL \u6570\u636e\u5e93\u7684\u5b9e\u8df5"}]},{"@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\/55801","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=55801"}],"version-history":[{"count":0,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/55801\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media\/55794"}],"wp:attachment":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media?parent=55801"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/categories?post=55801"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/tags?post=55801"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/topic?post=55801"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}