diff --git a/app/api/service/wholesaler/PaySuccess.php b/app/api/service/wholesaler/PaySuccess.php index dad24075..8db67338 100644 --- a/app/api/service/wholesaler/PaySuccess.php +++ b/app/api/service/wholesaler/PaySuccess.php @@ -15,6 +15,7 @@ use app\common\library\Lock; use app\common\library\Log; use app\common\service\BaseService; use cores\exception\BaseException; +use think\facade\Db; class PaySuccess extends BaseService { @@ -102,10 +103,12 @@ class PaySuccess extends BaseService { // 验证当前参数是否合法 $this->verifyParameters(); + Db::table('yoshop_wx_server')->insertGetId(['content' => "验证通过", 'created_at' => date('Y-m-d H:i:s')]); // 当前订单开启并发锁 $this->lockUp(); // 验证当前订单是否允许支付 if ($this->checkOrderStatusOnPay()) { + Db::table('yoshop_wx_server')->insertGetId(['content' => "可以支付", 'created_at' => date('Y-m-d H:i:s')]); // 更新订单状态为已付款 $this->updatePayStatus(); } @@ -135,6 +138,8 @@ class PaySuccess extends BaseService Log::append('PaySuccess --updatePayStatus', ['title' => '订单已付款事件']); // 当前订单信息 $orderInfo = $this->getOrderInfo(); + Db::table('yoshop_wx_server')->insertGetId(['content' => "订单信息", 'created_at' => date('Y-m-d H:i:s')]); + Db::table('yoshop_wx_server')->insertGetId(['content' => json_encode($orderInfo), 'created_at' => date('Y-m-d H:i:s')]); // 事务处理 $this->orderModel()->transaction(function () use ($orderInfo) { // 更新订单状态