Skip to content

Instantly share code, notes, and snippets.

@songjiayang
Last active December 23, 2015 21:29
Show Gist options
  • Save songjiayang/6697035 to your computer and use it in GitHub Desktop.
Save songjiayang/6697035 to your computer and use it in GitHub Desktop.

##operation modle (目前这个就处理虚拟货币算了)

txid user_id coin_currcy_id amount status category

其中status表示是否交易成功,具体有三个字段待确认,成功,失败,(un_confirm,success,faild), category表示是充值还是提现。

##如何充值

  1. users = User.all #获取所有用户
  2. un_confirmed_oprations = Operation.where(:status=>STATUS::UN_CONFIRM)
  3. all_new_transcations = Bitcoin::client::instance.list_all_transactions("",1000,Operation.count), 从当前纪录条数开始,得到往后1000条的纪录。
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment