game2006api/webapp/models/UserWalletRecord.php
aozhiwei 86055a89f9 1
2022-03-30 08:11:25 +08:00

50 lines
1.1 KiB
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()
));
}
public static function update($conn, $txHash, $fieldKv)
{
SqlHelper::update(
$conn,
't_user_wallet_record',
array(
'txhash' => $txHash,
),
$fieldKv);
}
}