处理条件没有处理导致的异常

This commit is contained in:
[ddwe] 2023-03-29 11:36:26 +08:00
parent 9e2a2466de
commit f24d5a6d2d
3 changed files with 8 additions and 2 deletions

View File

@ -164,7 +164,7 @@ class UsdtAddrGetList extends Command
*/
public function updateTimeoutAddr(){
$allOrder = Order::where(['pay_type'=>'1017','usdt_addr_status'=>'0'])
->where('order_at','<',date('Y-m-d H:i:s',strtotime("-20 minute")))->limit(100)->get();
->where('order_at','<',date('Y-m-d H:i:s',strtotime("-60 minute")))->limit(100)->get();
if(empty($allOrder)){
return;
}

View File

@ -128,8 +128,14 @@ class ApiOrderServices
//检查商户
$this->checkMerchant($request);
if (count(self::$errorArr) > 0) {
return $this->msg($this->errorFormat());
}
//检查签名
$this->checkSign($this->merchant, $request);
if (count(self::$errorArr) > 0) {
return $this->msg($this->errorFormat());
}
//通道检查
$this->checkGateway($request);
if (count(self::$errorArr) > 0) {

View File

@ -396,7 +396,7 @@ class UsdtWalletServices extends BasePay implements PayApiInterface
private function getUstdAddr(){
DB::beginTransaction();
$addr = UsdtAddr::where('is_checked',1)->orderby('updated_at','asc')->first();
if (!$addr){
if (!empty($addr)){
$addr['is_checked'] = 0;
$ret = $addr['addr'];
$r = $addr->save();