|
@@ -151,10 +151,23 @@ class NewSupefinaSpeiLogic extends BaseApiLogic
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
try {
|
|
try {
|
|
|
- $order = DB::connection('write')->table('agent.dbo.order')->where('order_sn', $order_sn)->first();
|
|
|
|
|
|
|
+ $order = DB::connection('write')->table('agent.dbo.order')
|
|
|
|
|
+ ->lock('with(nolock)')
|
|
|
|
|
+ ->where('order_sn', $order_sn)->first();
|
|
|
if (!$order) {
|
|
if (!$order) {
|
|
|
- Util::WriteLog('NewSupefinaSpei', 'payin order not found: ' . $order_sn);
|
|
|
|
|
- return '{"success":true}';
|
|
|
|
|
|
|
+ $order = DB::connection('write')->table('agent.dbo.order')
|
|
|
|
|
+ ->lock('with(nolock)')
|
|
|
|
|
+ ->where('payment_sn', $post['platformOrderNo'])
|
|
|
|
|
+ ->first();
|
|
|
|
|
+ if ($order) {
|
|
|
|
|
+ Util::WriteLog('NewSupefinaSpei', 'repeat call by platformOrderNo: ' . $post['platformOrderNo']);
|
|
|
|
|
+ return '{"success":true}';
|
|
|
|
|
+ }
|
|
|
|
|
+ $logic = new OrderLogic();
|
|
|
|
|
+ $amount = 100;
|
|
|
|
|
+ $logic->orderCreate($order_sn, $amount, 'NewSupefinaSpei', $order->user_id);
|
|
|
|
|
+ $order = DB::connection('write')->table('agent.dbo.order')->where('order_sn', $order_sn)
|
|
|
|
|
+ ->first();
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
if (!empty($order->pay_at) || !empty($order->finished_at)) {
|
|
if (!empty($order->pay_at) || !empty($order->finished_at)) {
|