This commit is contained in:
aozhiwei 2022-10-31 21:16:29 +08:00
parent 65df9e1a0c
commit 0929ee9a4d

View File

@ -0,0 +1,35 @@
<?php
namespace models;
use mt;
use phpcommon\SqlHelper;
class Transaction extends BaseModel {
public static function all()
{
$rows = SqlHelper::ormSelect(
myself()->_getSelfMysql(),
't_transaction',
array(
'account_id' => myself()->_getAccountId()
)
);
return rows;
}
public static function find($transId)
{
$row = SqlHelper::ormSelectOne(
myself()->_getMarketMysql(),
't_transaction',
array(
'account_id' => myself()->_getAccountId(),
'trans_id' => $transId,
)
);
return $row;
}
}