game2006api/webapp/models/FirstTopup.php
aozhiwei db9cfb4586 1
2023-08-02 17:46:28 +08:00

52 lines
1.1 KiB
PHP

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