showInfo调整
This commit is contained in:
parent
5ea62229f4
commit
6146f07e6d
|
@ -5,9 +5,20 @@ namespace App\ServicePay\TransCard;
|
|||
abstract class BaseCard
|
||||
{
|
||||
protected $msg=null;
|
||||
protected $orderInfo = [];
|
||||
abstract public function message($msg);
|
||||
|
||||
abstract public function showInfo();
|
||||
public function showInfo(): array
|
||||
{
|
||||
$init = [
|
||||
'from_card' => null,
|
||||
'pay_money' => null,
|
||||
'remark' => null,
|
||||
'order_number' => null,
|
||||
];
|
||||
|
||||
return array_merge($init, $this->orderInfo);
|
||||
}
|
||||
|
||||
abstract public function orderInfo($requestArr);
|
||||
}
|
|
@ -6,7 +6,7 @@ use App\Models\Order;
|
|||
|
||||
class ExampleCard extends BaseCard
|
||||
{
|
||||
private $orderInfo = [];
|
||||
|
||||
|
||||
public function message($msg)
|
||||
{
|
||||
|
@ -26,17 +26,17 @@ class ExampleCard extends BaseCard
|
|||
}
|
||||
}
|
||||
|
||||
public function showInfo(): array
|
||||
{
|
||||
$init = [
|
||||
'from_card' => null,
|
||||
'pay_money' => null,
|
||||
'remark' => null,
|
||||
'order_number' => null,
|
||||
];
|
||||
|
||||
return array_merge($init, $this->orderInfo);
|
||||
}
|
||||
// public function showInfo(): array
|
||||
// {
|
||||
// $init = [
|
||||
// 'from_card' => null,
|
||||
// 'pay_money' => null,
|
||||
// 'remark' => null,
|
||||
// 'order_number' => null,
|
||||
// ];
|
||||
//
|
||||
// return array_merge($init, $this->orderInfo);
|
||||
// }
|
||||
|
||||
//获取订单信息
|
||||
public function orderInfo($requestArr)
|
||||
|
@ -47,9 +47,10 @@ class ExampleCard extends BaseCard
|
|||
$order_money = number_format($order_money, 2, ',', '');
|
||||
//查找未支付的订单
|
||||
$t = date('Y-m-d H:i:s');
|
||||
return Order::where('ewm_account', $ewm_account)
|
||||
->where('order_at', '<', $t)
|
||||
return Order::where('order_at', '<', $t)
|
||||
->where('order_money', $order_money)
|
||||
->whereIn('status', [0, 2])->first();
|
||||
->where('ewm_account', $ewm_account)
|
||||
// ->whereIn('status', [0, 2])
|
||||
->orderBy('id', 'desc')->first();
|
||||
}
|
||||
}
|
|
@ -6,7 +6,6 @@ use App\Models\Order;
|
|||
|
||||
class FeilvbinCard extends BaseCard
|
||||
{
|
||||
private $orderInfo = [];
|
||||
public function message($msg)
|
||||
{
|
||||
$this->msg = $msg;
|
||||
|
@ -22,17 +21,17 @@ class FeilvbinCard extends BaseCard
|
|||
}
|
||||
}
|
||||
|
||||
public function showInfo(): array
|
||||
{
|
||||
$init = [
|
||||
'from_card' => null,
|
||||
'pay_money' => null,
|
||||
'remark' => null,
|
||||
'order_number' => null,
|
||||
];
|
||||
|
||||
return array_merge($init, $this->orderInfo);
|
||||
}
|
||||
// public function showInfo(): array
|
||||
// {
|
||||
// $init = [
|
||||
// 'from_card' => null,
|
||||
// 'pay_money' => null,
|
||||
// 'remark' => null,
|
||||
// 'order_number' => null,
|
||||
// ];
|
||||
//
|
||||
// return array_merge($init, $this->orderInfo);
|
||||
// }
|
||||
|
||||
public function orderInfo($requestArr)
|
||||
{
|
||||
|
@ -42,9 +41,10 @@ class FeilvbinCard extends BaseCard
|
|||
$order_money = number_format($order_money, 2, ',', '');
|
||||
//查找未支付的订单
|
||||
$t = date('Y-m-d H:i:s');
|
||||
return Order::where('order_money', $order_money)
|
||||
->where('order_at', '<', $t)
|
||||
->whereRaw('substr(ewm_account,-4,4)=?',[$ewm_account])
|
||||
->whereIn('status', [0, 2])->first();
|
||||
return Order::where('order_at', '<', $t)
|
||||
->where('order_money', $order_money)
|
||||
->whereRaw('substr(ewm_account,-4,4)=?', [$ewm_account])
|
||||
// ->whereIn('status', [0, 2])
|
||||
->orderBy('id', 'desc')->first();
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue