1
This commit is contained in:
parent
32c068beb8
commit
db9cfb4586
51
webapp/models/FirstTopup.php
Normal file
51
webapp/models/FirstTopup.php
Normal file
@ -0,0 +1,51 @@
|
|||||||
|
<?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
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user