{"id":156519,"date":"2020-09-17T19:30:37","date_gmt":"2020-09-17T11:30:37","guid":{"rendered":"http:\/\/4563.org\/?p=156519"},"modified":"2020-09-17T19:30:37","modified_gmt":"2020-09-17T11:30:37","slug":"%e4%bb%8e%e6%95%b0%e6%8d%ae%e5%ba%93%e4%b8%ad%e6%8d%9e%e5%8f%96%e6%9f%90%e4%b8%aa%e5%ad%97%e6%ae%b5%e5%92%8c%e4%b8%ba%e7%89%b9%e5%ae%9a%e5%80%bc%e7%9a%84%e8%ae%b0%e5%bd%95","status":"publish","type":"post","link":"http:\/\/4563.org\/?p=156519","title":{"rendered":"\u4ece\u6570\u636e\u5e93\u4e2d\u635e\u53d6\u67d0\u4e2a\u5b57\u6bb5\u548c\u4e3a\u7279\u5b9a\u503c\u7684\u8bb0\u5f55"},"content":{"rendered":"<div>\n<div>\n<div>\n<h1>                  \u4ece\u6570\u636e\u5e93\u4e2d\u635e\u53d6\u67d0\u4e2a\u5b57\u6bb5\u548c\u4e3a\u7279\u5b9a\u503c\u7684\u8bb0\u5f55               <\/h1>\n<p> <\/p>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : qmaker <\/span>  <span><i><\/i> 7<\/span> <\/div>\n<div> <\/div>\n<\/p><\/div>\n<\/p><\/div>\n<\/p><\/div>\n<div isfirst=\"1\"> <\/p>\n<p>\u5047\u8bbe\u8868 t_pay \u4e2d\u6709\u4e00\u4e2a\u5b57\u6bb5\u4e3a amount,int \u7c7b\u578b\uff1b\u73b0\u5728\u9700\u8981\u4ece\u8868\u4e2d\u968f\u673a\u635e\u53d6\u4e00\u6279\u8bb0\u5f55\uff0c\u6ee1\u8db3 2000&gt;sum(amount)&gt;10000,\u8bf7\u95ee\u6709\u6ca1\u6709\u4ec0\u4e48\u597d\u7684\u65b9\u6cd5<\/p>\n<\/p><\/div>\n<div> <b>\u5927\u4f6c\u6709\u8a71\u8aaa<\/b> (<span>9<\/span>)        <\/div>\n<div> <\/div>\n<\/p><\/div>\n<\/p><\/div>\n<ul>\n<li data-pid=\"3271712\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : fuyufjh <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u662f\u6027\u80fd\u5173\u952e\u7684\u573a\u666f\u5417\uff1f<br \/>\u662f &#8211;&gt; \u7528 stored procedure \u628a\u7ed3\u679c\u5199\u5230\u4e34\u65f6\u8868\uff0c\u7136\u540e\u4e00\u6b21 select \u8bfb\u53d6<br \/>\u4e0d\u662f &#8211;&gt; \u6bcf\u6b21 select limit 100\uff0c\u4e0d\u591f\u5c31\u518d\u6765\u4e00\u6279                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"3271713\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u4e3b<\/span> <span>\u8cc7\u6df1\u5927\u4f6c : qmaker <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u6761\u4ef6\u66f4\u6b63 2000&gt;sum(amount)&gt;10000 =\u300b 20000&gt;sum(amount)&gt;10000                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"3271714\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u4e3b<\/span> <span>\u8cc7\u6df1\u5927\u4f6c : qmaker <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @fuyufjh \u5bf9\u5b9e\u65f6\u6027\u8981\u6c42\u6bd4\u8f83\u9ad8\uff0c\u5176\u5b9e\u662f\u6709\u591a\u4e2a\u9700\u6c42\u6c60\uff0c\u6bd4\u5982\u6c60 A \u8981\u6c42 sum(amount)\u224810000\uff0c\u6c60 B \u8981\u6c42 sum(amount)\u224880000\uff0c\u76ee\u524d\u60f3\u5230\u7684\u529e\u6cd5\u662f\u5355\u4e2a\u8bb0\u5f55\u5904\u7406\uff0c\u6bcf\u6761\u8bb0\u5f55\u53d6\u51fa\u540e\u4e22\u5230\u67d0\u4e2a\u6c60\u91cc\uff0c\u6c60\u84c4\u6ee1\u4e86\u5c31\u63a5\u7740\u7eed\u4e0b\u4e2a\u6c60\uff0c\u4e0d\u8fc7\u5355\u4e2a\u5904\u7406\u6548\u7387\u611f\u89c9\u8fd8\u662f\u6bd4\u8f83\u4f4e                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"3271715\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : taogen <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             1. \u91cd\u590d\u5730\u968f\u673a\u53d6\u4e00\u6279\u503c\uff0c\u53ef\u4ee5\u4e00\u6b21\u968f\u673a\u53d6 1 \u6761\u6216\u8005 N \u6761\uff0c\u653e\u5165 list \u4e2d\u3002\u76f4\u5230 sum \u6ee1\u8db3\u6761\u4ef6\u6216\u8005 sum \u5927\u4e86\u3002<br \/>2. \u82e5 sum \u6ee1\u8db3\u6761\u4ef6\uff0c\u76f4\u63a5\u8fd4\u56de\u3002\u82e5 sum \u5927\u4e86\uff0c\u4f7f\u7528\u52a8\u6001\u89c4\u5212\u627e\u5230\u6ee1\u8db3\u6761\u4ef6\u7684\u5b50\u6bb5\u548c\u3002<br \/>3. \u82e5\u52a8\u6001\u89c4\u5212\u627e\u5230\u6709\u6548\u89e3\u8fd4\u56de\u3002\u82e5\u627e\u4e0d\u5230\u6709\u6548\u89e3\uff0c\u6e05\u7a7a list\uff0c\u8df3\u8f6c\u5230\u7b2c 1 \u6b65\u3002                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"3271716\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : taogen <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u4f60\u8fd9\u4e2a\u9700\u6c42\u4e0d\u4e00\u5b9a\u6709\u89e3\uff0c\u53ef\u80fd\u51fa\u73b0\u6b7b\u5faa\u73af\u3002\u53ef\u4ee5\u8bbe\u7f6e\u6700\u5927\u5bfb\u627e\u6b21\u6570\uff0c\u8d85\u8fc7\u9650\u5236\u6b21\u6570\u89c6\u4e3a\u65e0\u89e3\uff0c\u63d0\u793a\u6682\u65e0\u6570\u636e\u3002                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"3271717\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : kkeiko <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u5199\u5165\u6570\u636e\u5e93\u7684\u65f6\u5019\uff0c\u628a\u8fd9\u4e2a\u5b57\u6bb5\u4f5c\u4e3a\u6392\u5e8f\u503c\uff0c\u5176\u4ed6\u5b57\u6bb5\u6253\u5305 json \u5199\u5165 redis \u7684\u6709\u5e8f\u96c6\u5408\uff0credis key \u6839\u636e\u4e00\u5b9a\u7684\u4e1a\u52a1\u89c4\u5219\u8fdb\u884c hash\uff0c\u591a\u5206\u4e00\u4e9b key\uff0c\u6bcf\u6b21\u4ece\u4e0d\u540c\u7684 key \u53d6\u51fa\u5728\u6b64\u8303\u56f4\u5185\u7684\u6570\u636e\uff0c\u591a\u53d6\u4e00\u4e9b\uff0c\u518d\u5408\u5e76\uff0c\u6839\u636e\u67d0\u4e2a\u6761\u4ef6\u6392\u4e2a\u5e8f\uff0c\u53d6\u524d\u51e0\u4f4d\uff0c\u505a\u76f8\u5bf9\u968f\u673a\u7684\u6548\u679c\u3002                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"3271718\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : rockyou12 <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u5148\u5f00\u5f20\u8868\u8bb0\u5f55\u4e0b\u5355\u6761\u503c\u7684\u533a\u95f4\u5206\u5e03\uff0c\u7136\u540e\u53bb\u62ff\u5404\u4e2a\u533a\u95f4\u5185\u5bf9\u5e94\u7684\u503c\uff1f                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"3271719\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : taogen <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @rockyou12 \u6709\u4e24\u4e2a\u95ee\u9898\u30021. \u533a\u95f4\u7684\u5bbd\u5ea6\u5982\u4f55\u8bbe\u7f6e\uff1f 2. \u5728 1 \u4e2d\u8bbe\u7f6e\u7684\u533a\u95f4\u5bbd\u5ea6\u4e0b\uff0c\u5982\u4f55\u9009\u62e9\u533a\u95f4\u627e\u5230\u6709\u6548\u89e3\u7684\u7b97\u6cd5\u662f\u4ec0\u4e48\uff1f                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"3271720\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : rockyou12 <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @taogen \u533a\u95f4\u597d\u8bf4\uff0c\u5148\u6839\u636e\u4e1a\u52a1\u53d6\u7ec6\u4e00\u70b9\uff0c\u6bd4\u5982\u603b\u533a\u95f4\u662f 0-2000\uff0c\u90a3\u5c31\u4ee5 10 \u4e3a\u95f4\u9694\u6765\u53d6\u3002\u7136\u540e\u901a\u8fc7\u7c7b\u578b flink \u8fd9\u79cd\u6d41\u8ba1\u7b97\u6846\u67b6\u5148\u9884\u8ba1\u7b97\u6bcf\u4e2a\u533a\u95f4\u7684\u603b\u6570\uff0c\u548c\u8bb0\u5f55\u8be5\u533a\u95f4\u4e2d\u6709\u54ea\u4e9b\u503c\uff08\u53ef\u4ee5\u653e\u5165 redis \u7684 hset \uff09\uff0c\u7136\u540e\u6574\u4e2a\u5206\u5e03\u5c31\u6709\u4e86                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li>\n","protected":false},"excerpt":{"rendered":"<p>\u4ece\u6570\u636e\u5e93\u4e2d\u635e\u53d6\u67d0\u4e2a\u5b57\u6bb5\u548c\u4e3a\u7279\u5b9a\u503c\u7684&hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[],"tags":[],"_links":{"self":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts\/156519"}],"collection":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=156519"}],"version-history":[{"count":0,"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts\/156519\/revisions"}],"wp:attachment":[{"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=156519"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=156519"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=156519"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}