game2006api/webapp/models/UserWalletRecord.php
aozhiwei 354dfb34d0 1
2022-03-28 17:44:54 +08:00

39 lines
867 B
PHP

<?php
namespace models;
use mt;
use phpcommon\SqlHelper;
class UserWalletRecord extends BaseModel {
public static function find($conn, $txHash)
{
$row = SqlHelper::ormSelectOne(
$conn,
't_user_wallet_record',
array(
'txhash' => $txHash,
)
);
return $row;
}
public static function add($conn, $txHash, $dir, $accountId, $type, $value)
{
SqlHelper::insert(
$conn,
't_user_wallet_record',
array(
'txhash' => $txHash,
'dir' => $dir,
'account_id' => $accountId,
'type' => $type,
'value' => $value,
'createtime' => myself()->_getNowTime(),
'modifytime' => myself()->_getNowTime()
));
}
}