diff --git a/webapp/models/FirstTopup.php b/webapp/models/FirstTopup.php new file mode 100644 index 00000000..0ef9245b --- /dev/null +++ b/webapp/models/FirstTopup.php @@ -0,0 +1,51 @@ +_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 + ); + } + +}