|
|
@@ -18,6 +18,7 @@ use App\Services\CreateLog;
|
|
|
use App\Util;
|
|
|
use GuzzleHttp\Client;
|
|
|
use Illuminate\Support\Facades\DB;
|
|
|
+use Illuminate\Support\Facades\Log;
|
|
|
use Illuminate\Support\Facades\Redis;
|
|
|
|
|
|
/**
|
|
|
@@ -155,16 +156,30 @@ class NewSupefinaSpeiLogic extends BaseApiLogic
|
|
|
->lock('with(nolock)')
|
|
|
->where('order_sn', $order_sn)->first();
|
|
|
if (!$order) {
|
|
|
+ $order1 = DB::connection('write')->table('agent.dbo.order')
|
|
|
+ ->lock('with(nolock)')
|
|
|
+ ->where('payment_sn', $post['platformOrderNo'])
|
|
|
+ ->first();
|
|
|
+ if ($order1) {
|
|
|
+ Util::WriteLog('NewSupefinaSpei', 'repeat call by platformOrderNo: ' . $post['platformOrderNo']);
|
|
|
+ return '{"success":true}';
|
|
|
+ }
|
|
|
$orderArr = explode('-', $order_sn);
|
|
|
if (count($orderArr) > 1) {
|
|
|
$order_sn1 = $orderArr[0];
|
|
|
- $order = DB::connection('write')->table('agent.dbo.order')
|
|
|
+ $order2 = DB::connection('write')->table('agent.dbo.order')
|
|
|
->lock('with(nolock)')
|
|
|
->where('order_sn', $order_sn1)
|
|
|
->first();
|
|
|
- if (!$order) {
|
|
|
+ if (!$order2) {
|
|
|
Util::WriteLog('NewSupefinaSpei_error', 'payin notify order not found: ' . $order_sn);
|
|
|
+ Log::error('订单无法对应用户:' . $order_sn);
|
|
|
}
|
|
|
+ $logic = new OrderLogic();
|
|
|
+ $amount = 100;
|
|
|
+ $logic->orderCreate($order_sn, $amount, 'NewSupefinaSpei', $order1->user_id);
|
|
|
+ $order = DB::connection('write')->table('agent.dbo.order')->where('order_sn', $order_sn)
|
|
|
+ ->first();
|
|
|
}
|
|
|
}
|
|
|
|