game2006api/webapp/models/FirstTopup.php
aozhiwei 6e2d2bc88b 1
2023-08-02 17:56:16 +08:00

54 lines
1.1 KiB
PHP

<?php
namespace models;
use mt;
use phpcommon\SqlHelper;
class FirstTopup extends BaseModel {
public static function get()
{
$row = SqlHelper::ormSelectOne(
myself()->_getSelfMysql(),
't_first_topup',
array(
'account_id' => myself()->_getAccountId(),
)
);
return $row;
}
public static function add($accountId)
{
SqlHelper::upsert(
myself()->_getMysql($accountId),
't_first_topup',
array(
'account_id' => $accountId,
),
array(
),
array(
'account_id' => $accountId,
'createtime' => myself()->_getNowTime(),
'modifytime' => myself()->_getNowTime(),
)
);
}
public static function update($orderId, $fieldsKv)
{
SqlHelper::update(
myself()->_getSelfMysql(),
't_first_topup',
array(
'account_id' => myself()->_getAccountId()
),
$fieldsKv
);
}
}