Zory 1 тиждень тому
батько
коміт
f22a93c187

+ 2 - 1
app/controller/mini/Notify.php

@@ -42,7 +42,8 @@ class Notify extends Base
                     if ($resp['action'] == "pay_success") {
                         Redis::send("sync-order",[
                             "order"     => $resp['order']['order_id'],
-                            "openid"    => $param['from_user_id']
+                            "openid"    => $param['from_user_id'],
+                            "pay_time"  => $resp['order']['pay_time']
                         ]);
                     }
                     $return = [];

+ 1 - 0
app/extra/basic/Base.php

@@ -72,6 +72,7 @@ class Base
                         "groupon_type"  => $val['sku_info']['groupon_type'],
                         "certificate_id"  => $val['certificate_id']??'',
                         "status"        => 1,
+                        "pay_at"    => getDateFull(),
                         "start_time"    => date("Y-m-d H:i:s",$val['start_time']),
                     ];
                 } else {

+ 1 - 0
app/queue/redis/SyncOrder.php

@@ -49,6 +49,7 @@ class SyncOrder implements Consumer
                     "groupon_type"  => $val['sku_info']['groupon_type'],
                     "certificate_id"  => $val['certificate_id']??'',
                     "status"        => 1,
+                    "pay_at"        => date("Y-m-d H:i:s",$data['pay_time']),
                     "start_time"    => date("Y-m-d H:i:s",$val['start_time']),
                 ];
             } else {