diff --git a/common/common.go b/common/common.go index 9c5bf91..e03e17c 100644 --- a/common/common.go +++ b/common/common.go @@ -9,7 +9,7 @@ import ( var Layout = "2006-01-02 15:04:05" var YSEPAYURL = "https://qrcode.ysepay.com/gateway.do" //银盛的微信小程序接口地址 -func HttpPost(url string, jsonBytes []byte) ([]byte, error) { +func HttpPost(url string, contentType string, jsonBytes []byte) ([]byte, error) { resp, err := http.Post(url, "application/json", bytes.NewReader(jsonBytes)) if err != nil { return nil, err diff --git a/config.yaml b/config.yaml index 0d22496..d543939 100644 --- a/config.yaml +++ b/config.yaml @@ -20,7 +20,7 @@ weixin: appId: "wx5078c9d7b9eca030" #"wx231bd3f08954da9e" #微信小程序appid ysepay: url: "http://127.0.0.1:8080/pay" - notifyUrl: "http://xxxxxxxxxxxxx/ysePay/notifyWxPay" + notifyUrl: "http://xxxxxxxxxxxxx/ysePay/notifyPay" CERTID: "826452972730006" busCode: "00510030" #业务代码 MQTT: diff --git a/controller/pay.go b/controller/pay.go index 4d38ddf..b1b69f9 100644 --- a/controller/pay.go +++ b/controller/pay.go @@ -11,7 +11,7 @@ type Pay struct { payService service.Pay //服务类 } -// 微信小程序,支付接口 +// 扫码,支付接口 func (t *Pay) RouterGroup(group *ghttp.RouterGroup) { group.POST("/payQrCode", t.payService.PayQrCode) } diff --git a/controller/ysePay.go b/controller/ysePay.go index 934464d..218693e 100644 --- a/controller/ysePay.go +++ b/controller/ysePay.go @@ -13,5 +13,5 @@ type YsePay struct { // 银盛异步通知余乐兑支付结果接口 func (t *YsePay) RouterGroup(group *ghttp.RouterGroup) { - group.POST("/notifyWxPay", t.ysePayService.NotifyWxPay) + group.POST("/notifyPay", t.ysePayService.NotifyPay) } diff --git a/log/2024-11-06.log b/log/2024-11-06.log deleted file mode 100644 index 42c972f..0000000 --- a/log/2024-11-06.log +++ /dev/null @@ -1,41 +0,0 @@ -2024-11-06 10:49:02.779 mqtt.go:31: MQTT连接地址: mqtt://101.200.127.15:1883 -2024-11-06 10:49:02.812 main.go:25: 初始化成功 -2024-11-06 10:49:19.872 pay.go:31: {POST /wxApi/payQrCode HTTP/1.1 1 1 map[Accept:[*/*] Accept-Encoding:[gzip, deflate, br] Connection:[keep-alive] Content-Length:[172] Content-Type:[application/json] Postman-Token:[3afbb558-9808-41f2-b06d-c3a07b0c8323] User-Agent:[PostmanRuntime/7.42.0]] 0xc0001da180 172 [] false 127.0.0.1:8080 map[] map[] map[] 127.0.0.1:53564 /wxApi/payQrCode 0xc0005b8780 [] map[]} -2024-11-06 10:49:19.873 pay.go:38: {ShopId:ccccwsdfwefwefwef Price:65.3 Amount:65.2 Bean:0.1 OpenId:aaaaaaaaaaaaaaaaabbbbbbbb Mobile:15963264270} -2024-11-06 10:49:20.014 200 /wxApi/payQrCode sql: no rows in result set -2024-11-06 11:19:09.423 pay.go:31: {POST /wxApi/payQrCode HTTP/1.1 1 1 map[Accept:[*/*] Accept-Encoding:[gzip, deflate, br] Connection:[keep-alive] Content-Length:[165] Content-Type:[application/json] Postman-Token:[f96dc232-7ca4-442f-a6b9-3ecafa3961e5] User-Agent:[PostmanRuntime/7.42.0]] 0xc0001da140 165 [] false 127.0.0.1:8080 map[] map[] map[] 127.0.0.1:53942 /wxApi/payQrCode 0xc0002ac300 [] map[]} -2024-11-06 11:19:09.423 pay.go:38: {ShopId:aaaaaaaaaa Price:65.3 Amount:65.2 Bean:0.1 OpenId:aaaaaaaaaaaaaaaaabbbbbbbb Mobile:15963264270} -2024-11-06 11:19:09.565 200 /wxApi/payQrCode INSERT INTO "pay_order"("orderId","price","amount","bean","openId","mobile","shopId","created","updated") VALUES('pyacyq0f6k0d5ers1qw07vg200sxh8e7',65.3,65.2,0.1,'aaaaaaaaaaaaaaaaabbbbbbbb','15963264270','aaaaaaaaaa','2024-11-06 11:19:09','2024-11-06 11:19:09') RETURNING "orderId": pq: null value in column "ysePayStatus" of relation "pay_order" violates not-null constraint -2024-11-06 11:19:59.111 mqtt.go:31: MQTT连接地址: mqtt://101.200.127.15:1883 -2024-11-06 11:19:59.139 main.go:25: 初始化成功 -2024-11-06 11:20:04.080 pay.go:31: {POST /wxApi/payQrCode HTTP/1.1 1 1 map[Accept:[*/*] Accept-Encoding:[gzip, deflate, br] Connection:[keep-alive] Content-Length:[165] Content-Type:[application/json] Postman-Token:[c7ccfd37-7354-4590-bcb7-a8ac2b31f1a7] User-Agent:[PostmanRuntime/7.42.0]] 0xc000105100 165 [] false 127.0.0.1:8080 map[] map[] map[] 127.0.0.1:53965 /wxApi/payQrCode 0xc000264630 [] map[]} -2024-11-06 11:20:07.651 pay.go:38: {ShopId:aaaaaaaaaa Price:65.3 Amount:65.2 Bean:0.1 OpenId:aaaaaaaaaaaaaaaaabbbbbbbb Mobile:15963264270} -2024-11-06 11:24:43.455 mqtt.go:31: MQTT连接地址: mqtt://101.200.127.15:1883 -2024-11-06 11:24:43.488 main.go:25: 初始化成功 -2024-11-06 11:24:59.094 mqtt.go:31: MQTT连接地址: mqtt://101.200.127.15:1883 -2024-11-06 11:24:59.129 main.go:25: 初始化成功 -2024-11-06 11:25:01.860 pay.go:31: {POST /wxApi/payQrCode HTTP/1.1 1 1 map[Accept:[*/*] Accept-Encoding:[gzip, deflate, br] Connection:[keep-alive] Content-Length:[165] Content-Type:[application/json] Postman-Token:[7e79b932-e1cb-400e-8f83-9864b4f5aeac] User-Agent:[PostmanRuntime/7.42.0]] 0xc0001d2280 165 [] false 127.0.0.1:8080 map[] map[] map[] 127.0.0.1:54024 /wxApi/payQrCode 0xc0001cf050 [] map[]} -2024-11-06 11:25:03.841 pay.go:38: {ShopId:aaaaaaaaaa Price:65.3 Amount:65.2 Bean:0.1 OpenId:aaaaaaaaaaaaaaaaabbbbbbbb Mobile:15963264270} -2024-11-06 11:25:28.724 200 /wxApi/payQrCode unexpected end of JSON input -2024-11-06 11:26:22.403 ysepay.go:22: {POST /ysePay/notifyWxPay HTTP/1.1 1 1 map[Accept:[*/*] Accept-Encoding:[gzip, deflate, br] Connection:[keep-alive] Content-Length:[211] Content-Type:[application/json] Postman-Token:[898c5cac-78ed-482c-9bb9-e446fe9f3543] User-Agent:[PostmanRuntime/7.42.0]] 0xc00007d2c0 211 [] false 127.0.0.1:8080 map[] map[] map[] 127.0.0.1:54040 /ysePay/notifyWxPay 0xc0001cfb90 [] map[]} -2024-11-06 11:32:22.797 mqtt.go:31: MQTT连接地址: mqtt://101.200.127.15:1883 -2024-11-06 11:32:22.828 main.go:25: 初始化成功 -2024-11-06 11:32:44.567 ysepay.go:22: {POST /ysePay/notifyWxPay HTTP/1.1 1 1 map[Accept:[*/*] Accept-Encoding:[gzip, deflate, br] Connection:[keep-alive] Content-Length:[211] Content-Type:[application/json] Postman-Token:[2500771c-f91a-4184-8f0b-3ab008c54eed] User-Agent:[PostmanRuntime/7.42.0]] 0xc0001da5c0 211 [] false 127.0.0.1:8080 map[] map[] map[] 127.0.0.1:54118 /ysePay/notifyWxPay 0xc000030690 [] map[]} -2024-11-06 11:32:44.693 200 /ysePay/notifyWxPay SELECT "order_id","price","amount","bean","open_id","mobile","shop_id","created","updated","ysepay_status" FROM "pay_order" WHERE orderId = 'pyacyq08u00d5erwl40rvgk200i0fyaq' LIMIT 1: pq: column "orderid" does not exist -2024-11-06 11:33:07.822 mqtt.go:31: MQTT连接地址: mqtt://101.200.127.15:1883 -2024-11-06 11:33:07.855 main.go:25: 初始化成功 -2024-11-06 11:33:14.488 ysepay.go:22: {POST /ysePay/notifyWxPay HTTP/1.1 1 1 map[Accept:[*/*] Accept-Encoding:[gzip, deflate, br] Connection:[keep-alive] Content-Length:[211] Content-Type:[application/json] Postman-Token:[700622f3-b3c9-462b-a0b8-3622cd196fff] User-Agent:[PostmanRuntime/7.42.0]] 0xc00007d100 211 [] false 127.0.0.1:8080 map[] map[] map[] 127.0.0.1:54134 /ysePay/notifyWxPay 0xc000111ce0 [] map[]} -2024-11-06 11:34:27.699 mqtt.go:31: MQTT连接地址: mqtt://101.200.127.15:1883 -2024-11-06 11:34:27.737 main.go:25: 初始化成功 -2024-11-06 11:34:32.619 ysepay.go:22: {POST /ysePay/notifyWxPay HTTP/1.1 1 1 map[Accept:[*/*] Accept-Encoding:[gzip, deflate, br] Connection:[keep-alive] Content-Length:[211] Content-Type:[application/json] Postman-Token:[a0399e86-c7cd-4aaf-844e-dcba9d00c0a1] User-Agent:[PostmanRuntime/7.42.0]] 0xc00009a5c0 211 [] false 127.0.0.1:8080 map[] map[] map[] 127.0.0.1:54149 /ysePay/notifyWxPay 0xc000258b70 [] map[]} -2024-11-06 11:35:02.646 200 /ysePay/notifyWxPay parsing time "2024-04-5 15:32:39" as "2006-01-02 15:04:05": cannot parse "5 15:32:39" as "02" -2024-11-06 11:35:06.831 ysepay.go:22: {POST /ysePay/notifyWxPay HTTP/1.1 1 1 map[Accept:[*/*] Accept-Encoding:[gzip, deflate, br] Connection:[keep-alive] Content-Length:[212] Content-Type:[application/json] Postman-Token:[fddf4aed-ed24-4509-bdf7-50f3a436ef22] User-Agent:[PostmanRuntime/7.42.0]] 0xc0001d25c0 212 [] false 127.0.0.1:8080 map[] map[] map[] 127.0.0.1:54149 /ysePay/notifyWxPay 0xc000258c90 [] map[]} -2024-11-06 11:35:55.810 200 /ysePay/notifyWxPay -2024-11-06 11:37:08.778 mqtt.go:31: MQTT连接地址: mqtt://101.200.127.15:1883 -2024-11-06 11:37:08.818 main.go:25: 初始化成功 -2024-11-06 11:37:18.545 ysepay.go:22: {POST /ysePay/notifyWxPay HTTP/1.1 1 1 map[Accept:[*/*] Accept-Encoding:[gzip, deflate, br] Connection:[keep-alive] Content-Length:[212] Content-Type:[application/json] Postman-Token:[6bfe39fd-34bb-45bf-9c62-8339f8b38de3] User-Agent:[PostmanRuntime/7.42.0]] 0xc0001d22c0 212 [] false 127.0.0.1:8080 map[] map[] map[] 127.0.0.1:54181 /ysePay/notifyWxPay 0xc0000a5470 [] map[]} -2024-11-06 11:37:36.129 200 /ysePay/notifyWxPay -2024-11-06 15:15:21.888 mqtt.go:31: MQTT连接地址: mqtt://101.200.127.15:1883 -2024-11-06 15:15:21.923 main.go:25: 初始化成功 -2024-11-06 15:15:28.377 mqtt.go:31: MQTT连接地址: mqtt://101.200.127.15:1883 -2024-11-06 15:15:28.410 main.go:25: 初始化成功 diff --git a/log/2024-11-07.log b/log/2024-11-07.log deleted file mode 100644 index 53186fc..0000000 --- a/log/2024-11-07.log +++ /dev/null @@ -1,46 +0,0 @@ -2024-11-07 17:07:35.056 mqtt.go:31: MQTT连接地址: mqtt://101.200.127.15:1883 -2024-11-07 17:07:35.085 main.go:25: 初始化成功 -2024-11-07 17:07:38.843 pay.go:31: {POST /wxApi/payQrCode HTTP/1.1 1 1 map[Accept:[*/*] Accept-Encoding:[gzip, deflate, br] Connection:[keep-alive] Content-Length:[165] Content-Type:[application/json] Postman-Token:[d16b68b0-f446-4fb8-9806-126c00da3a42] User-Agent:[PostmanRuntime/7.42.0]] 0xc0002643c0 165 [] false 127.0.0.1:8000 map[] map[] map[] 127.0.0.1:55583 /wxApi/payQrCode 0xc00033e7b0 [] map[]} -2024-11-07 17:07:40.912 pay.go:38: {ShopId:aaaaaaaaaa Price:65.3 Amount:65.2 Bean:0.1 OpenId:aaaaaaaaaaaaaaaaabbbbbbbb Mobile:15963264270 Channel:0} -2024-11-07 17:08:26.172 mqtt.go:31: MQTT连接地址: mqtt://101.200.127.15:1883 -2024-11-07 17:08:26.214 main.go:25: 初始化成功 -2024-11-07 17:08:29.530 pay.go:31: {POST /wxApi/payQrCode HTTP/1.1 1 1 map[Accept:[*/*] Accept-Encoding:[gzip, deflate, br] Connection:[keep-alive] Content-Length:[183] Content-Type:[application/json] Postman-Token:[378a53b3-6d06-4c2e-946a-1957a52ab990] User-Agent:[PostmanRuntime/7.42.0]] 0xc0001f4140 183 [] false 127.0.0.1:8000 map[] map[] map[] 127.0.0.1:55606 /wxApi/payQrCode 0xc00033c720 [] map[]} -2024-11-07 17:08:31.442 pay.go:38: {ShopId:aaaaaaaaaa Price:65.3 Amount:65.2 Bean:0.1 OpenId:aaaaaaaaaaaaaaaaabbbbbbbb Mobile:15963264270 Channel:1} -2024-11-07 17:15:07.911 mqtt.go:31: MQTT连接地址: mqtt://101.200.127.15:1883 -2024-11-07 17:15:07.944 main.go:25: 初始化成功 -2024-11-07 17:15:13.410 pay.go:29: {POST /wxApi/payQrCode HTTP/1.1 1 1 map[Accept:[*/*] Accept-Encoding:[gzip, deflate, br] Connection:[keep-alive] Content-Length:[183] Content-Type:[application/json] Postman-Token:[93d13185-595e-4b36-b2fb-27763c437f62] User-Agent:[PostmanRuntime/7.42.0]] 0xc000262200 183 [] false 127.0.0.1:8000 map[] map[] map[] 127.0.0.1:55728 /wxApi/payQrCode 0xc000360960 [] map[]} -2024-11-07 17:15:15.597 pay.go:36: {ShopId:aaaaaaaaaa Price:65.3 Amount:65.2 Bean:0.1 OpenId:aaaaaaaaaaaaaaaaabbbbbbbb Mobile:15963264270 Channel:1} -2024-11-07 17:23:17.264 mqtt.go:31: MQTT连接地址: mqtt://101.200.127.15:1883 -2024-11-07 17:23:17.296 main.go:25: 初始化成功 -2024-11-07 17:23:33.962 pay.go:29: {POST /wxApi/payQrCode HTTP/1.1 1 1 map[Accept:[*/*] Accept-Encoding:[gzip, deflate, br] Connection:[keep-alive] Content-Length:[183] Content-Type:[application/json] Postman-Token:[36e0dc61-eaff-4a7d-bc01-7e3f55af52c9] User-Agent:[PostmanRuntime/7.42.0]] 0xc00007d100 183 [] false 127.0.0.1:8000 map[] map[] map[] 127.0.0.1:56619 /wxApi/payQrCode 0xc0002618c0 [] map[]} -2024-11-07 17:23:33.962 pay.go:36: {ShopId:aaaaaaaaaa Price:65.3 Amount:65.2 Bean:0.1 OpenId:aaaaaaaaaaaaaaaaabbbbbbbb Mobile:15963264270 Channel:1} -2024-11-07 17:25:10.675 mqtt.go:31: MQTT连接地址: mqtt://101.200.127.15:1883 -2024-11-07 17:25:10.703 main.go:25: 初始化成功 -2024-11-07 17:25:13.071 pay.go:29: {POST /wxApi/payQrCode HTTP/1.1 1 1 map[Accept:[*/*] Accept-Encoding:[gzip, deflate, br] Connection:[keep-alive] Content-Length:[183] Content-Type:[application/json] Postman-Token:[6d1c0d36-fcbf-4ca1-9c23-f25696bf3379] User-Agent:[PostmanRuntime/7.42.0]] 0xc00031a4c0 183 [] false 127.0.0.1:8000 map[] map[] map[] 127.0.0.1:56683 /wxApi/payQrCode 0xc0002a1650 [] map[]} -2024-11-07 17:25:13.072 pay.go:36: {ShopId:aaaaaaaaaa Price:65.3 Amount:65.2 Bean:0.1 OpenId:aaaaaaaaaaaaaaaaabbbbbbbb Mobile:15963264270 Channel:1} -2024-11-07 17:34:49.408 mqtt.go:31: MQTT连接地址: mqtt://101.200.127.15:1883 -2024-11-07 17:34:49.438 main.go:25: 初始化成功 -2024-11-07 17:34:57.512 pay.go:29: {POST /wxApi/payQrCode HTTP/1.1 1 1 map[Accept:[*/*] Accept-Encoding:[gzip, deflate, br] Connection:[keep-alive] Content-Length:[183] Content-Type:[application/json] Postman-Token:[c1f43b19-370f-48e0-8951-570522b924fe] User-Agent:[PostmanRuntime/7.42.0]] 0xc00007c180 183 [] false 127.0.0.1:8000 map[] map[] map[] 127.0.0.1:56853 /wxApi/payQrCode 0xc00033ecc0 [] map[]} -2024-11-07 17:34:57.513 pay.go:36: {ShopId:aaaaaaaaaa Price:65.3 Amount:65.2 Bean:0.1 OpenId:aaaaaaaaaaaaaaaaabbbbbbbb Mobile:15963264270 Channel:1} -2024-11-07 17:43:23.746 mqtt.go:31: MQTT连接地址: mqtt://101.200.127.15:1883 -2024-11-07 17:43:23.777 main.go:25: 初始化成功 -2024-11-07 17:43:42.690 pay.go:29: {POST /wxApi/payQrCode HTTP/1.1 1 1 map[Accept:[*/*] Accept-Encoding:[gzip, deflate, br] Connection:[keep-alive] Content-Length:[183] Content-Type:[application/json] Postman-Token:[7a426374-fcd7-4ba6-9461-cd7c558ad82a] User-Agent:[PostmanRuntime/7.42.0]] 0xc0003a0240 183 [] false 127.0.0.1:8000 map[] map[] map[] 127.0.0.1:56979 /wxApi/payQrCode 0xc0000c3800 [] map[]} -2024-11-07 17:43:42.691 pay.go:36: {ShopId:aaaaaaaaaa Price:65.3 Amount:65.2 Bean:0.1 OpenId:aaaaaaaaaaaaaaaaabbbbbbbb Mobile:15963264270 Channel:1} -2024-11-07 17:47:52.308 mqtt.go:31: MQTT连接地址: mqtt://101.200.127.15:1883 -2024-11-07 17:47:52.337 main.go:25: 初始化成功 -2024-11-07 17:47:54.438 pay.go:29: {POST /wxApi/payQrCode HTTP/1.1 1 1 map[Accept:[*/*] Accept-Encoding:[gzip, deflate, br] Connection:[keep-alive] Content-Length:[183] Content-Type:[application/json] Postman-Token:[24eaf20d-e5b6-4e5a-99f6-23fed4eb18b2] User-Agent:[PostmanRuntime/7.42.0]] 0xc00007c540 183 [] false 127.0.0.1:8000 map[] map[] map[] 127.0.0.1:57072 /wxApi/payQrCode 0xc0000370e0 [] map[]} -2024-11-07 17:47:54.439 pay.go:36: {ShopId:aaaaaaaaaa Price:65.3 Amount:65.2 Bean:0.1 OpenId:aaaaaaaaaaaaaaaaabbbbbbbb Mobile:15963264270 Channel:1} -2024-11-07 17:48:56.705 mqtt.go:31: MQTT连接地址: mqtt://101.200.127.15:1883 -2024-11-07 17:48:56.741 main.go:25: 初始化成功 -2024-11-07 17:48:58.370 pay.go:29: {POST /wxApi/payQrCode HTTP/1.1 1 1 map[Accept:[*/*] Accept-Encoding:[gzip, deflate, br] Connection:[keep-alive] Content-Length:[183] Content-Type:[application/json] Postman-Token:[8110d4f2-1654-4322-a356-934f5886d824] User-Agent:[PostmanRuntime/7.42.0]] 0xc0001e2340 183 [] false 127.0.0.1:8000 map[] map[] map[] 127.0.0.1:57095 /wxApi/payQrCode 0xc00033ee10 [] map[]} -2024-11-07 17:48:58.372 pay.go:36: {ShopId:aaaaaaaaaa Price:65.3 Amount:65.2 Bean:0.1 OpenId:aaaaaaaaaaaaaaaaabbbbbbbb Mobile:15963264270 Channel:1} -2024-11-07 17:50:55.781 mqtt.go:31: MQTT连接地址: mqtt://101.200.127.15:1883 -2024-11-07 17:50:55.811 main.go:25: 初始化成功 -2024-11-07 17:50:58.552 pay.go:29: {POST /wxApi/payQrCode HTTP/1.1 1 1 map[Accept:[*/*] Accept-Encoding:[gzip, deflate, br] Connection:[keep-alive] Content-Length:[183] Content-Type:[application/json] Postman-Token:[7d74cf08-ada9-452b-bf58-6596c2956e2f] User-Agent:[PostmanRuntime/7.42.0]] 0xc0003a0240 183 [] false 127.0.0.1:8000 map[] map[] map[] 127.0.0.1:57125 /wxApi/payQrCode 0xc0001cf620 [] map[]} -2024-11-07 17:50:58.556 pay.go:36: {ShopId:aaaaaaaaaa Price:65.3 Amount:65.2 Bean:0.1 OpenId:aaaaaaaaaaaaaaaaabbbbbbbb Mobile:15963264270 Channel:1} -2024-11-07 17:52:31.276 mqtt.go:31: MQTT连接地址: mqtt://101.200.127.15:1883 -2024-11-07 17:52:31.316 main.go:25: 初始化成功 -2024-11-07 17:52:37.190 pay.go:29: {POST /wxApi/payQrCode HTTP/1.1 1 1 map[Accept:[*/*] Accept-Encoding:[gzip, deflate, br] Connection:[keep-alive] Content-Length:[183] Content-Type:[application/json] Postman-Token:[5d765f3c-60cc-475a-aa87-f6a925fd9051] User-Agent:[PostmanRuntime/7.42.0]] 0xc0001d2300 183 [] false 127.0.0.1:8000 map[] map[] map[] 127.0.0.1:57186 /wxApi/payQrCode 0xc0002910e0 [] map[]} -2024-11-07 17:52:37.190 pay.go:36: {ShopId:aaaaaaaaaa Price:65.3 Amount:65.2 Bean:0.1 OpenId:aaaaaaaaaaaaaaaaabbbbbbbb Mobile:15963264270 Channel:1} -2024-11-07 18:07:06.387 mqtt.go:31: MQTT连接地址: mqtt://101.200.127.15:1883 -2024-11-07 18:07:06.423 main.go:25: 初始化成功 diff --git a/log/sqlLog/2024-11-06.log b/log/sqlLog/2024-11-06.log deleted file mode 100644 index 6cafb0f..0000000 --- a/log/sqlLog/2024-11-06.log +++ /dev/null @@ -1,122 +0,0 @@ -2024-11-06 10:49:19.944 [DEBU] {6866d17e3c41051841328f3831a21cdc} [ 69 ms] [default] [yuledui] [rows:1 ] SELECT version(); -2024-11-06 10:49:19.959 [DEBU] {903102833c41051842328f387c8f2407} [ 14 ms] [default] [yuledui] [rows:7 ] SELECT c.relname FROM pg_class c INNER JOIN pg_namespace n ON c.relnamespace = n.oid WHERE n.nspname = 'public' AND c.relkind IN ('r', 'p') AND c.relpartbound IS NULL ORDER BY c.relname -2024-11-06 10:49:19.986 [DEBU] {54b4ec833c41051843328f388155e10c} [ 26 ms] [default] [yuledui] [rows:18 ] SELECT a.attname AS field, t.typname AS type,a.attnotnull as null, (case when d.contype = 'p' then 'pri' when d.contype = 'u' then 'uni' else '' end) as key ,ic.column_default as default_value,b.description as comment ,coalesce(character_maximum_length, numeric_precision, -1) as length ,numeric_scale as scale FROM pg_attribute a left join pg_class c on a.attrelid = c.oid left join pg_constraint d on d.conrelid = c.oid and a.attnum = d.conkey[1] left join pg_description b ON a.attrelid=b.objoid AND a.attnum = b.objsubid left join pg_type t ON a.atttypid = t.oid left join information_schema.columns ic on ic.column_name = a.attname and ic.table_name = c.relname WHERE c.relname = 'shop' and a.attisdropped is false and a.attnum > 0 ORDER BY a.attnum -2024-11-06 10:49:20.014 [DEBU] {ec3482853c41051844328f38368be513} [ 27 ms] [default] [yuledui] [rows:0 ] SELECT "shop_id","promoter_id","account_number","child_account_number","contact_name","tel","shop_name","address","door_photo","interior_photo","industry","equipment_no","extend","join_date","state","delete_flag","create_time","update_time" FROM "shop" WHERE shop_id = 'ccccwsdfwefwefwef' LIMIT 1 -2024-11-06 11:19:09.509 [DEBU] {24303c28dd42051846328f388d580e16} [ 85 ms] [default] [yuledui] [rows:1 ] SELECT "shop_id","promoter_id","account_number","child_account_number","contact_name","tel","shop_name","address","door_photo","interior_photo","industry","equipment_no","extend","join_date","state","delete_flag","create_time","update_time" FROM "shop" WHERE shop_id = 'aaaaaaaaaa' LIMIT 1 -2024-11-06 11:19:09.535 [DEBU] {dcff592ddd42051847328f382099c3db} [ 26 ms] [default] [yuledui] [rows:11 ] SELECT a.attname AS field, t.typname AS type,a.attnotnull as null, (case when d.contype = 'p' then 'pri' when d.contype = 'u' then 'uni' else '' end) as key ,ic.column_default as default_value,b.description as comment ,coalesce(character_maximum_length, numeric_precision, -1) as length ,numeric_scale as scale FROM pg_attribute a left join pg_class c on a.attrelid = c.oid left join pg_constraint d on d.conrelid = c.oid and a.attnum = d.conkey[1] left join pg_description b ON a.attrelid=b.objoid AND a.attnum = b.objsubid left join pg_type t ON a.atttypid = t.oid left join information_schema.columns ic on ic.column_name = a.attname and ic.table_name = c.relname WHERE c.relname = 'pay_order' and a.attisdropped is false and a.attnum > 0 ORDER BY a.attnum -2024-11-06 11:19:09.564 [ERRO] {dc15f72edd42051848328f38ebe267b6} [ 28 ms] [default] [yuledui] [rows:0 ] INSERT INTO "pay_order"("orderId","price","amount","bean","openId","mobile","shopId","created","updated") VALUES('pyacyq0f6k0d5ers1qw07vg200sxh8e7',65.3,65.2,0.1,'aaaaaaaaaaaaaaaaabbbbbbbb','15963264270','aaaaaaaaaa','2024-11-06 11:19:09','2024-11-06 11:19:09') RETURNING "orderId" -Error: pq: null value in column "ysePayStatus" of relation "pay_order" violates not-null constraint -Stack: -1. yuleduiPay/repo.(*PayOrder).CreatePayOrder - C:/Users/Administrator/Desktop/yuleduiPay/yuleduiPay/repo/pay_order.go:13 -2. yuleduiPay/service.(*Pay).PayQrCode - C:/Users/Administrator/Desktop/yuleduiPay/yuleduiPay/service/pay.go:69 -3. yuleduiPay/middle.MiddlewareHandlerResponse - C:/Users/Administrator/Desktop/yuleduiPay/yuleduiPay/middle/middle.go:26 -4. yuleduiPay/middle.MiddlewareCORS - C:/Users/Administrator/Desktop/yuleduiPay/yuleduiPay/middle/middle.go:15 - -2024-11-06 11:20:08.799 [DEBU] {d05b97f6ea42051864e20a07b30416a0} [ 79 ms] [default] [yuledui] [rows:1 ] SELECT version(); -2024-11-06 11:20:08.815 [DEBU] {403f58fbea42051865e20a07e2869f28} [ 15 ms] [default] [yuledui] [rows:7 ] SELECT c.relname FROM pg_class c INNER JOIN pg_namespace n ON c.relnamespace = n.oid WHERE n.nspname = 'public' AND c.relkind IN ('r', 'p') AND c.relpartbound IS NULL ORDER BY c.relname -2024-11-06 11:20:08.842 [DEBU] {e83842fcea42051866e20a07b33d81be} [ 27 ms] [default] [yuledui] [rows:18 ] SELECT a.attname AS field, t.typname AS type,a.attnotnull as null, (case when d.contype = 'p' then 'pri' when d.contype = 'u' then 'uni' else '' end) as key ,ic.column_default as default_value,b.description as comment ,coalesce(character_maximum_length, numeric_precision, -1) as length ,numeric_scale as scale FROM pg_attribute a left join pg_class c on a.attrelid = c.oid left join pg_constraint d on d.conrelid = c.oid and a.attnum = d.conkey[1] left join pg_description b ON a.attrelid=b.objoid AND a.attnum = b.objsubid left join pg_type t ON a.atttypid = t.oid left join information_schema.columns ic on ic.column_name = a.attname and ic.table_name = c.relname WHERE c.relname = 'shop' and a.attisdropped is false and a.attnum > 0 ORDER BY a.attnum -2024-11-06 11:20:08.872 [DEBU] {9c14e8fdea42051867e20a0724bd0d0c} [ 29 ms] [default] [yuledui] [rows:1 ] SELECT "shop_id","promoter_id","account_number","child_account_number","contact_name","tel","shop_name","address","door_photo","interior_photo","industry","equipment_no","extend","join_date","state","delete_flag","create_time","update_time" FROM "shop" WHERE shop_id = 'aaaaaaaaaa' LIMIT 1 -2024-11-06 11:20:25.360 [DEBU] {cc1f04d5ee42051868e20a07eb77aa77} [ 23 ms] [default] [yuledui] [rows:11 ] SELECT a.attname AS field, t.typname AS type,a.attnotnull as null, (case when d.contype = 'p' then 'pri' when d.contype = 'u' then 'uni' else '' end) as key ,ic.column_default as default_value,b.description as comment ,coalesce(character_maximum_length, numeric_precision, -1) as length ,numeric_scale as scale FROM pg_attribute a left join pg_class c on a.attrelid = c.oid left join pg_constraint d on d.conrelid = c.oid and a.attnum = d.conkey[1] left join pg_description b ON a.attrelid=b.objoid AND a.attnum = b.objsubid left join pg_type t ON a.atttypid = t.oid left join information_schema.columns ic on ic.column_name = a.attname and ic.table_name = c.relname WHERE c.relname = 'pay_order' and a.attisdropped is false and a.attnum > 0 ORDER BY a.attnum -2024-11-06 11:20:25.388 [ERRO] {08fe65d6ee42051869e20a07ea4ac1ce} [ 28 ms] [default] [yuledui] [rows:0 ] INSERT INTO "pay_order"("orderId","price","amount","bean","openId","mobile","shopId","created","updated") VALUES('pyacyq078s0d5ersunjnh7o200nle3xa',65.3,65.2,0.1,'aaaaaaaaaaaaaaaaabbbbbbbb','15963264270','aaaaaaaaaa','2024-11-06 11:20:24','2024-11-06 11:20:24') RETURNING "orderId" -Error: pq: null value in column "ysePayStatus" of relation "pay_order" violates not-null constraint -Stack: -1. yuleduiPay/repo.(*PayOrder).CreatePayOrder - c:/Users/Administrator/Desktop/yuleduiPay/yuleduiPay/repo/pay_order.go:13 -2. yuleduiPay/service.(*Pay).PayQrCode - c:/Users/Administrator/Desktop/yuleduiPay/yuleduiPay/service/pay.go:69 -3. yuleduiPay/middle.MiddlewareHandlerResponse - c:/Users/Administrator/Desktop/yuleduiPay/yuleduiPay/middle/middle.go:26 -4. yuleduiPay/middle.MiddlewareCORS - c:/Users/Administrator/Desktop/yuleduiPay/yuleduiPay/middle/middle.go:15 - -2024-11-06 11:21:10.048 [DEBU] {30de1d39f9420518c8062f59ea0b213c} [ 82 ms] [default] [yuledui] [rows:1 ] SELECT version(); -2024-11-06 11:21:10.065 [DEBU] {001c103ef9420518c9062f595a2f4418} [ 16 ms] [default] [yuledui] [rows:7 ] SELECT c.relname FROM pg_class c INNER JOIN pg_namespace n ON c.relnamespace = n.oid WHERE n.nspname = 'public' AND c.relkind IN ('r', 'p') AND c.relpartbound IS NULL ORDER BY c.relname -2024-11-06 11:21:10.094 [DEBU] {bc734338f9420518c7062f59c792ad43} [ 29 ms] [default] [yuledui] [rows:30 ] SELECT a.attname AS field, t.typname AS type,a.attnotnull as null, (case when d.contype = 'p' then 'pri' when d.contype = 'u' then 'uni' else '' end) as key ,ic.column_default as default_value,b.description as comment ,coalesce(character_maximum_length, numeric_precision, -1) as length ,numeric_scale as scale FROM pg_attribute a left join pg_class c on a.attrelid = c.oid left join pg_constraint d on d.conrelid = c.oid and a.attnum = d.conkey[1] left join pg_description b ON a.attrelid=b.objoid AND a.attnum = b.objsubid left join pg_type t ON a.atttypid = t.oid left join information_schema.columns ic on ic.column_name = a.attname and ic.table_name = c.relname WHERE c.relname = 'account' and a.attisdropped is false and a.attnum > 0 ORDER BY a.attnum -2024-11-06 11:21:10.140 [DEBU] {bc734338f9420518c7062f59c792ad43} [ 23 ms] [default] [yuledui] [rows:10 ] SELECT a.attname AS field, t.typname AS type,a.attnotnull as null, (case when d.contype = 'p' then 'pri' when d.contype = 'u' then 'uni' else '' end) as key ,ic.column_default as default_value,b.description as comment ,coalesce(character_maximum_length, numeric_precision, -1) as length ,numeric_scale as scale FROM pg_attribute a left join pg_class c on a.attrelid = c.oid left join pg_constraint d on d.conrelid = c.oid and a.attnum = d.conkey[1] left join pg_description b ON a.attrelid=b.objoid AND a.attnum = b.objsubid left join pg_type t ON a.atttypid = t.oid left join information_schema.columns ic on ic.column_name = a.attname and ic.table_name = c.relname WHERE c.relname = 'dict' and a.attisdropped is false and a.attnum > 0 ORDER BY a.attnum -2024-11-06 11:21:10.181 [DEBU] {bc734338f9420518c7062f59c792ad43} [ 21 ms] [default] [yuledui] [rows:9 ] SELECT a.attname AS field, t.typname AS type,a.attnotnull as null, (case when d.contype = 'p' then 'pri' when d.contype = 'u' then 'uni' else '' end) as key ,ic.column_default as default_value,b.description as comment ,coalesce(character_maximum_length, numeric_precision, -1) as length ,numeric_scale as scale FROM pg_attribute a left join pg_class c on a.attrelid = c.oid left join pg_constraint d on d.conrelid = c.oid and a.attnum = d.conkey[1] left join pg_description b ON a.attrelid=b.objoid AND a.attnum = b.objsubid left join pg_type t ON a.atttypid = t.oid left join information_schema.columns ic on ic.column_name = a.attname and ic.table_name = c.relname WHERE c.relname = 'district' and a.attisdropped is false and a.attnum > 0 ORDER BY a.attnum -2024-11-06 11:21:10.220 [DEBU] {bc734338f9420518c7062f59c792ad43} [ 21 ms] [default] [yuledui] [rows:11 ] SELECT a.attname AS field, t.typname AS type,a.attnotnull as null, (case when d.contype = 'p' then 'pri' when d.contype = 'u' then 'uni' else '' end) as key ,ic.column_default as default_value,b.description as comment ,coalesce(character_maximum_length, numeric_precision, -1) as length ,numeric_scale as scale FROM pg_attribute a left join pg_class c on a.attrelid = c.oid left join pg_constraint d on d.conrelid = c.oid and a.attnum = d.conkey[1] left join pg_description b ON a.attrelid=b.objoid AND a.attnum = b.objsubid left join pg_type t ON a.atttypid = t.oid left join information_schema.columns ic on ic.column_name = a.attname and ic.table_name = c.relname WHERE c.relname = 'pay_order' and a.attisdropped is false and a.attnum > 0 ORDER BY a.attnum -2024-11-06 11:21:10.259 [DEBU] {bc734338f9420518c7062f59c792ad43} [ 21 ms] [default] [yuledui] [rows:12 ] SELECT a.attname AS field, t.typname AS type,a.attnotnull as null, (case when d.contype = 'p' then 'pri' when d.contype = 'u' then 'uni' else '' end) as key ,ic.column_default as default_value,b.description as comment ,coalesce(character_maximum_length, numeric_precision, -1) as length ,numeric_scale as scale FROM pg_attribute a left join pg_class c on a.attrelid = c.oid left join pg_constraint d on d.conrelid = c.oid and a.attnum = d.conkey[1] left join pg_description b ON a.attrelid=b.objoid AND a.attnum = b.objsubid left join pg_type t ON a.atttypid = t.oid left join information_schema.columns ic on ic.column_name = a.attname and ic.table_name = c.relname WHERE c.relname = 'promoter' and a.attisdropped is false and a.attnum > 0 ORDER BY a.attnum -2024-11-06 11:21:10.300 [DEBU] {bc734338f9420518c7062f59c792ad43} [ 22 ms] [default] [yuledui] [rows:18 ] SELECT a.attname AS field, t.typname AS type,a.attnotnull as null, (case when d.contype = 'p' then 'pri' when d.contype = 'u' then 'uni' else '' end) as key ,ic.column_default as default_value,b.description as comment ,coalesce(character_maximum_length, numeric_precision, -1) as length ,numeric_scale as scale FROM pg_attribute a left join pg_class c on a.attrelid = c.oid left join pg_constraint d on d.conrelid = c.oid and a.attnum = d.conkey[1] left join pg_description b ON a.attrelid=b.objoid AND a.attnum = b.objsubid left join pg_type t ON a.atttypid = t.oid left join information_schema.columns ic on ic.column_name = a.attname and ic.table_name = c.relname WHERE c.relname = 'shop' and a.attisdropped is false and a.attnum > 0 ORDER BY a.attnum -2024-11-06 11:21:10.341 [DEBU] {bc734338f9420518c7062f59c792ad43} [ 22 ms] [default] [yuledui] [rows:12 ] SELECT a.attname AS field, t.typname AS type,a.attnotnull as null, (case when d.contype = 'p' then 'pri' when d.contype = 'u' then 'uni' else '' end) as key ,ic.column_default as default_value,b.description as comment ,coalesce(character_maximum_length, numeric_precision, -1) as length ,numeric_scale as scale FROM pg_attribute a left join pg_class c on a.attrelid = c.oid left join pg_constraint d on d.conrelid = c.oid and a.attnum = d.conkey[1] left join pg_description b ON a.attrelid=b.objoid AND a.attnum = b.objsubid left join pg_type t ON a.atttypid = t.oid left join information_schema.columns ic on ic.column_name = a.attname and ic.table_name = c.relname WHERE c.relname = 'shop_admin' and a.attisdropped is false and a.attnum > 0 ORDER BY a.attnum -2024-11-06 11:24:29.613 [DEBU] {a48958b0274305184bd3b75b2b76e9fd} [ 78 ms] [default] [yuledui] [rows:1 ] SELECT version(); -2024-11-06 11:24:29.630 [DEBU] {903c14b5274305184cd3b75b531dc027} [ 16 ms] [default] [yuledui] [rows:7 ] SELECT c.relname FROM pg_class c INNER JOIN pg_namespace n ON c.relnamespace = n.oid WHERE n.nspname = 'public' AND c.relkind IN ('r', 'p') AND c.relpartbound IS NULL ORDER BY c.relname -2024-11-06 11:24:29.660 [DEBU] {9ccc73af274305184ad3b75b8eeb9f61} [ 29 ms] [default] [yuledui] [rows:30 ] SELECT a.attname AS field, t.typname AS type,a.attnotnull as null, (case when d.contype = 'p' then 'pri' when d.contype = 'u' then 'uni' else '' end) as key ,ic.column_default as default_value,b.description as comment ,coalesce(character_maximum_length, numeric_precision, -1) as length ,numeric_scale as scale FROM pg_attribute a left join pg_class c on a.attrelid = c.oid left join pg_constraint d on d.conrelid = c.oid and a.attnum = d.conkey[1] left join pg_description b ON a.attrelid=b.objoid AND a.attnum = b.objsubid left join pg_type t ON a.atttypid = t.oid left join information_schema.columns ic on ic.column_name = a.attname and ic.table_name = c.relname WHERE c.relname = 'account' and a.attisdropped is false and a.attnum > 0 ORDER BY a.attnum -2024-11-06 11:24:29.705 [DEBU] {9ccc73af274305184ad3b75b8eeb9f61} [ 22 ms] [default] [yuledui] [rows:10 ] SELECT a.attname AS field, t.typname AS type,a.attnotnull as null, (case when d.contype = 'p' then 'pri' when d.contype = 'u' then 'uni' else '' end) as key ,ic.column_default as default_value,b.description as comment ,coalesce(character_maximum_length, numeric_precision, -1) as length ,numeric_scale as scale FROM pg_attribute a left join pg_class c on a.attrelid = c.oid left join pg_constraint d on d.conrelid = c.oid and a.attnum = d.conkey[1] left join pg_description b ON a.attrelid=b.objoid AND a.attnum = b.objsubid left join pg_type t ON a.atttypid = t.oid left join information_schema.columns ic on ic.column_name = a.attname and ic.table_name = c.relname WHERE c.relname = 'dict' and a.attisdropped is false and a.attnum > 0 ORDER BY a.attnum -2024-11-06 11:24:29.746 [DEBU] {9ccc73af274305184ad3b75b8eeb9f61} [ 21 ms] [default] [yuledui] [rows:9 ] SELECT a.attname AS field, t.typname AS type,a.attnotnull as null, (case when d.contype = 'p' then 'pri' when d.contype = 'u' then 'uni' else '' end) as key ,ic.column_default as default_value,b.description as comment ,coalesce(character_maximum_length, numeric_precision, -1) as length ,numeric_scale as scale FROM pg_attribute a left join pg_class c on a.attrelid = c.oid left join pg_constraint d on d.conrelid = c.oid and a.attnum = d.conkey[1] left join pg_description b ON a.attrelid=b.objoid AND a.attnum = b.objsubid left join pg_type t ON a.atttypid = t.oid left join information_schema.columns ic on ic.column_name = a.attname and ic.table_name = c.relname WHERE c.relname = 'district' and a.attisdropped is false and a.attnum > 0 ORDER BY a.attnum -2024-11-06 11:24:29.790 [DEBU] {9ccc73af274305184ad3b75b8eeb9f61} [ 21 ms] [default] [yuledui] [rows:11 ] SELECT a.attname AS field, t.typname AS type,a.attnotnull as null, (case when d.contype = 'p' then 'pri' when d.contype = 'u' then 'uni' else '' end) as key ,ic.column_default as default_value,b.description as comment ,coalesce(character_maximum_length, numeric_precision, -1) as length ,numeric_scale as scale FROM pg_attribute a left join pg_class c on a.attrelid = c.oid left join pg_constraint d on d.conrelid = c.oid and a.attnum = d.conkey[1] left join pg_description b ON a.attrelid=b.objoid AND a.attnum = b.objsubid left join pg_type t ON a.atttypid = t.oid left join information_schema.columns ic on ic.column_name = a.attname and ic.table_name = c.relname WHERE c.relname = 'pay_order' and a.attisdropped is false and a.attnum > 0 ORDER BY a.attnum -2024-11-06 11:24:29.829 [DEBU] {9ccc73af274305184ad3b75b8eeb9f61} [ 20 ms] [default] [yuledui] [rows:12 ] SELECT a.attname AS field, t.typname AS type,a.attnotnull as null, (case when d.contype = 'p' then 'pri' when d.contype = 'u' then 'uni' else '' end) as key ,ic.column_default as default_value,b.description as comment ,coalesce(character_maximum_length, numeric_precision, -1) as length ,numeric_scale as scale FROM pg_attribute a left join pg_class c on a.attrelid = c.oid left join pg_constraint d on d.conrelid = c.oid and a.attnum = d.conkey[1] left join pg_description b ON a.attrelid=b.objoid AND a.attnum = b.objsubid left join pg_type t ON a.atttypid = t.oid left join information_schema.columns ic on ic.column_name = a.attname and ic.table_name = c.relname WHERE c.relname = 'promoter' and a.attisdropped is false and a.attnum > 0 ORDER BY a.attnum -2024-11-06 11:24:29.869 [DEBU] {9ccc73af274305184ad3b75b8eeb9f61} [ 21 ms] [default] [yuledui] [rows:18 ] SELECT a.attname AS field, t.typname AS type,a.attnotnull as null, (case when d.contype = 'p' then 'pri' when d.contype = 'u' then 'uni' else '' end) as key ,ic.column_default as default_value,b.description as comment ,coalesce(character_maximum_length, numeric_precision, -1) as length ,numeric_scale as scale FROM pg_attribute a left join pg_class c on a.attrelid = c.oid left join pg_constraint d on d.conrelid = c.oid and a.attnum = d.conkey[1] left join pg_description b ON a.attrelid=b.objoid AND a.attnum = b.objsubid left join pg_type t ON a.atttypid = t.oid left join information_schema.columns ic on ic.column_name = a.attname and ic.table_name = c.relname WHERE c.relname = 'shop' and a.attisdropped is false and a.attnum > 0 ORDER BY a.attnum -2024-11-06 11:24:29.910 [DEBU] {9ccc73af274305184ad3b75b8eeb9f61} [ 21 ms] [default] [yuledui] [rows:12 ] SELECT a.attname AS field, t.typname AS type,a.attnotnull as null, (case when d.contype = 'p' then 'pri' when d.contype = 'u' then 'uni' else '' end) as key ,ic.column_default as default_value,b.description as comment ,coalesce(character_maximum_length, numeric_precision, -1) as length ,numeric_scale as scale FROM pg_attribute a left join pg_class c on a.attrelid = c.oid left join pg_constraint d on d.conrelid = c.oid and a.attnum = d.conkey[1] left join pg_description b ON a.attrelid=b.objoid AND a.attnum = b.objsubid left join pg_type t ON a.atttypid = t.oid left join information_schema.columns ic on ic.column_name = a.attname and ic.table_name = c.relname WHERE c.relname = 'shop_admin' and a.attisdropped is false and a.attnum > 0 ORDER BY a.attnum -2024-11-06 11:25:04.118 [DEBU] {90b887b82f4305187b9fc95db7523785} [ 86 ms] [default] [yuledui] [rows:1 ] SELECT version(); -2024-11-06 11:25:04.135 [DEBU] {847aaebd2f4305187c9fc95d479707a8} [ 17 ms] [default] [yuledui] [rows:7 ] SELECT c.relname FROM pg_class c INNER JOIN pg_namespace n ON c.relnamespace = n.oid WHERE n.nspname = 'public' AND c.relkind IN ('r', 'p') AND c.relpartbound IS NULL ORDER BY c.relname -2024-11-06 11:25:04.166 [DEBU] {70ddb8be2f4305187d9fc95d5f39bb16} [ 30 ms] [default] [yuledui] [rows:18 ] SELECT a.attname AS field, t.typname AS type,a.attnotnull as null, (case when d.contype = 'p' then 'pri' when d.contype = 'u' then 'uni' else '' end) as key ,ic.column_default as default_value,b.description as comment ,coalesce(character_maximum_length, numeric_precision, -1) as length ,numeric_scale as scale FROM pg_attribute a left join pg_class c on a.attrelid = c.oid left join pg_constraint d on d.conrelid = c.oid and a.attnum = d.conkey[1] left join pg_description b ON a.attrelid=b.objoid AND a.attnum = b.objsubid left join pg_type t ON a.atttypid = t.oid left join information_schema.columns ic on ic.column_name = a.attname and ic.table_name = c.relname WHERE c.relname = 'shop' and a.attisdropped is false and a.attnum > 0 ORDER BY a.attnum -2024-11-06 11:25:04.198 [DEBU] {d47b82c02f4305187e9fc95d803acfe3} [ 32 ms] [default] [yuledui] [rows:1 ] SELECT "shop_id","promoter_id","account_number","child_account_number","contact_name","tel","shop_name","address","door_photo","interior_photo","industry","equipment_no","extend","join_date","state","delete_flag","create_time","update_time" FROM "shop" WHERE shop_id = 'aaaaaaaaaa' LIMIT 1 -2024-11-06 11:25:09.322 [DEBU] {443544f2304305187f9fc95d2d81b2d5} [ 27 ms] [default] [yuledui] [rows:11 ] SELECT a.attname AS field, t.typname AS type,a.attnotnull as null, (case when d.contype = 'p' then 'pri' when d.contype = 'u' then 'uni' else '' end) as key ,ic.column_default as default_value,b.description as comment ,coalesce(character_maximum_length, numeric_precision, -1) as length ,numeric_scale as scale FROM pg_attribute a left join pg_class c on a.attrelid = c.oid left join pg_constraint d on d.conrelid = c.oid and a.attnum = d.conkey[1] left join pg_description b ON a.attrelid=b.objoid AND a.attnum = b.objsubid left join pg_type t ON a.atttypid = t.oid left join information_schema.columns ic on ic.column_name = a.attname and ic.table_name = c.relname WHERE c.relname = 'pay_order' and a.attisdropped is false and a.attnum > 0 ORDER BY a.attnum -2024-11-06 11:25:09.355 [DEBU] {087adff330430518809fc95d239662c3} [ 33 ms] [default] [yuledui] [rows:1 ] INSERT INTO "pay_order"("orderId","price","amount","bean","openId","mobile","shopId","created","updated","payStatus","ysePayStatus") VALUES('pyacyq08u00d5erwl40rvgk200i0fyaq',65.3,65.2,0.1,'aaaaaaaaaaaaaaaaabbbbbbbb','15963264270','aaaaaaaaaa','2024-11-06 11:25:08','2024-11-06 11:25:08',0,'') RETURNING "orderId" -2024-11-06 11:26:26.462 [ERRO] {b82841e542430518829fc95def92af16} [ 75 ms] [default] [yuledui] [rows:0 ] SELECT "orderId","price","amount","bean","openId","mobile","shopId","created","updated","payStatus","ysePayStatus" FROM "pay_order" WHERE orderId = 'pyacyq08u00d5erwl40rvgk200i0fyaq' LIMIT 1 -Error: pq: column "orderid" does not exist -Stack: -1. yuleduiPay/repo.(*PayOrder).GetPayOrderByOrderId - c:/Users/Administrator/Desktop/yuleduiPay/yuleduiPay/repo/pay_order.go:23 -2. yuleduiPay/service.(*YsePay).NotifyWxPay - c:/Users/Administrator/Desktop/yuleduiPay/yuleduiPay/service/ysepay.go:30 -3. yuleduiPay/middle.MiddlewareHandlerResponse - c:/Users/Administrator/Desktop/yuleduiPay/yuleduiPay/middle/middle.go:26 -4. yuleduiPay/middle.MiddlewareCORS - c:/Users/Administrator/Desktop/yuleduiPay/yuleduiPay/middle/middle.go:15 - -2024-11-06 11:30:38.849 [DEBU] {98c45da87d430518235ffa7cfb773752} [ 81 ms] [default] [yuledui] [rows:1 ] SELECT version(); -2024-11-06 11:30:38.867 [DEBU] {7c4e40ad7d430518245ffa7cd678625e} [ 17 ms] [default] [yuledui] [rows:7 ] SELECT c.relname FROM pg_class c INNER JOIN pg_namespace n ON c.relnamespace = n.oid WHERE n.nspname = 'public' AND c.relkind IN ('r', 'p') AND c.relpartbound IS NULL ORDER BY c.relname -2024-11-06 11:30:38.899 [DEBU] {e07277a77d430518225ffa7cb5df3b17} [ 29 ms] [default] [yuledui] [rows:30 ] SELECT a.attname AS field, t.typname AS type,a.attnotnull as null, (case when d.contype = 'p' then 'pri' when d.contype = 'u' then 'uni' else '' end) as key ,ic.column_default as default_value,b.description as comment ,coalesce(character_maximum_length, numeric_precision, -1) as length ,numeric_scale as scale FROM pg_attribute a left join pg_class c on a.attrelid = c.oid left join pg_constraint d on d.conrelid = c.oid and a.attnum = d.conkey[1] left join pg_description b ON a.attrelid=b.objoid AND a.attnum = b.objsubid left join pg_type t ON a.atttypid = t.oid left join information_schema.columns ic on ic.column_name = a.attname and ic.table_name = c.relname WHERE c.relname = 'account' and a.attisdropped is false and a.attnum > 0 ORDER BY a.attnum -2024-11-06 11:30:38.938 [DEBU] {e07277a77d430518225ffa7cb5df3b17} [ 23 ms] [default] [yuledui] [rows:10 ] SELECT a.attname AS field, t.typname AS type,a.attnotnull as null, (case when d.contype = 'p' then 'pri' when d.contype = 'u' then 'uni' else '' end) as key ,ic.column_default as default_value,b.description as comment ,coalesce(character_maximum_length, numeric_precision, -1) as length ,numeric_scale as scale FROM pg_attribute a left join pg_class c on a.attrelid = c.oid left join pg_constraint d on d.conrelid = c.oid and a.attnum = d.conkey[1] left join pg_description b ON a.attrelid=b.objoid AND a.attnum = b.objsubid left join pg_type t ON a.atttypid = t.oid left join information_schema.columns ic on ic.column_name = a.attname and ic.table_name = c.relname WHERE c.relname = 'dict' and a.attisdropped is false and a.attnum > 0 ORDER BY a.attnum -2024-11-06 11:30:38.966 [DEBU] {e07277a77d430518225ffa7cb5df3b17} [ 22 ms] [default] [yuledui] [rows:9 ] SELECT a.attname AS field, t.typname AS type,a.attnotnull as null, (case when d.contype = 'p' then 'pri' when d.contype = 'u' then 'uni' else '' end) as key ,ic.column_default as default_value,b.description as comment ,coalesce(character_maximum_length, numeric_precision, -1) as length ,numeric_scale as scale FROM pg_attribute a left join pg_class c on a.attrelid = c.oid left join pg_constraint d on d.conrelid = c.oid and a.attnum = d.conkey[1] left join pg_description b ON a.attrelid=b.objoid AND a.attnum = b.objsubid left join pg_type t ON a.atttypid = t.oid left join information_schema.columns ic on ic.column_name = a.attname and ic.table_name = c.relname WHERE c.relname = 'district' and a.attisdropped is false and a.attnum > 0 ORDER BY a.attnum -2024-11-06 11:30:39.006 [DEBU] {e07277a77d430518225ffa7cb5df3b17} [ 21 ms] [default] [yuledui] [rows:10 ] SELECT a.attname AS field, t.typname AS type,a.attnotnull as null, (case when d.contype = 'p' then 'pri' when d.contype = 'u' then 'uni' else '' end) as key ,ic.column_default as default_value,b.description as comment ,coalesce(character_maximum_length, numeric_precision, -1) as length ,numeric_scale as scale FROM pg_attribute a left join pg_class c on a.attrelid = c.oid left join pg_constraint d on d.conrelid = c.oid and a.attnum = d.conkey[1] left join pg_description b ON a.attrelid=b.objoid AND a.attnum = b.objsubid left join pg_type t ON a.atttypid = t.oid left join information_schema.columns ic on ic.column_name = a.attname and ic.table_name = c.relname WHERE c.relname = 'pay_order' and a.attisdropped is false and a.attnum > 0 ORDER BY a.attnum -2024-11-06 11:30:39.049 [DEBU] {e07277a77d430518225ffa7cb5df3b17} [ 22 ms] [default] [yuledui] [rows:12 ] SELECT a.attname AS field, t.typname AS type,a.attnotnull as null, (case when d.contype = 'p' then 'pri' when d.contype = 'u' then 'uni' else '' end) as key ,ic.column_default as default_value,b.description as comment ,coalesce(character_maximum_length, numeric_precision, -1) as length ,numeric_scale as scale FROM pg_attribute a left join pg_class c on a.attrelid = c.oid left join pg_constraint d on d.conrelid = c.oid and a.attnum = d.conkey[1] left join pg_description b ON a.attrelid=b.objoid AND a.attnum = b.objsubid left join pg_type t ON a.atttypid = t.oid left join information_schema.columns ic on ic.column_name = a.attname and ic.table_name = c.relname WHERE c.relname = 'promoter' and a.attisdropped is false and a.attnum > 0 ORDER BY a.attnum -2024-11-06 11:30:39.092 [DEBU] {e07277a77d430518225ffa7cb5df3b17} [ 23 ms] [default] [yuledui] [rows:18 ] SELECT a.attname AS field, t.typname AS type,a.attnotnull as null, (case when d.contype = 'p' then 'pri' when d.contype = 'u' then 'uni' else '' end) as key ,ic.column_default as default_value,b.description as comment ,coalesce(character_maximum_length, numeric_precision, -1) as length ,numeric_scale as scale FROM pg_attribute a left join pg_class c on a.attrelid = c.oid left join pg_constraint d on d.conrelid = c.oid and a.attnum = d.conkey[1] left join pg_description b ON a.attrelid=b.objoid AND a.attnum = b.objsubid left join pg_type t ON a.atttypid = t.oid left join information_schema.columns ic on ic.column_name = a.attname and ic.table_name = c.relname WHERE c.relname = 'shop' and a.attisdropped is false and a.attnum > 0 ORDER BY a.attnum -2024-11-06 11:30:39.126 [DEBU] {e07277a77d430518225ffa7cb5df3b17} [ 22 ms] [default] [yuledui] [rows:12 ] SELECT a.attname AS field, t.typname AS type,a.attnotnull as null, (case when d.contype = 'p' then 'pri' when d.contype = 'u' then 'uni' else '' end) as key ,ic.column_default as default_value,b.description as comment ,coalesce(character_maximum_length, numeric_precision, -1) as length ,numeric_scale as scale FROM pg_attribute a left join pg_class c on a.attrelid = c.oid left join pg_constraint d on d.conrelid = c.oid and a.attnum = d.conkey[1] left join pg_description b ON a.attrelid=b.objoid AND a.attnum = b.objsubid left join pg_type t ON a.atttypid = t.oid left join information_schema.columns ic on ic.column_name = a.attname and ic.table_name = c.relname WHERE c.relname = 'shop_admin' and a.attisdropped is false and a.attnum > 0 ORDER BY a.attnum -2024-11-06 11:32:44.637 [DEBU] {74e0a8f29a430518bf386b74835536fe} [ 68 ms] [default] [yuledui] [rows:1 ] SELECT version(); -2024-11-06 11:32:44.651 [DEBU] {884ac7f69a430518c0386b74c624e913} [ 13 ms] [default] [yuledui] [rows:7 ] SELECT c.relname FROM pg_class c INNER JOIN pg_namespace n ON c.relnamespace = n.oid WHERE n.nspname = 'public' AND c.relkind IN ('r', 'p') AND c.relpartbound IS NULL ORDER BY c.relname -2024-11-06 11:32:44.678 [DEBU] {ecdaa9f79a430518c1386b748dec2a06} [ 26 ms] [default] [yuledui] [rows:10 ] SELECT a.attname AS field, t.typname AS type,a.attnotnull as null, (case when d.contype = 'p' then 'pri' when d.contype = 'u' then 'uni' else '' end) as key ,ic.column_default as default_value,b.description as comment ,coalesce(character_maximum_length, numeric_precision, -1) as length ,numeric_scale as scale FROM pg_attribute a left join pg_class c on a.attrelid = c.oid left join pg_constraint d on d.conrelid = c.oid and a.attnum = d.conkey[1] left join pg_description b ON a.attrelid=b.objoid AND a.attnum = b.objsubid left join pg_type t ON a.atttypid = t.oid left join information_schema.columns ic on ic.column_name = a.attname and ic.table_name = c.relname WHERE c.relname = 'pay_order' and a.attisdropped is false and a.attnum > 0 ORDER BY a.attnum -2024-11-06 11:32:44.692 [ERRO] {94c538f99a430518c2386b7413a3ece7} [ 13 ms] [default] [yuledui] [rows:0 ] SELECT "order_id","price","amount","bean","open_id","mobile","shop_id","created","updated","ysepay_status" FROM "pay_order" WHERE orderId = 'pyacyq08u00d5erwl40rvgk200i0fyaq' LIMIT 1 -Error: pq: column "orderid" does not exist -Stack: -1. yuleduiPay/repo.(*PayOrder).GetPayOrderByOrderId - C:/Users/Administrator/Desktop/yuleduiPay/yuleduiPay/repo/pay_order.go:23 -2. yuleduiPay/service.(*YsePay).NotifyWxPay - C:/Users/Administrator/Desktop/yuleduiPay/yuleduiPay/service/ysepay.go:30 -3. yuleduiPay/middle.MiddlewareHandlerResponse - C:/Users/Administrator/Desktop/yuleduiPay/yuleduiPay/middle/middle.go:26 -4. yuleduiPay/middle.MiddlewareCORS - C:/Users/Administrator/Desktop/yuleduiPay/yuleduiPay/middle/middle.go:15 - -2024-11-06 11:33:15.952 [DEBU] {2cc98a3ba2430518a47d5548b3cff090} [ 96 ms] [default] [yuledui] [rows:1 ] SELECT version(); -2024-11-06 11:33:15.971 [DEBU] {585f4a41a2430518a57d5548b08583e4} [ 19 ms] [default] [yuledui] [rows:7 ] SELECT c.relname FROM pg_class c INNER JOIN pg_namespace n ON c.relnamespace = n.oid WHERE n.nspname = 'public' AND c.relkind IN ('r', 'p') AND c.relpartbound IS NULL ORDER BY c.relname -2024-11-06 11:33:16.001 [DEBU] {68ee6d42a2430518a67d5548c086e993} [ 29 ms] [default] [yuledui] [rows:10 ] SELECT a.attname AS field, t.typname AS type,a.attnotnull as null, (case when d.contype = 'p' then 'pri' when d.contype = 'u' then 'uni' else '' end) as key ,ic.column_default as default_value,b.description as comment ,coalesce(character_maximum_length, numeric_precision, -1) as length ,numeric_scale as scale FROM pg_attribute a left join pg_class c on a.attrelid = c.oid left join pg_constraint d on d.conrelid = c.oid and a.attnum = d.conkey[1] left join pg_description b ON a.attrelid=b.objoid AND a.attnum = b.objsubid left join pg_type t ON a.atttypid = t.oid left join information_schema.columns ic on ic.column_name = a.attname and ic.table_name = c.relname WHERE c.relname = 'pay_order' and a.attisdropped is false and a.attnum > 0 ORDER BY a.attnum -2024-11-06 11:33:16.020 [ERRO] {3cd94344a2430518a77d5548773a1aeb} [ 18 ms] [default] [yuledui] [rows:0 ] SELECT "order_id","price","amount","bean","open_id","mobile","shop_id","created","updated","ysepay_status" FROM "pay_order" WHERE orderId = 'pyacyq08u00d5erwl40rvgk200i0fyaq' LIMIT 1 -Error: pq: column "orderid" does not exist -Stack: -1. yuleduiPay/repo.(*PayOrder).GetPayOrderByOrderId - c:/Users/Administrator/Desktop/yuleduiPay/yuleduiPay/repo/pay_order.go:23 -2. yuleduiPay/service.(*YsePay).NotifyWxPay - c:/Users/Administrator/Desktop/yuleduiPay/yuleduiPay/service/ysepay.go:30 -3. yuleduiPay/middle.MiddlewareHandlerResponse - c:/Users/Administrator/Desktop/yuleduiPay/yuleduiPay/middle/middle.go:26 -4. yuleduiPay/middle.MiddlewareCORS - c:/Users/Administrator/Desktop/yuleduiPay/yuleduiPay/middle/middle.go:15 - -2024-11-06 11:34:34.144 [DEBU] {c0740871b44305187da42110f01305e4} [ 81 ms] [default] [yuledui] [rows:1 ] SELECT version(); -2024-11-06 11:34:34.160 [DEBU] {e484de75b44305187ea4211095eb527e} [ 16 ms] [default] [yuledui] [rows:7 ] SELECT c.relname FROM pg_class c INNER JOIN pg_namespace n ON c.relnamespace = n.oid WHERE n.nspname = 'public' AND c.relkind IN ('r', 'p') AND c.relpartbound IS NULL ORDER BY c.relname -2024-11-06 11:34:34.188 [DEBU] {0028dd76b44305187fa4211083c6536f} [ 27 ms] [default] [yuledui] [rows:10 ] SELECT a.attname AS field, t.typname AS type,a.attnotnull as null, (case when d.contype = 'p' then 'pri' when d.contype = 'u' then 'uni' else '' end) as key ,ic.column_default as default_value,b.description as comment ,coalesce(character_maximum_length, numeric_precision, -1) as length ,numeric_scale as scale FROM pg_attribute a left join pg_class c on a.attrelid = c.oid left join pg_constraint d on d.conrelid = c.oid and a.attnum = d.conkey[1] left join pg_description b ON a.attrelid=b.objoid AND a.attnum = b.objsubid left join pg_type t ON a.atttypid = t.oid left join information_schema.columns ic on ic.column_name = a.attname and ic.table_name = c.relname WHERE c.relname = 'pay_order' and a.attisdropped is false and a.attnum > 0 ORDER BY a.attnum -2024-11-06 11:34:34.227 [DEBU] {c05b8d78b443051880a4211026d1f285} [ 38 ms] [default] [yuledui] [rows:1 ] SELECT "order_id","price","amount","bean","open_id","mobile","shop_id","created","updated","ysepay_status" FROM "pay_order" WHERE order_id = 'pyacyq08u00d5erwl40rvgk200i0fyaq' LIMIT 1 -2024-11-06 11:34:40.117 [DEBU] {409c25d8b543051881a42110a2822f5c} [ 29 ms] [default] [yuledui] [rows:1 ] UPDATE "pay_order" SET "updated"='2024-11-06 11:34:39',"ysepay_status"='TRADE_SUCCESS' WHERE order_id = 'pyacyq08u00d5erwl40rvgk200i0fyaq' -2024-11-06 11:35:07.681 [DEBU] {f0cef33ebc43051883a42110903bfd19} [ 99 ms] [default] [yuledui] [rows:1 ] SELECT "order_id","price","amount","bean","open_id","mobile","shop_id","created","updated","ysepay_status" FROM "pay_order" WHERE order_id = 'pyacyq08u00d5erwl40rvgk200i0fyaq' LIMIT 1 -2024-11-06 11:35:08.961 [DEBU] {b8e6188fbc43051884a4211036508299} [ 34 ms] [default] [yuledui] [rows:1 ] UPDATE "pay_order" SET "updated"='2024-11-06 11:35:08',"ysepay_status"='TRADE_SUCCESS' WHERE order_id = 'pyacyq08u00d5erwl40rvgk200i0fyaq' -2024-11-06 11:37:19.522 [DEBU] {0074d5f2da43051834c1e4064766300a} [ 73 ms] [default] [yuledui] [rows:1 ] SELECT version(); -2024-11-06 11:37:19.539 [DEBU] {3cde48f7da43051835c1e406b592f297} [ 15 ms] [default] [yuledui] [rows:7 ] SELECT c.relname FROM pg_class c INNER JOIN pg_namespace n ON c.relnamespace = n.oid WHERE n.nspname = 'public' AND c.relkind IN ('r', 'p') AND c.relpartbound IS NULL ORDER BY c.relname -2024-11-06 11:37:19.566 [DEBU] {14ab34f8da43051836c1e4060b51aa6a} [ 27 ms] [default] [yuledui] [rows:10 ] SELECT a.attname AS field, t.typname AS type,a.attnotnull as null, (case when d.contype = 'p' then 'pri' when d.contype = 'u' then 'uni' else '' end) as key ,ic.column_default as default_value,b.description as comment ,coalesce(character_maximum_length, numeric_precision, -1) as length ,numeric_scale as scale FROM pg_attribute a left join pg_class c on a.attrelid = c.oid left join pg_constraint d on d.conrelid = c.oid and a.attnum = d.conkey[1] left join pg_description b ON a.attrelid=b.objoid AND a.attnum = b.objsubid left join pg_type t ON a.atttypid = t.oid left join information_schema.columns ic on ic.column_name = a.attname and ic.table_name = c.relname WHERE c.relname = 'pay_order' and a.attisdropped is false and a.attnum > 0 ORDER BY a.attnum -2024-11-06 11:37:19.595 [DEBU] {4c06d7f9da43051837c1e406aa643129} [ 28 ms] [default] [yuledui] [rows:1 ] SELECT "order_id","price","amount","bean","open_id","mobile","shop_id","created","updated","ysepay_status" FROM "pay_order" WHERE order_id = 'pyacyq08u00d5erwl40rvgk200i0fyaq' LIMIT 1 -2024-11-06 11:37:20.939 [DEBU] {bc24ee49db43051838c1e406b5e88f7b} [ 28 ms] [default] [yuledui] [rows:1 ] UPDATE "pay_order" SET "updated"='2024-11-06 11:37:20',"ysepay_status"='TRADE_SUCCESS' WHERE order_id = 'pyacyq08u00d5erwl40rvgk200i0fyaq' diff --git a/log/sqlLog/2024-11-07.log b/log/sqlLog/2024-11-07.log deleted file mode 100644 index f23e5df..0000000 --- a/log/sqlLog/2024-11-07.log +++ /dev/null @@ -1,75 +0,0 @@ -2024-11-07 11:34:11.614 [DEBU] {1cedb2c343920518b575875132b53297} [ 77 ms] [default] [yuledui] [rows:1 ] SELECT version(); -2024-11-07 11:34:11.631 [DEBU] {549f5ac843920518b6758751cf93f31b} [ 16 ms] [default] [yuledui] [rows:7 ] SELECT c.relname FROM pg_class c INNER JOIN pg_namespace n ON c.relnamespace = n.oid WHERE n.nspname = 'public' AND c.relkind IN ('r', 'p') AND c.relpartbound IS NULL ORDER BY c.relname -2024-11-07 11:34:11.659 [DEBU] {e0b9a5c243920518b4758751becaeb88} [ 28 ms] [default] [yuledui] [rows:31 ] SELECT a.attname AS field, t.typname AS type,a.attnotnull as null, (case when d.contype = 'p' then 'pri' when d.contype = 'u' then 'uni' else '' end) as key ,ic.column_default as default_value,b.description as comment ,coalesce(character_maximum_length, numeric_precision, -1) as length ,numeric_scale as scale FROM pg_attribute a left join pg_class c on a.attrelid = c.oid left join pg_constraint d on d.conrelid = c.oid and a.attnum = d.conkey[1] left join pg_description b ON a.attrelid=b.objoid AND a.attnum = b.objsubid left join pg_type t ON a.atttypid = t.oid left join information_schema.columns ic on ic.column_name = a.attname and ic.table_name = c.relname WHERE c.relname = 'account' and a.attisdropped is false and a.attnum > 0 ORDER BY a.attnum -2024-11-07 11:34:11.703 [DEBU] {e0b9a5c243920518b4758751becaeb88} [ 23 ms] [default] [yuledui] [rows:10 ] SELECT a.attname AS field, t.typname AS type,a.attnotnull as null, (case when d.contype = 'p' then 'pri' when d.contype = 'u' then 'uni' else '' end) as key ,ic.column_default as default_value,b.description as comment ,coalesce(character_maximum_length, numeric_precision, -1) as length ,numeric_scale as scale FROM pg_attribute a left join pg_class c on a.attrelid = c.oid left join pg_constraint d on d.conrelid = c.oid and a.attnum = d.conkey[1] left join pg_description b ON a.attrelid=b.objoid AND a.attnum = b.objsubid left join pg_type t ON a.atttypid = t.oid left join information_schema.columns ic on ic.column_name = a.attname and ic.table_name = c.relname WHERE c.relname = 'dict' and a.attisdropped is false and a.attnum > 0 ORDER BY a.attnum -2024-11-07 11:34:11.742 [DEBU] {e0b9a5c243920518b4758751becaeb88} [ 21 ms] [default] [yuledui] [rows:9 ] SELECT a.attname AS field, t.typname AS type,a.attnotnull as null, (case when d.contype = 'p' then 'pri' when d.contype = 'u' then 'uni' else '' end) as key ,ic.column_default as default_value,b.description as comment ,coalesce(character_maximum_length, numeric_precision, -1) as length ,numeric_scale as scale FROM pg_attribute a left join pg_class c on a.attrelid = c.oid left join pg_constraint d on d.conrelid = c.oid and a.attnum = d.conkey[1] left join pg_description b ON a.attrelid=b.objoid AND a.attnum = b.objsubid left join pg_type t ON a.atttypid = t.oid left join information_schema.columns ic on ic.column_name = a.attname and ic.table_name = c.relname WHERE c.relname = 'district' and a.attisdropped is false and a.attnum > 0 ORDER BY a.attnum -2024-11-07 11:34:11.783 [DEBU] {e0b9a5c243920518b4758751becaeb88} [ 21 ms] [default] [yuledui] [rows:11 ] SELECT a.attname AS field, t.typname AS type,a.attnotnull as null, (case when d.contype = 'p' then 'pri' when d.contype = 'u' then 'uni' else '' end) as key ,ic.column_default as default_value,b.description as comment ,coalesce(character_maximum_length, numeric_precision, -1) as length ,numeric_scale as scale FROM pg_attribute a left join pg_class c on a.attrelid = c.oid left join pg_constraint d on d.conrelid = c.oid and a.attnum = d.conkey[1] left join pg_description b ON a.attrelid=b.objoid AND a.attnum = b.objsubid left join pg_type t ON a.atttypid = t.oid left join information_schema.columns ic on ic.column_name = a.attname and ic.table_name = c.relname WHERE c.relname = 'pay_order' and a.attisdropped is false and a.attnum > 0 ORDER BY a.attnum -2024-11-07 11:34:11.823 [DEBU] {e0b9a5c243920518b4758751becaeb88} [ 21 ms] [default] [yuledui] [rows:12 ] SELECT a.attname AS field, t.typname AS type,a.attnotnull as null, (case when d.contype = 'p' then 'pri' when d.contype = 'u' then 'uni' else '' end) as key ,ic.column_default as default_value,b.description as comment ,coalesce(character_maximum_length, numeric_precision, -1) as length ,numeric_scale as scale FROM pg_attribute a left join pg_class c on a.attrelid = c.oid left join pg_constraint d on d.conrelid = c.oid and a.attnum = d.conkey[1] left join pg_description b ON a.attrelid=b.objoid AND a.attnum = b.objsubid left join pg_type t ON a.atttypid = t.oid left join information_schema.columns ic on ic.column_name = a.attname and ic.table_name = c.relname WHERE c.relname = 'promoter' and a.attisdropped is false and a.attnum > 0 ORDER BY a.attnum -2024-11-07 11:34:11.865 [DEBU] {e0b9a5c243920518b4758751becaeb88} [ 22 ms] [default] [yuledui] [rows:18 ] SELECT a.attname AS field, t.typname AS type,a.attnotnull as null, (case when d.contype = 'p' then 'pri' when d.contype = 'u' then 'uni' else '' end) as key ,ic.column_default as default_value,b.description as comment ,coalesce(character_maximum_length, numeric_precision, -1) as length ,numeric_scale as scale FROM pg_attribute a left join pg_class c on a.attrelid = c.oid left join pg_constraint d on d.conrelid = c.oid and a.attnum = d.conkey[1] left join pg_description b ON a.attrelid=b.objoid AND a.attnum = b.objsubid left join pg_type t ON a.atttypid = t.oid left join information_schema.columns ic on ic.column_name = a.attname and ic.table_name = c.relname WHERE c.relname = 'shop' and a.attisdropped is false and a.attnum > 0 ORDER BY a.attnum -2024-11-07 11:34:11.905 [DEBU] {e0b9a5c243920518b4758751becaeb88} [ 21 ms] [default] [yuledui] [rows:12 ] SELECT a.attname AS field, t.typname AS type,a.attnotnull as null, (case when d.contype = 'p' then 'pri' when d.contype = 'u' then 'uni' else '' end) as key ,ic.column_default as default_value,b.description as comment ,coalesce(character_maximum_length, numeric_precision, -1) as length ,numeric_scale as scale FROM pg_attribute a left join pg_class c on a.attrelid = c.oid left join pg_constraint d on d.conrelid = c.oid and a.attnum = d.conkey[1] left join pg_description b ON a.attrelid=b.objoid AND a.attnum = b.objsubid left join pg_type t ON a.atttypid = t.oid left join information_schema.columns ic on ic.column_name = a.attname and ic.table_name = c.relname WHERE c.relname = 'shop_admin' and a.attisdropped is false and a.attnum > 0 ORDER BY a.attnum -2024-11-07 17:07:41.212 [DEBU] {c8ccb99b76a405189953d151d34c6dc5} [ 93 ms] [default] [yuledui] [rows:1 ] SELECT version(); -2024-11-07 17:07:41.228 [DEBU] {a88b4ca176a405189a53d151fde08493} [ 15 ms] [default] [yuledui] [rows:7 ] SELECT c.relname FROM pg_class c INNER JOIN pg_namespace n ON c.relnamespace = n.oid WHERE n.nspname = 'public' AND c.relkind IN ('r', 'p') AND c.relpartbound IS NULL ORDER BY c.relname -2024-11-07 17:07:41.256 [DEBU] {8ce841a276a405189b53d151ac67e95d} [ 27 ms] [default] [yuledui] [rows:18 ] SELECT a.attname AS field, t.typname AS type,a.attnotnull as null, (case when d.contype = 'p' then 'pri' when d.contype = 'u' then 'uni' else '' end) as key ,ic.column_default as default_value,b.description as comment ,coalesce(character_maximum_length, numeric_precision, -1) as length ,numeric_scale as scale FROM pg_attribute a left join pg_class c on a.attrelid = c.oid left join pg_constraint d on d.conrelid = c.oid and a.attnum = d.conkey[1] left join pg_description b ON a.attrelid=b.objoid AND a.attnum = b.objsubid left join pg_type t ON a.atttypid = t.oid left join information_schema.columns ic on ic.column_name = a.attname and ic.table_name = c.relname WHERE c.relname = 'shop' and a.attisdropped is false and a.attnum > 0 ORDER BY a.attnum -2024-11-07 17:07:41.285 [DEBU] {cccee7a376a405189c53d151299c9e0d} [ 29 ms] [default] [yuledui] [rows:1 ] SELECT "shop_id","promoter_id","account_number","child_account_number","contact_name","tel","shop_name","address","door_photo","interior_photo","industry","equipment_no","extend","join_date","state","delete_flag","create_time","update_time" FROM "shop" WHERE shop_id = 'aaaaaaaaaa' LIMIT 1 -2024-11-07 17:07:44.926 [DEBU] {cc43437d77a405189d53d15172e5ed6c} [ 23 ms] [default] [yuledui] [rows:11 ] SELECT a.attname AS field, t.typname AS type,a.attnotnull as null, (case when d.contype = 'p' then 'pri' when d.contype = 'u' then 'uni' else '' end) as key ,ic.column_default as default_value,b.description as comment ,coalesce(character_maximum_length, numeric_precision, -1) as length ,numeric_scale as scale FROM pg_attribute a left join pg_class c on a.attrelid = c.oid left join pg_constraint d on d.conrelid = c.oid and a.attnum = d.conkey[1] left join pg_description b ON a.attrelid=b.objoid AND a.attnum = b.objsubid left join pg_type t ON a.atttypid = t.oid left join information_schema.columns ic on ic.column_name = a.attname and ic.table_name = c.relname WHERE c.relname = 'pay_order' and a.attisdropped is false and a.attnum > 0 ORDER BY a.attnum -2024-11-07 17:07:44.962 [DEBU] {18b4a87e77a405189e53d151e3305be9} [ 36 ms] [default] [yuledui] [rows:1 ] INSERT INTO "pay_order"("order_id","price","amount","bean","open_id","mobile","shop_id","created","updated","ysepay_status","channel") VALUES('pyacyq0g6s0d5fttgh2knlk200p8dywf',65.3,65.2,0.1,'aaaaaaaaaaaaaaaaabbbbbbbb','15963264270','aaaaaaaaaa','2024-11-07 17:07:44','2024-11-07 17:07:44','',0) RETURNING "order_id" -2024-11-07 17:08:31.671 [DEBU] {ec101c5c82a405184dac4750bde6f5a4} [ 80 ms] [default] [yuledui] [rows:1 ] SELECT version(); -2024-11-07 17:08:31.687 [DEBU] {a834ec6082a405184eac4750f20bc6dc} [ 15 ms] [default] [yuledui] [rows:7 ] SELECT c.relname FROM pg_class c INNER JOIN pg_namespace n ON c.relnamespace = n.oid WHERE n.nspname = 'public' AND c.relkind IN ('r', 'p') AND c.relpartbound IS NULL ORDER BY c.relname -2024-11-07 17:08:31.723 [DEBU] {047ee16182a405184fac4750088df625} [ 35 ms] [default] [yuledui] [rows:18 ] SELECT a.attname AS field, t.typname AS type,a.attnotnull as null, (case when d.contype = 'p' then 'pri' when d.contype = 'u' then 'uni' else '' end) as key ,ic.column_default as default_value,b.description as comment ,coalesce(character_maximum_length, numeric_precision, -1) as length ,numeric_scale as scale FROM pg_attribute a left join pg_class c on a.attrelid = c.oid left join pg_constraint d on d.conrelid = c.oid and a.attnum = d.conkey[1] left join pg_description b ON a.attrelid=b.objoid AND a.attnum = b.objsubid left join pg_type t ON a.atttypid = t.oid left join information_schema.columns ic on ic.column_name = a.attname and ic.table_name = c.relname WHERE c.relname = 'shop' and a.attisdropped is false and a.attnum > 0 ORDER BY a.attnum -2024-11-07 17:08:31.754 [DEBU] {18df006482a4051850ac4750c185ced4} [ 30 ms] [default] [yuledui] [rows:1 ] SELECT "shop_id","promoter_id","account_number","child_account_number","contact_name","tel","shop_name","address","door_photo","interior_photo","industry","equipment_no","extend","join_date","state","delete_flag","create_time","update_time" FROM "shop" WHERE shop_id = 'aaaaaaaaaa' LIMIT 1 -2024-11-07 17:08:35.071 [DEBU] {18c12a2a83a4051851ac475058807fed} [ 23 ms] [default] [yuledui] [rows:11 ] SELECT a.attname AS field, t.typname AS type,a.attnotnull as null, (case when d.contype = 'p' then 'pri' when d.contype = 'u' then 'uni' else '' end) as key ,ic.column_default as default_value,b.description as comment ,coalesce(character_maximum_length, numeric_precision, -1) as length ,numeric_scale as scale FROM pg_attribute a left join pg_class c on a.attrelid = c.oid left join pg_constraint d on d.conrelid = c.oid and a.attnum = d.conkey[1] left join pg_description b ON a.attrelid=b.objoid AND a.attnum = b.objsubid left join pg_type t ON a.atttypid = t.oid left join information_schema.columns ic on ic.column_name = a.attname and ic.table_name = c.relname WHERE c.relname = 'pay_order' and a.attisdropped is false and a.attnum > 0 ORDER BY a.attnum -2024-11-07 17:08:35.102 [DEBU] {14ae952b83a4051852ac4750fc2daaa7} [ 30 ms] [default] [yuledui] [rows:1 ] INSERT INTO "pay_order"("order_id","price","amount","bean","open_id","mobile","shop_id","created","updated","ysepay_status","channel") VALUES('pyacyq0g0c0d5ftu3lqplfw20052lkj8',65.3,65.2,0.1,'aaaaaaaaaaaaaaaaabbbbbbbb','15963264270','aaaaaaaaaa','2024-11-07 17:08:34','2024-11-07 17:08:34','',1) RETURNING "order_id" -2024-11-07 17:15:15.916 [DEBU] {708e797be0a405183c288c3d3ac44184} [ 71 ms] [default] [yuledui] [rows:1 ] SELECT version(); -2024-11-07 17:15:15.932 [DEBU] {c847cd7fe0a405183d288c3d1f9b5454} [ 15 ms] [default] [yuledui] [rows:7 ] SELECT c.relname FROM pg_class c INNER JOIN pg_namespace n ON c.relnamespace = n.oid WHERE n.nspname = 'public' AND c.relkind IN ('r', 'p') AND c.relpartbound IS NULL ORDER BY c.relname -2024-11-07 17:15:15.958 [DEBU] {00b8b080e0a405183e288c3d2d65df95} [ 26 ms] [default] [yuledui] [rows:18 ] SELECT a.attname AS field, t.typname AS type,a.attnotnull as null, (case when d.contype = 'p' then 'pri' when d.contype = 'u' then 'uni' else '' end) as key ,ic.column_default as default_value,b.description as comment ,coalesce(character_maximum_length, numeric_precision, -1) as length ,numeric_scale as scale FROM pg_attribute a left join pg_class c on a.attrelid = c.oid left join pg_constraint d on d.conrelid = c.oid and a.attnum = d.conkey[1] left join pg_description b ON a.attrelid=b.objoid AND a.attnum = b.objsubid left join pg_type t ON a.atttypid = t.oid left join information_schema.columns ic on ic.column_name = a.attname and ic.table_name = c.relname WHERE c.relname = 'shop' and a.attisdropped is false and a.attnum > 0 ORDER BY a.attnum -2024-11-07 17:15:15.992 [DEBU] {1cdf4882e0a405183f288c3d8f2341b2} [ 33 ms] [default] [yuledui] [rows:1 ] SELECT "shop_id","promoter_id","account_number","child_account_number","contact_name","tel","shop_name","address","door_photo","interior_photo","industry","equipment_no","extend","join_date","state","delete_flag","create_time","update_time" FROM "shop" WHERE shop_id = 'aaaaaaaaaa' LIMIT 1 -2024-11-07 17:15:23.555 [DEBU] {b0264044e2a4051840288c3daa2ef8cc} [ 47 ms] [default] [yuledui] [rows:11 ] SELECT a.attname AS field, t.typname AS type,a.attnotnull as null, (case when d.contype = 'p' then 'pri' when d.contype = 'u' then 'uni' else '' end) as key ,ic.column_default as default_value,b.description as comment ,coalesce(character_maximum_length, numeric_precision, -1) as length ,numeric_scale as scale FROM pg_attribute a left join pg_class c on a.attrelid = c.oid left join pg_constraint d on d.conrelid = c.oid and a.attnum = d.conkey[1] left join pg_description b ON a.attrelid=b.objoid AND a.attnum = b.objsubid left join pg_type t ON a.atttypid = t.oid left join information_schema.columns ic on ic.column_name = a.attname and ic.table_name = c.relname WHERE c.relname = 'pay_order' and a.attisdropped is false and a.attnum > 0 ORDER BY a.attnum -2024-11-07 17:15:23.594 [DEBU] {5c4b0d47e2a4051841288c3d09836c27} [ 38 ms] [default] [yuledui] [rows:1 ] INSERT INTO "pay_order"("order_id","price","amount","bean","open_id","mobile","shop_id","created","updated","ysepay_status","channel") VALUES('pyacyq0gec0d5ftzb3r79jw200re6exv',65.3,65.2,0.1,'aaaaaaaaaaaaaaaaabbbbbbbb','15963264270','aaaaaaaaaa','2024-11-07 17:15:22','2024-11-07 17:15:22','',1) RETURNING "order_id" -2024-11-07 17:23:34.035 [DEBU] {ec0aa97554a505188d1a2d70b771759c} [ 72 ms] [default] [yuledui] [rows:1 ] SELECT version(); -2024-11-07 17:23:34.049 [DEBU] {6cadf57954a505188e1a2d7058326499} [ 14 ms] [default] [yuledui] [rows:7 ] SELECT c.relname FROM pg_class c INNER JOIN pg_namespace n ON c.relnamespace = n.oid WHERE n.nspname = 'public' AND c.relkind IN ('r', 'p') AND c.relpartbound IS NULL ORDER BY c.relname -2024-11-07 17:23:34.076 [DEBU] {000ece7a54a505188f1a2d70dd7a4dbc} [ 27 ms] [default] [yuledui] [rows:18 ] SELECT a.attname AS field, t.typname AS type,a.attnotnull as null, (case when d.contype = 'p' then 'pri' when d.contype = 'u' then 'uni' else '' end) as key ,ic.column_default as default_value,b.description as comment ,coalesce(character_maximum_length, numeric_precision, -1) as length ,numeric_scale as scale FROM pg_attribute a left join pg_class c on a.attrelid = c.oid left join pg_constraint d on d.conrelid = c.oid and a.attnum = d.conkey[1] left join pg_description b ON a.attrelid=b.objoid AND a.attnum = b.objsubid left join pg_type t ON a.atttypid = t.oid left join information_schema.columns ic on ic.column_name = a.attname and ic.table_name = c.relname WHERE c.relname = 'shop' and a.attisdropped is false and a.attnum > 0 ORDER BY a.attnum -2024-11-07 17:23:34.102 [DEBU] {400f637c54a50518901a2d703c0d42da} [ 26 ms] [default] [yuledui] [rows:1 ] SELECT "shop_id","promoter_id","account_number","child_account_number","contact_name","tel","shop_name","address","door_photo","interior_photo","industry","equipment_no","extend","join_date","state","delete_flag","create_time","update_time" FROM "shop" WHERE shop_id = 'aaaaaaaaaa' LIMIT 1 -2024-11-07 17:23:34.125 [DEBU] {0462047e54a50518911a2d706aa6208a} [ 22 ms] [default] [yuledui] [rows:11 ] SELECT a.attname AS field, t.typname AS type,a.attnotnull as null, (case when d.contype = 'p' then 'pri' when d.contype = 'u' then 'uni' else '' end) as key ,ic.column_default as default_value,b.description as comment ,coalesce(character_maximum_length, numeric_precision, -1) as length ,numeric_scale as scale FROM pg_attribute a left join pg_class c on a.attrelid = c.oid left join pg_constraint d on d.conrelid = c.oid and a.attnum = d.conkey[1] left join pg_description b ON a.attrelid=b.objoid AND a.attnum = b.objsubid left join pg_type t ON a.atttypid = t.oid left join information_schema.columns ic on ic.column_name = a.attname and ic.table_name = c.relname WHERE c.relname = 'pay_order' and a.attisdropped is false and a.attnum > 0 ORDER BY a.attnum -2024-11-07 17:23:34.153 [DEBU] {200e597f54a50518921a2d70f54864d1} [ 27 ms] [default] [yuledui] [rows:1 ] INSERT INTO "pay_order"("order_id","price","amount","bean","open_id","mobile","shop_id","created","updated","ysepay_status","channel") VALUES('pyacyq01qk0d5fu5ltbnddc2006f9hpf',65.3,65.2,0.1,'aaaaaaaaaaaaaaaaabbbbbbbb','15963264270','aaaaaaaaaa','2024-11-07 17:23:34','2024-11-07 17:23:34','',1) RETURNING "order_id" -2024-11-07 17:25:13.163 [DEBU] {3ceb0c896ba50518bc56911c59c42bd0} [ 90 ms] [default] [yuledui] [rows:1 ] SELECT version(); -2024-11-07 17:25:13.181 [DEBU] {0875758e6ba50518bd56911c2ae047c6} [ 18 ms] [default] [yuledui] [rows:7 ] SELECT c.relname FROM pg_class c INNER JOIN pg_namespace n ON c.relnamespace = n.oid WHERE n.nspname = 'public' AND c.relkind IN ('r', 'p') AND c.relpartbound IS NULL ORDER BY c.relname -2024-11-07 17:25:13.209 [DEBU] {d4d47f8f6ba50518be56911c213cd4e0} [ 28 ms] [default] [yuledui] [rows:18 ] SELECT a.attname AS field, t.typname AS type,a.attnotnull as null, (case when d.contype = 'p' then 'pri' when d.contype = 'u' then 'uni' else '' end) as key ,ic.column_default as default_value,b.description as comment ,coalesce(character_maximum_length, numeric_precision, -1) as length ,numeric_scale as scale FROM pg_attribute a left join pg_class c on a.attrelid = c.oid left join pg_constraint d on d.conrelid = c.oid and a.attnum = d.conkey[1] left join pg_description b ON a.attrelid=b.objoid AND a.attnum = b.objsubid left join pg_type t ON a.atttypid = t.oid left join information_schema.columns ic on ic.column_name = a.attname and ic.table_name = c.relname WHERE c.relname = 'shop' and a.attisdropped is false and a.attnum > 0 ORDER BY a.attnum -2024-11-07 17:25:13.245 [DEBU] {c85e3c916ba50518bf56911c6521a0e3} [ 35 ms] [default] [yuledui] [rows:1 ] SELECT "shop_id","promoter_id","account_number","child_account_number","contact_name","tel","shop_name","address","door_photo","interior_photo","industry","equipment_no","extend","join_date","state","delete_flag","create_time","update_time" FROM "shop" WHERE shop_id = 'aaaaaaaaaa' LIMIT 1 -2024-11-07 17:25:13.270 [DEBU] {84a168936ba50518c056911c34fac588} [ 23 ms] [default] [yuledui] [rows:11 ] SELECT a.attname AS field, t.typname AS type,a.attnotnull as null, (case when d.contype = 'p' then 'pri' when d.contype = 'u' then 'uni' else '' end) as key ,ic.column_default as default_value,b.description as comment ,coalesce(character_maximum_length, numeric_precision, -1) as length ,numeric_scale as scale FROM pg_attribute a left join pg_class c on a.attrelid = c.oid left join pg_constraint d on d.conrelid = c.oid and a.attnum = d.conkey[1] left join pg_description b ON a.attrelid=b.objoid AND a.attnum = b.objsubid left join pg_type t ON a.atttypid = t.oid left join information_schema.columns ic on ic.column_name = a.attname and ic.table_name = c.relname WHERE c.relname = 'pay_order' and a.attisdropped is false and a.attnum > 0 ORDER BY a.attnum -2024-11-07 17:25:13.305 [DEBU] {94bce1946ba50518c156911cc27d9fa4} [ 34 ms] [default] [yuledui] [rows:1 ] INSERT INTO "pay_order"("order_id","price","amount","bean","open_id","mobile","shop_id","created","updated","ysepay_status","channel") VALUES('pyacyq0gls0d5fu6vcywxsg200mf4zp3',65.3,65.2,0.1,'aaaaaaaaaaaaaaaaabbbbbbbb','15963264270','aaaaaaaaaa','2024-11-07 17:25:13','2024-11-07 17:25:13','',1) RETURNING "order_id" -2024-11-07 17:34:57.586 [DEBU] {a03b629cf3a5051810f7af621eca1329} [ 72 ms] [default] [yuledui] [rows:1 ] SELECT version(); -2024-11-07 17:34:57.604 [DEBU] {0c0dd0a0f3a5051811f7af62e9aa7983} [ 17 ms] [default] [yuledui] [rows:7 ] SELECT c.relname FROM pg_class c INNER JOIN pg_namespace n ON c.relnamespace = n.oid WHERE n.nspname = 'public' AND c.relkind IN ('r', 'p') AND c.relpartbound IS NULL ORDER BY c.relname -2024-11-07 17:34:57.631 [DEBU] {ec5fdda1f3a5051812f7af625fd5debf} [ 26 ms] [default] [yuledui] [rows:18 ] SELECT a.attname AS field, t.typname AS type,a.attnotnull as null, (case when d.contype = 'p' then 'pri' when d.contype = 'u' then 'uni' else '' end) as key ,ic.column_default as default_value,b.description as comment ,coalesce(character_maximum_length, numeric_precision, -1) as length ,numeric_scale as scale FROM pg_attribute a left join pg_class c on a.attrelid = c.oid left join pg_constraint d on d.conrelid = c.oid and a.attnum = d.conkey[1] left join pg_description b ON a.attrelid=b.objoid AND a.attnum = b.objsubid left join pg_type t ON a.atttypid = t.oid left join information_schema.columns ic on ic.column_name = a.attname and ic.table_name = c.relname WHERE c.relname = 'shop' and a.attisdropped is false and a.attnum > 0 ORDER BY a.attnum -2024-11-07 17:34:57.662 [DEBU] {14ed85a3f3a5051813f7af6242b58ceb} [ 30 ms] [default] [yuledui] [rows:1 ] SELECT "shop_id","promoter_id","account_number","child_account_number","contact_name","tel","shop_name","address","door_photo","interior_photo","industry","equipment_no","extend","join_date","state","delete_flag","create_time","update_time" FROM "shop" WHERE shop_id = 'aaaaaaaaaa' LIMIT 1 -2024-11-07 17:34:57.684 [DEBU] {405c57a5f3a5051814f7af62a389513a} [ 21 ms] [default] [yuledui] [rows:11 ] SELECT a.attname AS field, t.typname AS type,a.attnotnull as null, (case when d.contype = 'p' then 'pri' when d.contype = 'u' then 'uni' else '' end) as key ,ic.column_default as default_value,b.description as comment ,coalesce(character_maximum_length, numeric_precision, -1) as length ,numeric_scale as scale FROM pg_attribute a left join pg_class c on a.attrelid = c.oid left join pg_constraint d on d.conrelid = c.oid and a.attnum = d.conkey[1] left join pg_description b ON a.attrelid=b.objoid AND a.attnum = b.objsubid left join pg_type t ON a.atttypid = t.oid left join information_schema.columns ic on ic.column_name = a.attname and ic.table_name = c.relname WHERE c.relname = 'pay_order' and a.attisdropped is false and a.attnum > 0 ORDER BY a.attnum -2024-11-07 17:34:57.715 [DEBU] {404ab8a6f3a5051815f7af62e9464651} [ 29 ms] [default] [yuledui] [rows:1 ] INSERT INTO "pay_order"("order_id","price","amount","bean","open_id","mobile","shop_id","created","updated","ysepay_status","channel") VALUES('pyacyq07ng0d5fuebu5cuak20044rst6',65.3,65.2,0.1,'aaaaaaaaaaaaaaaaabbbbbbbb','15963264270','aaaaaaaaaa','2024-11-07 17:34:57','2024-11-07 17:34:57','',1) RETURNING "order_id" -2024-11-07 17:43:42.770 [DEBU] {20217ce36da60518d2b25c4afbeb5c4f} [ 78 ms] [default] [yuledui] [rows:1 ] SELECT version(); -2024-11-07 17:43:42.787 [DEBU] {148641e86da60518d3b25c4a21b5eb49} [ 15 ms] [default] [yuledui] [rows:7 ] SELECT c.relname FROM pg_class c INNER JOIN pg_namespace n ON c.relnamespace = n.oid WHERE n.nspname = 'public' AND c.relkind IN ('r', 'p') AND c.relpartbound IS NULL ORDER BY c.relname -2024-11-07 17:43:42.816 [DEBU] {705542e96da60518d4b25c4afd8bffc2} [ 28 ms] [default] [yuledui] [rows:18 ] SELECT a.attname AS field, t.typname AS type,a.attnotnull as null, (case when d.contype = 'p' then 'pri' when d.contype = 'u' then 'uni' else '' end) as key ,ic.column_default as default_value,b.description as comment ,coalesce(character_maximum_length, numeric_precision, -1) as length ,numeric_scale as scale FROM pg_attribute a left join pg_class c on a.attrelid = c.oid left join pg_constraint d on d.conrelid = c.oid and a.attnum = d.conkey[1] left join pg_description b ON a.attrelid=b.objoid AND a.attnum = b.objsubid left join pg_type t ON a.atttypid = t.oid left join information_schema.columns ic on ic.column_name = a.attname and ic.table_name = c.relname WHERE c.relname = 'shop' and a.attisdropped is false and a.attnum > 0 ORDER BY a.attnum -2024-11-07 17:43:42.847 [DEBU] {58d9f7ea6da60518d5b25c4a39112677} [ 30 ms] [default] [yuledui] [rows:1 ] SELECT "shop_id","promoter_id","account_number","child_account_number","contact_name","tel","shop_name","address","door_photo","interior_photo","industry","equipment_no","extend","join_date","state","delete_flag","create_time","update_time" FROM "shop" WHERE shop_id = 'aaaaaaaaaa' LIMIT 1 -2024-11-07 17:43:42.871 [DEBU] {4c62c9ec6da60518d6b25c4a5538f289} [ 23 ms] [default] [yuledui] [rows:11 ] SELECT a.attname AS field, t.typname AS type,a.attnotnull as null, (case when d.contype = 'p' then 'pri' when d.contype = 'u' then 'uni' else '' end) as key ,ic.column_default as default_value,b.description as comment ,coalesce(character_maximum_length, numeric_precision, -1) as length ,numeric_scale as scale FROM pg_attribute a left join pg_class c on a.attrelid = c.oid left join pg_constraint d on d.conrelid = c.oid and a.attnum = d.conkey[1] left join pg_description b ON a.attrelid=b.objoid AND a.attnum = b.objsubid left join pg_type t ON a.atttypid = t.oid left join information_schema.columns ic on ic.column_name = a.attname and ic.table_name = c.relname WHERE c.relname = 'pay_order' and a.attisdropped is false and a.attnum > 0 ORDER BY a.attnum -2024-11-07 17:43:42.903 [DEBU] {801a45ee6da60518d7b25c4a58f07456} [ 31 ms] [default] [yuledui] [rows:1 ] INSERT INTO "pay_order"("order_id","price","amount","bean","open_id","mobile","shop_id","created","updated","ysepay_status","channel") VALUES('pyacyq0nk00d5ful13r1n4c200f242pn',65.3,65.2,0.1,'aaaaaaaaaaaaaaaaabbbbbbbb','15963264270','aaaaaaaaaa','2024-11-07 17:43:42','2024-11-07 17:43:42','',1) RETURNING "order_id" -2024-11-07 17:47:54.515 [DEBU] {34b5d880a8a60518635b0146427fda6d} [ 75 ms] [default] [yuledui] [rows:1 ] SELECT version(); -2024-11-07 17:47:54.531 [DEBU] {ac796585a8a60518645b01461adba4fc} [ 15 ms] [default] [yuledui] [rows:7 ] SELECT c.relname FROM pg_class c INNER JOIN pg_namespace n ON c.relnamespace = n.oid WHERE n.nspname = 'public' AND c.relkind IN ('r', 'p') AND c.relpartbound IS NULL ORDER BY c.relname -2024-11-07 17:47:54.560 [DEBU] {bc1c5c86a8a60518655b0146a98ed50a} [ 28 ms] [default] [yuledui] [rows:18 ] SELECT a.attname AS field, t.typname AS type,a.attnotnull as null, (case when d.contype = 'p' then 'pri' when d.contype = 'u' then 'uni' else '' end) as key ,ic.column_default as default_value,b.description as comment ,coalesce(character_maximum_length, numeric_precision, -1) as length ,numeric_scale as scale FROM pg_attribute a left join pg_class c on a.attrelid = c.oid left join pg_constraint d on d.conrelid = c.oid and a.attnum = d.conkey[1] left join pg_description b ON a.attrelid=b.objoid AND a.attnum = b.objsubid left join pg_type t ON a.atttypid = t.oid left join information_schema.columns ic on ic.column_name = a.attname and ic.table_name = c.relname WHERE c.relname = 'shop' and a.attisdropped is false and a.attnum > 0 ORDER BY a.attnum -2024-11-07 17:47:54.592 [DEBU] {40990e88a8a60518665b0146487c7220} [ 31 ms] [default] [yuledui] [rows:1 ] SELECT "shop_id","promoter_id","account_number","child_account_number","contact_name","tel","shop_name","address","door_photo","interior_photo","industry","equipment_no","extend","join_date","state","delete_flag","create_time","update_time" FROM "shop" WHERE shop_id = 'aaaaaaaaaa' LIMIT 1 -2024-11-07 17:47:54.615 [DEBU] {0481f789a8a60518675b01463c0e4d16} [ 22 ms] [default] [yuledui] [rows:11 ] SELECT a.attname AS field, t.typname AS type,a.attnotnull as null, (case when d.contype = 'p' then 'pri' when d.contype = 'u' then 'uni' else '' end) as key ,ic.column_default as default_value,b.description as comment ,coalesce(character_maximum_length, numeric_precision, -1) as length ,numeric_scale as scale FROM pg_attribute a left join pg_class c on a.attrelid = c.oid left join pg_constraint d on d.conrelid = c.oid and a.attnum = d.conkey[1] left join pg_description b ON a.attrelid=b.objoid AND a.attnum = b.objsubid left join pg_type t ON a.atttypid = t.oid left join information_schema.columns ic on ic.column_name = a.attname and ic.table_name = c.relname WHERE c.relname = 'pay_order' and a.attisdropped is false and a.attnum > 0 ORDER BY a.attnum -2024-11-07 17:47:54.645 [DEBU] {c0275c8ba8a60518685b014674255473} [ 29 ms] [default] [yuledui] [rows:1 ] INSERT INTO "pay_order"("order_id","price","amount","bean","open_id","mobile","shop_id","created","updated","ysepay_status","channel") VALUES('pyacyq0ho40d5fuo8r5luys20088xhsk',65.3,65.2,0.1,'aaaaaaaaaaaaaaaaabbbbbbbb','15963264270','aaaaaaaaaa','2024-11-07 17:47:54','2024-11-07 17:47:54','',1) RETURNING "order_id" -2024-11-07 17:48:58.451 [DEBU] {f8258a63b7a60518afe2c84d26f5967d} [ 78 ms] [default] [yuledui] [rows:1 ] SELECT version(); -2024-11-07 17:48:58.468 [DEBU] {c08e4a68b7a60518b0e2c84d3349a035} [ 16 ms] [default] [yuledui] [rows:7 ] SELECT c.relname FROM pg_class c INNER JOIN pg_namespace n ON c.relnamespace = n.oid WHERE n.nspname = 'public' AND c.relkind IN ('r', 'p') AND c.relpartbound IS NULL ORDER BY c.relname -2024-11-07 17:48:58.496 [DEBU] {84513b69b7a60518b1e2c84dd670cedb} [ 28 ms] [default] [yuledui] [rows:18 ] SELECT a.attname AS field, t.typname AS type,a.attnotnull as null, (case when d.contype = 'p' then 'pri' when d.contype = 'u' then 'uni' else '' end) as key ,ic.column_default as default_value,b.description as comment ,coalesce(character_maximum_length, numeric_precision, -1) as length ,numeric_scale as scale FROM pg_attribute a left join pg_class c on a.attrelid = c.oid left join pg_constraint d on d.conrelid = c.oid and a.attnum = d.conkey[1] left join pg_description b ON a.attrelid=b.objoid AND a.attnum = b.objsubid left join pg_type t ON a.atttypid = t.oid left join information_schema.columns ic on ic.column_name = a.attname and ic.table_name = c.relname WHERE c.relname = 'shop' and a.attisdropped is false and a.attnum > 0 ORDER BY a.attnum -2024-11-07 17:48:58.527 [DEBU] {d82ff86ab7a60518b2e2c84d77cdee43} [ 30 ms] [default] [yuledui] [rows:1 ] SELECT "shop_id","promoter_id","account_number","child_account_number","contact_name","tel","shop_name","address","door_photo","interior_photo","industry","equipment_no","extend","join_date","state","delete_flag","create_time","update_time" FROM "shop" WHERE shop_id = 'aaaaaaaaaa' LIMIT 1 -2024-11-07 17:48:58.550 [DEBU] {f47bc06cb7a60518b3e2c84d7c8e8c98} [ 23 ms] [default] [yuledui] [rows:11 ] SELECT a.attname AS field, t.typname AS type,a.attnotnull as null, (case when d.contype = 'p' then 'pri' when d.contype = 'u' then 'uni' else '' end) as key ,ic.column_default as default_value,b.description as comment ,coalesce(character_maximum_length, numeric_precision, -1) as length ,numeric_scale as scale FROM pg_attribute a left join pg_class c on a.attrelid = c.oid left join pg_constraint d on d.conrelid = c.oid and a.attnum = d.conkey[1] left join pg_description b ON a.attrelid=b.objoid AND a.attnum = b.objsubid left join pg_type t ON a.atttypid = t.oid left join information_schema.columns ic on ic.column_name = a.attname and ic.table_name = c.relname WHERE c.relname = 'pay_order' and a.attisdropped is false and a.attnum > 0 ORDER BY a.attnum -2024-11-07 17:48:58.581 [DEBU] {c0c12a6eb7a60518b4e2c84d7b46b19e} [ 30 ms] [default] [yuledui] [rows:1 ] INSERT INTO "pay_order"("order_id","price","amount","bean","open_id","mobile","shop_id","created","updated","ysepay_status","channel") VALUES('pyacyq0hzs0d5fup24ih69g2008yuz7e',65.3,65.2,0.1,'aaaaaaaaaaaaaaaaabbbbbbbb','15963264270','aaaaaaaaaa','2024-11-07 17:48:58','2024-11-07 17:48:58','',1) RETURNING "order_id" -2024-11-07 17:50:58.635 [DEBU] {38660b5fd3a60518ebbd5c3fa7631e0c} [ 79 ms] [default] [yuledui] [rows:1 ] SELECT version(); -2024-11-07 17:50:58.650 [DEBU] {1cd6d063d3a60518ecbd5c3f91ff8d4b} [ 14 ms] [default] [yuledui] [rows:7 ] SELECT c.relname FROM pg_class c INNER JOIN pg_namespace n ON c.relnamespace = n.oid WHERE n.nspname = 'public' AND c.relkind IN ('r', 'p') AND c.relpartbound IS NULL ORDER BY c.relname -2024-11-07 17:50:58.676 [DEBU] {e462a364d3a60518edbd5c3f4b641511} [ 26 ms] [default] [yuledui] [rows:18 ] SELECT a.attname AS field, t.typname AS type,a.attnotnull as null, (case when d.contype = 'p' then 'pri' when d.contype = 'u' then 'uni' else '' end) as key ,ic.column_default as default_value,b.description as comment ,coalesce(character_maximum_length, numeric_precision, -1) as length ,numeric_scale as scale FROM pg_attribute a left join pg_class c on a.attrelid = c.oid left join pg_constraint d on d.conrelid = c.oid and a.attnum = d.conkey[1] left join pg_description b ON a.attrelid=b.objoid AND a.attnum = b.objsubid left join pg_type t ON a.atttypid = t.oid left join information_schema.columns ic on ic.column_name = a.attname and ic.table_name = c.relname WHERE c.relname = 'shop' and a.attisdropped is false and a.attnum > 0 ORDER BY a.attnum -2024-11-07 17:50:58.703 [DEBU] {1cc23c66d3a60518eebd5c3f35ab35f8} [ 26 ms] [default] [yuledui] [rows:1 ] SELECT "shop_id","promoter_id","account_number","child_account_number","contact_name","tel","shop_name","address","door_photo","interior_photo","industry","equipment_no","extend","join_date","state","delete_flag","create_time","update_time" FROM "shop" WHERE shop_id = 'aaaaaaaaaa' LIMIT 1 -2024-11-07 17:50:58.724 [DEBU] {3cd8cd67d3a60518efbd5c3ffa44d0da} [ 21 ms] [default] [yuledui] [rows:11 ] SELECT a.attname AS field, t.typname AS type,a.attnotnull as null, (case when d.contype = 'p' then 'pri' when d.contype = 'u' then 'uni' else '' end) as key ,ic.column_default as default_value,b.description as comment ,coalesce(character_maximum_length, numeric_precision, -1) as length ,numeric_scale as scale FROM pg_attribute a left join pg_class c on a.attrelid = c.oid left join pg_constraint d on d.conrelid = c.oid and a.attnum = d.conkey[1] left join pg_description b ON a.attrelid=b.objoid AND a.attnum = b.objsubid left join pg_type t ON a.atttypid = t.oid left join information_schema.columns ic on ic.column_name = a.attname and ic.table_name = c.relname WHERE c.relname = 'pay_order' and a.attisdropped is false and a.attnum > 0 ORDER BY a.attnum -2024-11-07 17:50:58.752 [DEBU] {8cee1a69d3a60518f0bd5c3fef0281a4} [ 27 ms] [default] [yuledui] [rows:1 ] INSERT INTO "pay_order"("order_id","price","amount","bean","open_id","mobile","shop_id","created","updated","ysepay_status","channel") VALUES('pyacyq0gpg0d5fuqlc07i9o200o936bs',65.3,65.2,0.1,'aaaaaaaaaaaaaaaaabbbbbbbb','15963264270','aaaaaaaaaa','2024-11-07 17:50:58','2024-11-07 17:50:58','',1) RETURNING "order_id" -2024-11-07 17:52:37.276 [DEBU] {c0bc1e56eaa60518d8b636474f287b58} [ 85 ms] [default] [yuledui] [rows:1 ] SELECT version(); -2024-11-07 17:52:37.295 [DEBU] {443e505beaa60518d9b636478eb5ea97} [ 17 ms] [default] [yuledui] [rows:7 ] SELECT c.relname FROM pg_class c INNER JOIN pg_namespace n ON c.relnamespace = n.oid WHERE n.nspname = 'public' AND c.relkind IN ('r', 'p') AND c.relpartbound IS NULL ORDER BY c.relname -2024-11-07 17:52:37.325 [DEBU] {5c075f5ceaa60518dab6364707d9ff5b} [ 29 ms] [default] [yuledui] [rows:18 ] SELECT a.attname AS field, t.typname AS type,a.attnotnull as null, (case when d.contype = 'p' then 'pri' when d.contype = 'u' then 'uni' else '' end) as key ,ic.column_default as default_value,b.description as comment ,coalesce(character_maximum_length, numeric_precision, -1) as length ,numeric_scale as scale FROM pg_attribute a left join pg_class c on a.attrelid = c.oid left join pg_constraint d on d.conrelid = c.oid and a.attnum = d.conkey[1] left join pg_description b ON a.attrelid=b.objoid AND a.attnum = b.objsubid left join pg_type t ON a.atttypid = t.oid left join information_schema.columns ic on ic.column_name = a.attname and ic.table_name = c.relname WHERE c.relname = 'shop' and a.attisdropped is false and a.attnum > 0 ORDER BY a.attnum -2024-11-07 17:52:37.359 [DEBU] {38482c5eeaa60518dbb636470f927796} [ 33 ms] [default] [yuledui] [rows:1 ] SELECT "shop_id","promoter_id","account_number","child_account_number","contact_name","tel","shop_name","address","door_photo","interior_photo","industry","equipment_no","extend","join_date","state","delete_flag","create_time","update_time" FROM "shop" WHERE shop_id = 'aaaaaaaaaa' LIMIT 1 -2024-11-07 17:52:37.383 [DEBU] {a84f2b60eaa60518dcb636472c93f381} [ 24 ms] [default] [yuledui] [rows:11 ] SELECT a.attname AS field, t.typname AS type,a.attnotnull as null, (case when d.contype = 'p' then 'pri' when d.contype = 'u' then 'uni' else '' end) as key ,ic.column_default as default_value,b.description as comment ,coalesce(character_maximum_length, numeric_precision, -1) as length ,numeric_scale as scale FROM pg_attribute a left join pg_class c on a.attrelid = c.oid left join pg_constraint d on d.conrelid = c.oid and a.attnum = d.conkey[1] left join pg_description b ON a.attrelid=b.objoid AND a.attnum = b.objsubid left join pg_type t ON a.atttypid = t.oid left join information_schema.columns ic on ic.column_name = a.attname and ic.table_name = c.relname WHERE c.relname = 'pay_order' and a.attisdropped is false and a.attnum > 0 ORDER BY a.attnum -2024-11-07 17:52:37.417 [DEBU] {cc299f61eaa60518ddb6364771414802} [ 33 ms] [default] [yuledui] [rows:1 ] INSERT INTO "pay_order"("order_id","price","amount","bean","open_id","mobile","shop_id","created","updated","ysepay_status","channel") VALUES('pyacyq0g4c0d5furunl8jgs200jvr6ob',65.3,65.2,0.1,'aaaaaaaaaaaaaaaaabbbbbbbb','15963264270','aaaaaaaaaa','2024-11-07 17:52:37','2024-11-07 17:52:37','',1) RETURNING "order_id" diff --git a/main.go b/main.go index 6a30e40..c99806d 100644 --- a/main.go +++ b/main.go @@ -15,7 +15,7 @@ func main() { s := g.Server() s.Use(middle.MiddlewareCORS, middle.MiddlewareHandlerResponse) payRouter := controller.Pay{} - s.Group("/wxApi", payRouter.RouterGroup) + s.Group("/api", payRouter.RouterGroup) yesPayRouter := controller.YsePay{} s.Group("/ysePay", yesPayRouter.RouterGroup) err := service.MQTTService.InitMQTT() diff --git a/service/mqtt.go b/service/mqttService.go similarity index 100% rename from service/mqtt.go rename to service/mqttService.go diff --git a/service/pay.go b/service/payservice.go similarity index 57% rename from service/pay.go rename to service/payservice.go index e5e36c0..d877646 100644 --- a/service/pay.go +++ b/service/payservice.go @@ -69,17 +69,19 @@ func (t *Pay) PayQrCode(r *ghttp.Request) { return } - commReq, err := t.ysePayRequestJson(shop, &payOrder) //组织银盛请求json + yseRespBytes, err := t.ysePayRequestJson(shop, &payOrder) //访问java项目,获取银盛返回的结果 if err != nil { r.SetError(err) return } + fmt.Println("------:", string(yseRespBytes)) - yseResp, err := t.ysePostUrl(commReq) //解析银盛应答报文 + yseResp, err := t.yseParseResp(payOrder.Channel, yseRespBytes) //解析报文返回的报文 if err != nil { r.SetError(err) return } + fmt.Println(yseResp) if yseResp.OutTradeNo != payOrder.OpenId { errStr := fmt.Sprintf("银盛返回订单号错误,银盛订单号:%s,余乐兑订单号:%s", yseResp.OutTradeNo, payOrder.OpenId) r.SetError(errors.New(errStr)) @@ -93,68 +95,33 @@ func (t *Pay) PayQrCode(r *ghttp.Request) { } return } -func (t *Pay) ysePostUrl(commReq *vo.PayCommonReq) (*vo.WeixinPayResp, error) { - jsonBytes, err := json.Marshal(commReq) - if err != nil { - return nil, err - } - jsonResp, err := common.HttpPost(common.YSEPAYURL, jsonBytes) - if err != nil { - return nil, err - } - ysePayResp := &vo.PayResp{} - err = json.Unmarshal(jsonResp, ysePayResp) - if err != nil { - return nil, err - } - yseWeiXinPayResp := &vo.WeixinPayResp{} - err = json.Unmarshal([]byte(ysePayResp.YsepayOnlineWeixinPayResponse), yseWeiXinPayResp) - if yseWeiXinPayResp.Code != "10000" { - return nil, errors.New("银盛应答返回错误:" + yseWeiXinPayResp.Msg) - } - return yseWeiXinPayResp, err -} - -/* - func (t *Pay) ysePayRequestJson(shop *po.Shop, payOrder *po.PayOrder) ([]byte, error) { - jsonMap := g.Map{} - //公共请求参数 - jsonMap["method"] = "ysepay.online.weixin.pay" //接口名称,固定值 - certId := g.Cfg().MustGet(nil, "ysepay.CERTID") - - jsonMap["partner_id"] = certId //在银盛支付开设的服务商商户号 - jsonMap["timestamp"] = time.Now().Format("2006-01-02 15:04:05") //发送请求的时间 - jsonMap["charset"] = "UTF-8" //商户网站使用的编码格式 - jsonMap["sign_type"] = "SM" //报文签名算法 - //sign 需要java项目处理 todo - notifyUrl := g.Cfg().MustGet(nil, "ysepay.notifyUrl") - jsonMap["notify_url"] = notifyUrl //交易成功异步通知到商户的后台地址 - jsonMap["version"] = "3.0" //接口版本 - - //业务请求参数 - businessMap := g.Map{} - businessMap["orderId"] = payOrder.OpenId //订单编号 - businessMap["shopdate"] = payOrder.Created.Format("20060102") //商户系统的交易发生日期格式 - businessMap["subject"] = "余乐兑小程序订单" //订单备注 - businessMap["total_amount"] = payOrder.Price //该笔订单的资金总额 - businessMap["currency"] = "CNY" //默认人民币 //订单备注 - businessMap["seller_id"] = shop.AccountNumber //商户ID - businessMap["seller_name"] = shop.ShopName //店铺名称 - businessMap["timeout_express"] = "1h" //设置未付款交易的超时时间,一个小时 - businessMap["sub_openid"] = payOrder.OpenId //微信OpenId - businessMap["is_minipg"] = "1" //微信小程序支付:1 - appId := g.Cfg().MustGet(nil, "weixin.appId") - businessMap["appid"] = appId //微信小程序APPID - b, err := json.Marshal(businessMap) +func (t *Pay) yseParseResp(channel int, respBytes []byte) (*vo.BusPayResp, error) { + yepayOnlineWeixinPayResponse := &vo.BusPayResp{} + if channel == 1 { //微信 + ysePayResp := &vo.WxPayResp{} + err := json.Unmarshal(respBytes, ysePayResp) if err != nil { return nil, err } - jsonMap["biz_content"] = string(b) - return json.Marshal(jsonMap) + fmt.Println("银盛返回的应答:", ysePayResp) + yepayOnlineWeixinPayResponse = &ysePayResp.YsepayOnlineWeixinPayResponse + } else { //支付宝 + ysePayResp := &vo.ZfbPayResp{} + err := json.Unmarshal(respBytes, ysePayResp) + if err != nil { + return nil, err + } + fmt.Println("银盛返回的应答:", ysePayResp) + yepayOnlineWeixinPayResponse = &ysePayResp.YsepayOnlineAlijsapiPayResponse + } + if yepayOnlineWeixinPayResponse.Code != "10000" { + return nil, errors.New("银盛应答返回错误:" + yepayOnlineWeixinPayResponse.Msg) + } + return yepayOnlineWeixinPayResponse, nil } -*/ -func (t *Pay) ysePayRequestJson(shop *po.Shop, payOrder *po.PayOrder) (*vo.PayCommonReq, error) { + +func (t *Pay) ysePayRequestJson(shop *po.Shop, payOrder *po.PayOrder) ([]byte, error) { //业务请求参数 busReq := vo.PayBusReq{} busReq.OutTradeNo = payOrder.OrderId //订单编号 @@ -162,7 +129,7 @@ func (t *Pay) ysePayRequestJson(shop *po.Shop, payOrder *po.PayOrder) (*vo.PayCo busReq.Subject = "余乐兑小程序订单" //订单备注 busReq.TotalAmount = fmt.Sprintf("%.2f", payOrder.Price) //该笔订单的资金总额,保留两位小数 busReq.Currency = "CNY" //默认人民币 - busReq.SellerId = shop.AccountNumber //商户ID //订单备注 + busReq.SellerId = shop.ChildAccountNumber //银盛商户ID //订单备注 busReq.SellerName = shop.ShopName //店铺名称 busReq.TimeoutExpress = "1h" //设置未付款交易的超时时间,一个小时 busReq.BusinessCode = g.Cfg().MustGet(nil, "ysepay.busCode").String() //业务代码 @@ -200,23 +167,18 @@ func (t *Pay) ysePayRequestJson(shop *po.Shop, payOrder *po.PayOrder) (*vo.PayCo commonReq.NotifyUrl = g.Cfg().MustGet(nil, "ysepay.notifyUrl").String() //交易成功异步通知到商户的后台地址 commonReq.Version = "3.0" //接口版本 - //sign 需要java项目处理 todo - commonReq.BizContent = string(bjson) // + commonReq.BizContent = string(bjson) bjson, err = json.Marshal(&commonReq) if err != nil { return nil, err } url := g.Cfg().MustGet(nil, "ysepay.url").String() - bjson, err = common.HttpPost(url, bjson) + xxx := string(bjson) + fmt.Println(xxx) + //发送给java项目,让其访问银盛接口 + bjson, err = common.HttpPost(url, "application/json", bjson) if err != nil { return nil, err } - signResp := vo.YseJavaResp{} - err = json.Unmarshal(bjson, signResp) - if err != nil { - return nil, err - } - commonReq.Sign = signResp.Sign - commonReq.BizContent = signResp.BizContent - return &commonReq, nil + return bjson, err } diff --git a/service/vo/ysePay.go b/service/vo/ysePay.go index 32f87f5..2c43691 100644 --- a/service/vo/ysePay.go +++ b/service/vo/ysePay.go @@ -15,16 +15,15 @@ type PayCommonReq struct { //银盛业务请求参数 type PayBusReq struct { - OutTradeNo string `json:"out_trade_no"` //商户系统生成的订单号 - Shopdate string `json:"shopdate"` //商户系统的交易发生日期格式yyyyMMdd 20180525 - Subject string `json:"subject"` //订单备注 - TotalAmount string `json:"total_amount"` //该笔订单的资金总额 - Currency string `json:"currency"` //默认CNY - SellerId string `json:"seller_id"` //收款商户号 - SellerName string `json:"seller_name"` //收款商户号对应商户名称 - TimeoutExpress string `json:"timeout_express"` //设置未付款交易的超时时间 - ExtraCommonParam string `json:"extra_common_param"` //公用回传参数 - BusinessCode string `json:"business_code"` //业务代码 + OutTradeNo string `json:"out_trade_no",omitempty` //商户系统生成的订单号 + Shopdate string `json:"shopdate",omitempty` //商户系统的交易发生日期格式yyyyMMdd 20180525 + Subject string `json:"subject",omitempty` //订单备注 + TotalAmount string `json:"total_amount",omitempty` //该笔订单的资金总额 + Currency string `json:"currency",omitempty` //默认CNY + SellerId string `json:"seller_id",omitempty` //收款商户号 + SellerName string `json:"seller_name",omitempty` //收款商户号对应商户名称 + TimeoutExpress string `json:"timeout_express",omitempty` //设置未付款交易的超时时间 + BusinessCode string `json:"business_code",omitempty` //业务代码 } type PayZfBusReq struct { @@ -38,12 +37,16 @@ type PayWxBusReq struct { Appid string `json:"appid"` //商户在微信侧申请的小程序或公众号APPID } -type PayResp struct { - Sign string `json:"sign"` //签名字符串 Base64编码 - YsepayOnlineWeixinPayResponse string `json:"ysepay_online_weixin_pay_response"` //业务响应参数的集合,最大长度不限 +type WxPayResp struct { + Sign string `json:"sign"` //签名字符串 Base64编码 + YsepayOnlineWeixinPayResponse BusPayResp `json:"ysepay_online_weixin_pay_response"` //业务响应参数的集合,最大长度不限 +} +type ZfbPayResp struct { + Sign string `json:"sign"` //签名字符串 Base64编码 + YsepayOnlineAlijsapiPayResponse BusPayResp `json:"ysepay_online_alijsapi_pay_response"` //业务响应参数的集合,最大长度不限 } -type WeixinPayResp struct { +type BusPayResp struct { Code string `json:"code"` //响应代码 Msg string `json:"msg"` //响应代码描述 OutTradeNo string `json:"out_trade_no"` //商户系统生成的订单号 diff --git a/service/ysepay.go b/service/ysepayservice.go similarity index 96% rename from service/ysepay.go rename to service/ysepayservice.go index e86e0e5..3197798 100644 --- a/service/ysepay.go +++ b/service/ysepayservice.go @@ -18,7 +18,7 @@ type YsePay struct { } // 银盛 异步通知余乐兑 -func (t *YsePay) NotifyWxPay(r *ghttp.Request) { +func (t *YsePay) NotifyPay(r *ghttp.Request) { g.Log().Line().Print(nil, r.Request) req := vo.NotifyPayReq{} err := r.Parse(&req)