order

package
v0.0.0-...-54421ad Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 23, 2019 License: BSD-3-Clause Imports: 4 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FreezeUserStock

func FreezeUserStock(order_real model.Tb_order_real) error

冻结用户持股

order_real: 订单信息

func NewOrder

func NewOrder(userid int,
	trade_type int,
	stock_code,
	stock_name string,
	stock_price float64,
	stock_count int,
	contest_id int,
	amount,
	stamp_tax,
	transfer_tax,
	brokerage float64,
) (model.Tb_order_real, error)

**

userid: 用户id
trade_type: 交易类型
stockc_code: 股票代码
stock_name:股票名
stock_price:委托价
stock_count:委托量(股)
amount: 总金额
stamp_tax:印花税
transfer_tax:过户费
brokerage:交易佣金

添加一条新的订单记录。 在数据库中将产生两个recode, Tb_order 存储的记录不会被更改

Tb_order_real 存储的记录会在每次的部分成交中修改其 数量,这个记录也是定序系统(sequence)中排序依据,存储依据。

func SetOederStatusFinished

func SetOederStatusFinished(id int)

设置订单状态完成

func SetOederStatusRevoke

func SetOederStatusRevoke(id int)

设置订单状态撤销

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL