platform notify
This commit is contained in:
90
app/Bean/Model/Wallet/Platform/WalletPlatformBean.php
Normal file
90
app/Bean/Model/Wallet/Platform/WalletPlatformBean.php
Normal file
@ -0,0 +1,90 @@
|
||||
<?php
|
||||
|
||||
namespace App\Bean\Model\Wallet\Platform;
|
||||
|
||||
use App\Bean\Model\Base\BaseBean;
|
||||
|
||||
class WalletPlatformBean extends BaseBean
|
||||
{
|
||||
|
||||
protected $id;
|
||||
protected $name;
|
||||
protected $code;
|
||||
protected $appid;
|
||||
protected $secret;
|
||||
protected $notify_ip;
|
||||
protected $created_at;
|
||||
|
||||
public function getId()
|
||||
{
|
||||
return $this->id;
|
||||
}
|
||||
|
||||
public function setId($id): void
|
||||
{
|
||||
$this->id = $id;
|
||||
}
|
||||
|
||||
public function getName()
|
||||
{
|
||||
return $this->name;
|
||||
}
|
||||
|
||||
public function setName($name): void
|
||||
{
|
||||
$this->name = $name;
|
||||
}
|
||||
|
||||
public function getCode()
|
||||
{
|
||||
return $this->code;
|
||||
}
|
||||
|
||||
public function setCode($code): void
|
||||
{
|
||||
$this->code = $code;
|
||||
}
|
||||
|
||||
public function getAppid()
|
||||
{
|
||||
return $this->appid;
|
||||
}
|
||||
|
||||
public function setAppid($appid): void
|
||||
{
|
||||
$this->appid = $appid;
|
||||
}
|
||||
|
||||
public function getSecret()
|
||||
{
|
||||
return $this->secret;
|
||||
}
|
||||
|
||||
public function setSecret($secret): void
|
||||
{
|
||||
$this->secret = $secret;
|
||||
}
|
||||
|
||||
public function getNotifyIp()
|
||||
{
|
||||
return $this->notify_ip;
|
||||
}
|
||||
|
||||
public function setNotifyIp($notify_ip): void
|
||||
{
|
||||
$this->notify_ip = $notify_ip;
|
||||
}
|
||||
|
||||
public function getCreatedAt()
|
||||
{
|
||||
return $this->created_at;
|
||||
}
|
||||
|
||||
public function setCreatedAt($created_at): void
|
||||
{
|
||||
$this->created_at = $created_at;
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
@ -5,7 +5,7 @@ use App\Bean\Model\Base\BaseBean;
|
||||
|
||||
class QueueBaseBean extends BaseBean
|
||||
{
|
||||
const TRY_LIMIT = 3;
|
||||
protected $try_limt = 3;
|
||||
protected $try_times = 0;
|
||||
|
||||
public function IncrTryTimes($num = 1): void
|
||||
@ -15,11 +15,21 @@ class QueueBaseBean extends BaseBean
|
||||
|
||||
public function checkTryTimes(): bool
|
||||
{
|
||||
if($this->try_times >= self::TRY_LIMIT) {
|
||||
if($this->try_times >= $this->try_limt) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
public function getTryTimes(): int
|
||||
{
|
||||
return $this->try_times;
|
||||
}
|
||||
|
||||
function getDelaySeconds($seconds = 30): int
|
||||
{
|
||||
return $seconds * $this->try_times;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
23
app/Bean/Service/HttpServiceConfigBean.php
Normal file
23
app/Bean/Service/HttpServiceConfigBean.php
Normal file
@ -0,0 +1,23 @@
|
||||
<?php
|
||||
namespace App\Bean\Service;
|
||||
|
||||
use App\Bean\Model\Base\BaseBean;
|
||||
|
||||
class HttpServiceConfigBean extends BaseBean
|
||||
{
|
||||
protected bool $is_return_json = true;
|
||||
|
||||
public function isIsReturnJson(): bool
|
||||
{
|
||||
return $this->is_return_json;
|
||||
}
|
||||
|
||||
public function setIsReturnJson(bool $is_return_json): void
|
||||
{
|
||||
$this->is_return_json = $is_return_json;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
66
app/Bean/Service/HttpServiceReturnLogBean.php
Normal file
66
app/Bean/Service/HttpServiceReturnLogBean.php
Normal file
@ -0,0 +1,66 @@
|
||||
<?php
|
||||
namespace App\Bean\Service;
|
||||
|
||||
use App\Bean\Model\Base\BaseBean;
|
||||
|
||||
class HttpServiceReturnLogBean extends BaseBean
|
||||
{
|
||||
protected $request_url;
|
||||
protected $request_data;
|
||||
protected $request_header;
|
||||
protected $response_body;
|
||||
protected $response_status_code;
|
||||
|
||||
public function getResponseStatusCode()
|
||||
{
|
||||
return $this->response_status_code;
|
||||
}
|
||||
|
||||
public function setResponseStatusCode($response_status_code): void
|
||||
{
|
||||
$this->response_status_code = $response_status_code;
|
||||
}
|
||||
|
||||
public function getRequestUrl()
|
||||
{
|
||||
return $this->request_url;
|
||||
}
|
||||
|
||||
public function setRequestUrl($request_url): void
|
||||
{
|
||||
$this->request_url = $request_url;
|
||||
}
|
||||
|
||||
public function getRequestData()
|
||||
{
|
||||
return $this->request_data;
|
||||
}
|
||||
|
||||
public function setRequestData($request_data): void
|
||||
{
|
||||
$this->request_data = $request_data;
|
||||
}
|
||||
|
||||
public function getRequestHeader()
|
||||
{
|
||||
return $this->request_header;
|
||||
}
|
||||
|
||||
public function setRequestHeader($request_header): void
|
||||
{
|
||||
$this->request_header = $request_header;
|
||||
}
|
||||
|
||||
public function getResponseBody()
|
||||
{
|
||||
return $this->response_body;
|
||||
}
|
||||
|
||||
public function setResponseBody($response_body): void
|
||||
{
|
||||
$this->response_body = $response_body;
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user