{"id":7230,"date":"2024-11-14T15:00:01","date_gmt":"2024-11-14T07:00:01","guid":{"rendered":"https:\/\/fwq.ai\/blog\/7230\/"},"modified":"2024-11-14T15:00:01","modified_gmt":"2024-11-14T07:00:01","slug":"%e5%a6%82%e4%bd%95%e6%9f%a5%e8%af%a2%e5%ad%98%e5%9c%a8%e7%89%b9%e5%ae%9a%e5%80%bc%e4%b8%94%e5%87%ba%e7%8e%b0%e4%b8%a4%e6%ac%a1%e7%9a%84%e8%ae%b0%e5%bd%95%ef%bc%9f","status":"publish","type":"post","link":"https:\/\/fwq.ai\/blog\/7230\/","title":{"rendered":"\u5982\u4f55\u67e5\u8be2\u5b58\u5728\u7279\u5b9a\u503c\u4e14\u51fa\u73b0\u4e24\u6b21\u7684\u8bb0\u5f55\uff1f"},"content":{"rendered":"<p><img decoding=\"async\" src=\"https:\/\/img.php.cn\/upload\/article\/001\/246\/273\/173062532081757.jpg\" class=\"aligncenter\" title=\"\u5982\u4f55\u67e5\u8be2\u5b58\u5728\u7279\u5b9a\u503c\u4e14\u51fa\u73b0\u4e24\u6b21\u7684\u8bb0\u5f55\uff1f\u63d2\u56fe\" alt=\"\u5982\u4f55\u67e5\u8be2\u5b58\u5728\u7279\u5b9a\u503c\u4e14\u51fa\u73b0\u4e24\u6b21\u7684\u8bb0\u5f55\uff1f\u63d2\u56fe\" \/><\/p>\n<p><strong>\u5982\u4f55\u67e5\u8be2\u5b58\u5728\u7279\u5b9a\u503c\u5e76\u51fa\u73b0\u4e24\u6b21\u7684\u8bb0\u5f55<\/strong><\/p>\n<p><strong>\u95ee\u9898\uff1a<\/strong><\/p>\n<p>\u5982\u4f55\u4f7f\u7528  \u67e5\u8be2\u7279\u5b9a\u5b57\u6bb5\u4e3a\u7ed9\u5b9a\u503c\uff0c\u4e14\u53e6\u4e00\u4e2a\u5b57\u6bb5\u7684\u503c\u5728\u8868\u4e2d\u81f3\u5c11\u51fa\u73b0\u4e24\u6b21\u7684\u8bb0\u5f55\uff1f<\/p>\n<p><strong>\u7b54\u6848\uff1a<\/strong><\/p>\n<p>\u9996\u5148\uff0c\u4f7f\u7528\u5b50\u67e5\u8be2\u627e\u51fa return_code \u4e3a success \u4e14 count(*) \u5927\u4e8e\u6216\u7b49\u4e8e 2 \u7684 refund_id\u3002<\/p>\n<pre>select refund_id from \u8868\nwhere return_code = 'success'\ngroup by refund_id\nhaving count(*) &gt;= 2<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/p>\n<p>\u7136\u540e\uff0c\u4f7f\u7528\u8fd9\u4e9b refund_id \u6765\u8fc7\u6ee4\u4e3b\u67e5\u8be2\uff0c\u9009\u62e9\u6ee1\u8db3\u6761\u4ef6\u7684\u8bb0\u5f55\u3002<\/p>\n<pre>select * from \u8868\nwhere refund_id in (\n    select refund_id from \u8868\n    where return_code = 'success'\n    group by refund_id\n    having count(*) &gt;= 2\n);<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/p>\n<p>\u4f8b\u5982\uff0c\u5bf9\u4e8e\u7ed9\u5b9a\u7684\u6570\u636e\uff0c\u8fd9\u4e2a\u67e5\u8be2\u5c06\u8fd4\u56de\u4ee5\u4e0b\u7ed3\u679c\uff1a<\/p>\n<pre>| \u5e8f\u53f7 | refund_id | return_code |\n|---|---|---|\n| 1 | 520403 | SUCCESS |\n| 2 | 520403 | SUCCESS |<\/pre>\n<p> \u767b\u5f55\u540e\u590d\u5236 <\/p>\n<p>\u4ee5\u4e0a\u5c31\u662f\u5982\u4f55\u67e5\u8be2\u5b58\u5728\u7279\u5b9a\u503c\u4e14\u51fa\u73b0\u4e24\u6b21\u7684\u8bb0\u5f55\uff1f\u7684\u8be6\u7ec6\u5185\u5bb9\uff0c\u66f4\u591a\u8bf7\u5173\u6ce8\u7c73\u4e91\u7f51\u5176\u5b83\u76f8\u5173\u6587\u7ae0\uff01<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u5982\u4f55\u67e5\u8be2\u5b58\u5728\u7279\u5b9a\u503c\u5e76\u51fa\u73b0\u4e24\u6b21\u7684\u8bb0\u5f55 \u95ee\u9898\uff1a \u5982\u4f55\u4f7f\u7528 \u67e5\u8be2\u7279\u5b9a\u5b57\u6bb5\u4e3a\u7ed9\u5b9a\u503c\uff0c\u4e14\u53e6\u4e00\u4e2a\u5b57\u6bb5\u7684\u503c\u5728\u8868\u4e2d\u81f3\u5c11\u51fa\u73b0\u4e24\u6b21\u7684\u8bb0\u5f55\uff1f \u7b54\u6848\uff1a \u9996\u5148\uff0c\u4f7f\u7528\u5b50\u67e5\u8be2\u627e\u51fa return_code \u4e3a success \u4e14 count(*) \u5927\u4e8e\u6216\u7b49\u4e8e 2 \u7684 refund_id\u3002 select refund_id from \u8868 where return_code = &#8216;success&#8217; group by refund_id having count(*) &gt;= 2 \u767b\u5f55\u540e\u590d\u5236 \u7136\u540e\uff0c\u4f7f\u7528\u8fd9\u4e9b refund_id \u6765\u8fc7\u6ee4\u4e3b\u67e5\u8be2\uff0c\u9009\u62e9\u6ee1\u8db3\u6761\u4ef6\u7684\u8bb0\u5f55\u3002 select * from \u8868 where refund_id in ( select refund_id from \u8868 where return_code = &#8216;success&#8217; group by refund_id having count(*) [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[16],"tags":[],"class_list":["post-7230","post","type-post","status-publish","format-standard","hentry","category-16"],"_links":{"self":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/7230","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/comments?post=7230"}],"version-history":[{"count":0,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/7230\/revisions"}],"wp:attachment":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/media?parent=7230"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/categories?post=7230"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/tags?post=7230"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}