|
|
@@ -324,8 +324,9 @@ type QueryHedgeOrderDetailRsp struct {
|
|
|
Channelinnerorderstatus int32 `json:"channelinnerorderstatus"` // 委托状态 - 1:委托请求 2:冻结成功 3:委托失败 4:委托部成部失败 5:委托成功 6:全部撤销 7:部成部撤 8:部成部撤部失败 9:全部成交
|
|
|
Curexchangerate float64 `json:"curexchangerate"` // 当前汇率
|
|
|
|
|
|
- Goodscode string `json:"goodscode"` // 商品代码(内部)
|
|
|
- Goodsname string `json:"goodsname"` // 商品名称
|
|
|
+ Goodscode string `json:"goodscode"` // 商品代码(内部)
|
|
|
+ Goodsname string `json:"goodsname"` // 商品名称
|
|
|
+ DECIMALPLACE uint `json:"DECIMALPLACE" xorm:"'DECIMALPLACE'"` // 商品报价小数位
|
|
|
|
|
|
Exchangefullname string `json:"exchangefullname" xorm:"'EXCHANGEFULLNAME'"` // 外部交易所全称
|
|
|
|
|
|
@@ -396,6 +397,7 @@ func GetHedgeInnerOrderDetails(accountID int) ([]QueryHedgeOrderDetailRsp, error
|
|
|
Orderidstr string `xorm:"ORDERIDSTR"`
|
|
|
Goodscode string `xorm:"GOODSCODE"`
|
|
|
Goodsname string `xorm:"GOODSNAME"`
|
|
|
+ DECIMALPLACE uint `json:"DECIMALPLACE" xorm:"'DECIMALPLACE'"` // 商品报价小数位
|
|
|
Exchangefullname string `xorm:"'EXCHANGEFULLNAME'"`
|
|
|
|
|
|
OrderLoginCode string `json:"orderlogincode" xorm:"ORDERLOGINCODE"` // 委托人
|
|
|
@@ -404,7 +406,7 @@ func GetHedgeInnerOrderDetails(accountID int) ([]QueryHedgeOrderDetailRsp, error
|
|
|
|
|
|
hedgeInnerOrderDetails := make([]orderDetail, 0)
|
|
|
if err := db.GetEngine().Table("HEDGE_INNERORDERDETAIL T").
|
|
|
- Select(`to_char(T.ORDERID) ORDERIDSTR, G.GOODSCODE, G.GOODSNAME, T.*, EX.EXCHANGEFULLNAME,
|
|
|
+ Select(`to_char(T.ORDERID) ORDERIDSTR, G.GOODSCODE, G.GOODSNAME, G.DECIMALPLACE,T.*, EX.EXCHANGEFULLNAME,
|
|
|
L1.LOGINCODE ORDERLOGINCODE, L2.LOGINCODE CANCELLOGINCODE`).
|
|
|
Join("LEFT", "GOODS G", "G.GOODSID = T.GOODSID").
|
|
|
Join("LEFT", "GOODSGROUP GG", "GG.GOODSGROUPID = G.GOODSGROUPID").
|
|
|
@@ -446,6 +448,7 @@ func GetHedgeInnerOrderDetails(accountID int) ([]QueryHedgeOrderDetailRsp, error
|
|
|
Curexchangerate: v.Curexchangerate,
|
|
|
Goodscode: v.Goodscode,
|
|
|
Goodsname: v.Goodsname,
|
|
|
+ DECIMALPLACE: v.DECIMALPLACE,
|
|
|
Exchangefullname: v.Exchangefullname,
|
|
|
OrderLoginCode: v.OrderLoginCode,
|
|
|
CancelLoginCode: v.CancelLoginCode,
|
|
|
@@ -518,6 +521,7 @@ func GetHisHedgeInnerOrderDetails(accountID int, startDate, endDate string) ([]Q
|
|
|
Orderidstr string `xorm:"ORDERIDSTR"`
|
|
|
Goodscode string `xorm:"GOODSCODE"`
|
|
|
Goodsname string `xorm:"GOODSNAME"`
|
|
|
+ DECIMALPLACE uint `json:"DECIMALPLACE" xorm:"'DECIMALPLACE'"` // 商品报价小数位
|
|
|
Exchangefullname string `xorm:"'EXCHANGEFULLNAME'"`
|
|
|
|
|
|
OrderLoginCode string `json:"orderlogincode" xorm:"ORDERLOGINCODE"` // 委托人
|
|
|
@@ -526,7 +530,7 @@ func GetHisHedgeInnerOrderDetails(accountID int, startDate, endDate string) ([]Q
|
|
|
|
|
|
hedgeInnerOrderDetails := make([]orderDetail, 0)
|
|
|
session := db.GetEngine().Table("HIS_HEDGE_INNERORDERDETAIL T").
|
|
|
- Select(`to_char(T.ORDERID) ORDERIDSTR, G.GOODSCODE, G.GOODSNAME, T.*, EX.EXCHANGEFULLNAME,
|
|
|
+ Select(`to_char(T.ORDERID) ORDERIDSTR, G.GOODSCODE, G.GOODSNAME, G.DECIMALPLACE, T.*, EX.EXCHANGEFULLNAME,
|
|
|
L1.LOGINCODE ORDERLOGINCODE, L2.LOGINCODE CANCELLOGINCODE`).
|
|
|
Join("LEFT", "GOODS G", "G.GOODSID = T.GOODSID").
|
|
|
Join("LEFT", "GOODSGROUP GG", "GG.GOODSGROUPID = G.GOODSGROUPID").
|
|
|
@@ -574,6 +578,7 @@ func GetHisHedgeInnerOrderDetails(accountID int, startDate, endDate string) ([]Q
|
|
|
Curexchangerate: v.Curexchangerate,
|
|
|
Goodscode: v.Goodscode,
|
|
|
Goodsname: v.Goodsname,
|
|
|
+ DECIMALPLACE: v.DECIMALPLACE,
|
|
|
Exchangefullname: v.Exchangefullname,
|
|
|
OrderLoginCode: v.OrderLoginCode,
|
|
|
CancelLoginCode: v.CancelLoginCode,
|
|
|
@@ -625,6 +630,7 @@ func GetHedgeOutOrderDetails(accountID int) ([]QueryHedgeOrderDetailRsp, error)
|
|
|
Orderidstr string `xorm:"ORDERIDSTR"`
|
|
|
Goodscode string `xorm:"GOODSCODE"`
|
|
|
Goodsname string `xorm:"GOODSNAME"`
|
|
|
+ DECIMALPLACE uint `json:"DECIMALPLACE" xorm:"'DECIMALPLACE'"` // 商品报价小数位
|
|
|
Exchangefullname string `xorm:"'EXCHANGEFULLNAME'"`
|
|
|
|
|
|
OrderLoginCode string `json:"orderlogincode" xorm:"ORDERLOGINCODE"` // 委托人
|
|
|
@@ -633,7 +639,7 @@ func GetHedgeOutOrderDetails(accountID int) ([]QueryHedgeOrderDetailRsp, error)
|
|
|
|
|
|
hedgeOutOrderDetails := make([]orderDetail, 0)
|
|
|
if err := db.GetEngine().Table("HEDGE_OUTORDERDETAIL T").
|
|
|
- Select(`to_char(T.OUTORDERID) ORDERIDSTR, G.GOODSCODE, G.GOODSNAME, T.*, EX.EXCHANGEFULLNAME,
|
|
|
+ Select(`to_char(T.OUTORDERID) ORDERIDSTR, G.GOODSCODE, G.GOODSNAME, G.DECIMALPLACE, T.*, EX.EXCHANGEFULLNAME,
|
|
|
L1.LOGINCODE ORDERLOGINCODE, L2.LOGINCODE CANCELLOGINCODE`).
|
|
|
Join("LEFT", "GOODS G", "G.GOODSID = T.HEDGEGOODSID").
|
|
|
Join("LEFT", "GOODSGROUP GG", "GG.GOODSGROUPID = G.GOODSGROUPID").
|
|
|
@@ -687,6 +693,7 @@ func GetHedgeOutOrderDetails(accountID int) ([]QueryHedgeOrderDetailRsp, error)
|
|
|
Curexchangerate: 1,
|
|
|
Goodscode: v.Goodscode,
|
|
|
Goodsname: v.Goodsname,
|
|
|
+ DECIMALPLACE: v.DECIMALPLACE,
|
|
|
Exchangefullname: v.Exchangefullname,
|
|
|
OrderLoginCode: v.OrderLoginCode,
|
|
|
CancelLoginCode: v.CancelLoginCode,
|
|
|
@@ -735,9 +742,11 @@ func GetHisHedgeOutOrderDetails(accountID int, startDate, endDate string) ([]Que
|
|
|
Clienttype int32 `json:"clienttype" xorm:"'CLIENTTYPE'"` // 客户端类型 - 0:保留为未填终端类型 1:PC管理端 2:PC交易端 3:手机客户端_安卓 4:网页客户端 5:微信客户端 6:手机客户端_苹果 7:网上开户客户端 8:无效终端编号 9:报价终端(中江) 10;监控终端
|
|
|
Sessionid int64 `json:"sessionid" xorm:"'SESSIONID'"` // 会话ID
|
|
|
|
|
|
- Orderidstr string `xorm:"ORDERIDSTR"`
|
|
|
- Goodscode string `xorm:"GOODSCODE"`
|
|
|
- Goodsname string `xorm:"GOODSNAME"`
|
|
|
+ Orderidstr string `xorm:"ORDERIDSTR"`
|
|
|
+ Goodscode string `xorm:"GOODSCODE"`
|
|
|
+ Goodsname string `xorm:"GOODSNAME"`
|
|
|
+ DECIMALPLACE uint `json:"DECIMALPLACE" xorm:"'DECIMALPLACE'"` // 商品报价小数位
|
|
|
+
|
|
|
Exchangefullname string `xorm:"'EXCHANGEFULLNAME'"`
|
|
|
|
|
|
OrderLoginCode string `json:"orderlogincode" xorm:"ORDERLOGINCODE"` // 委托人
|
|
|
@@ -746,7 +755,7 @@ func GetHisHedgeOutOrderDetails(accountID int, startDate, endDate string) ([]Que
|
|
|
|
|
|
hedgeOutOrderDetails := make([]orderDetail, 0)
|
|
|
session := db.GetEngine().Table("HIS_HEDGE_OUTORDERDETAIL T").
|
|
|
- Select(`to_char(T.OUTORDERID) ORDERIDSTR, G.GOODSCODE, G.GOODSNAME, T.*, EX.EXCHANGEFULLNAME,
|
|
|
+ Select(`to_char(T.OUTORDERID) ORDERIDSTR, G.GOODSCODE, G.GOODSNAME, G.DECIMALPLACE,T.*, EX.EXCHANGEFULLNAME,
|
|
|
L1.LOGINCODE ORDERLOGINCODE, L2.LOGINCODE CANCELLOGINCODE`).
|
|
|
Join("LEFT", "GOODS G", "G.GOODSID = T.HEDGEGOODSID").
|
|
|
Join("LEFT", "GOODSGROUP GG", "GG.GOODSGROUPID = G.GOODSGROUPID").
|
|
|
@@ -806,6 +815,7 @@ func GetHisHedgeOutOrderDetails(accountID int, startDate, endDate string) ([]Que
|
|
|
Curexchangerate: 1,
|
|
|
Goodscode: v.Goodscode,
|
|
|
Goodsname: v.Goodsname,
|
|
|
+ DECIMALPLACE: v.DECIMALPLACE,
|
|
|
Exchangefullname: v.Exchangefullname,
|
|
|
OrderLoginCode: v.OrderLoginCode,
|
|
|
CancelLoginCode: v.CancelLoginCode,
|
|
|
@@ -841,8 +851,9 @@ type QueryHedgeTradeDetailRsp struct {
|
|
|
Closepl3 float64 `json:"closepl3"` // 平仓盈亏(账户)(逐笔)
|
|
|
Closepl4 float64 `json:"closepl4"` // 平仓盈亏(商品)(逐笔)
|
|
|
|
|
|
- Goodscode string `json:"goodscode"` // 商品代码(内部)
|
|
|
- Goodsname string `json:"goodsname"` // 商品名称
|
|
|
+ Goodscode string `json:"goodscode"` // 商品代码(内部)
|
|
|
+ Goodsname string `json:"goodsname"` // 商品名称
|
|
|
+ DECIMALPLACE uint `json:"DECIMALPLACE" xorm:"'DECIMALPLACE'"` // 商品报价小数位
|
|
|
|
|
|
Exchangefullname string `json:"exchangefullname"` // 外部交易所全称
|
|
|
|
|
|
@@ -898,6 +909,7 @@ func GetHedgeInnerTradeDetails(accountID, goodsID, buyOrSell, orderID int) ([]Qu
|
|
|
Orderidstr string `xorm:"ORDERIDSTR"`
|
|
|
Goodscode string `xorm:"GOODSCODE"`
|
|
|
Goodsname string `xorm:"GOODSNAME"`
|
|
|
+ DECIMALPLACE uint `json:"DECIMALPLACE" xorm:"'DECIMALPLACE'"` // 商品报价小数位
|
|
|
Exchangefullname string `xorm:"'EXCHANGEFULLNAME'"`
|
|
|
|
|
|
OrderLoginCode string `json:"orderlogincode" xorm:"ORDERLOGINCODE"` // 委托人
|
|
|
@@ -905,7 +917,7 @@ func GetHedgeInnerTradeDetails(accountID, goodsID, buyOrSell, orderID int) ([]Qu
|
|
|
|
|
|
tradeDetails := make([]tradeDetail, 0)
|
|
|
session := db.GetEngine().Table("HEDGE_INNERTRADEDETAIL T").
|
|
|
- Select(`to_char(T.TRADEID) TRADEIDSTR, to_char(T.ORDERID) ORDERIDSTR, G.GOODSCODE, G.GOODSNAME, T.*, EX.EXCHANGEFULLNAME,
|
|
|
+ Select(`to_char(T.TRADEID) TRADEIDSTR, to_char(T.ORDERID) ORDERIDSTR, G.GOODSCODE, G.GOODSNAME, G.DECIMALPLACE,T.*, EX.EXCHANGEFULLNAME,
|
|
|
L1.LOGINCODE ORDERLOGINCODE`).
|
|
|
Join("LEFT", "GOODS G", "G.GOODSID = T.GOODSID").
|
|
|
Join("LEFT", "GOODSGROUP GG", "GG.GOODSGROUPID = G.GOODSGROUPID").
|
|
|
@@ -951,6 +963,7 @@ func GetHedgeInnerTradeDetails(accountID, goodsID, buyOrSell, orderID int) ([]Qu
|
|
|
Closecharge2: v.Closecharge2,
|
|
|
Goodscode: v.Goodscode,
|
|
|
Goodsname: v.Goodsname,
|
|
|
+ DECIMALPLACE: v.DECIMALPLACE,
|
|
|
Exchangefullname: v.Exchangefullname,
|
|
|
OrderLoginCode: v.OrderLoginCode,
|
|
|
Closepl: v.Closepl,
|
|
|
@@ -1107,6 +1120,7 @@ func GetHedgeOutTradeDetails(accountID, goodsID, buyOrSell, orderID int) ([]Quer
|
|
|
Orderidstr string `xorm:"ORDERIDSTR"`
|
|
|
Goodscode string `xorm:"GOODSCODE"`
|
|
|
Goodsname string `xorm:"GOODSNAME"`
|
|
|
+ DECIMALPLACE uint `json:"DECIMALPLACE" xorm:"'DECIMALPLACE'"` // 商品报价小数位
|
|
|
Exchangefullname string `xorm:"'EXCHANGEFULLNAME'"`
|
|
|
|
|
|
Tradeamount float64 `xorm:"TRADEAMOUNT"` // 成交金额
|
|
|
@@ -1116,7 +1130,7 @@ func GetHedgeOutTradeDetails(accountID, goodsID, buyOrSell, orderID int) ([]Quer
|
|
|
|
|
|
tradeDetails := make([]tradeDetail, 0)
|
|
|
session := db.GetEngine().Table("HEDGE_OUTTRADEDETAIL T").
|
|
|
- Select(`to_char(T.OUTTRADEID) OUTTRADEIDSTR, to_char(T.RELATEDOUTORDERID) RELATEDOUTORDERIDSTR, G.GOODSCODE, G.GOODSNAME, T.*, EX.EXCHANGEFULLNAME,
|
|
|
+ Select(`to_char(T.OUTTRADEID) OUTTRADEIDSTR, to_char(T.RELATEDOUTORDERID) RELATEDOUTORDERIDSTR, G.GOODSCODE, G.GOODSNAME, G.DECIMALPLACE,T.*, EX.EXCHANGEFULLNAME,
|
|
|
(T.TRADEPRICE * T.TRADEQTY * G.AGREEUNIT) TRADEAMOUNT,
|
|
|
L1.LOGINCODE ORDERLOGINCODE`).
|
|
|
Join("LEFT", "GOODS G", "G.GOODSID = T.HEDGEGOODSID").
|
|
|
@@ -1163,6 +1177,7 @@ func GetHedgeOutTradeDetails(accountID, goodsID, buyOrSell, orderID int) ([]Quer
|
|
|
Closecharge2: 0,
|
|
|
Goodscode: v.Goodscode,
|
|
|
Goodsname: v.Goodsname,
|
|
|
+ DECIMALPLACE: v.DECIMALPLACE,
|
|
|
Exchangefullname: v.Exchangefullname,
|
|
|
OrderLoginCode: v.OrderLoginCode,
|
|
|
})
|