|
|
@@ -77,7 +77,7 @@ type TjmdTradeOrderDetail struct {
|
|
|
BUYORSELL int32 `json:"buyorsell" xorm:"'BUYORSELL'" form:"buyorsell"` // 买卖方向 0-买 1-卖
|
|
|
ORDERPRICE SFLOAT64 `json:"orderprice" xorm:"'ORDERPRICE'"` // 委托价格
|
|
|
ORDERQTY int64 `json:"orderqty" xorm:"'ORDERQTY'"` // 委托数量
|
|
|
- USERID int64 `json:"userid" xorm:"'USERID'"` // 用户id
|
|
|
+ USERID int64 `json:"userid" xorm:"'USERID'" form:"userid"` // 用户id
|
|
|
USERNAME string `json:"username" xorm:"'USERNAME'"` // 用户名称(已脱敏)
|
|
|
PRICEMODE int32 `json:"pricemode" xorm:"'PRICEMODE'"` // 取价方式 - 1:市价 2: 限价 3:浮动价
|
|
|
MARKETMAXSUB float64 `json:"marketmaxsub" xorm:"'MARKETMAXSUB'"` // 市价最大偏移范围 [浮动价 - 点差]
|
|
|
@@ -112,10 +112,10 @@ select to_char(t.orderid) orderid,
|
|
|
left join goods g on t.goodsid=g.goodsid
|
|
|
where 1 = 1
|
|
|
and t.orderstatus in (3, 7)
|
|
|
- and u.usertype = decode(%v,2,5,2)
|
|
|
+ and (u.usertype = decode(%v,2,5,2) or u.userid = %v)
|
|
|
`
|
|
|
- // 投资者只能看到会员的单, 会员只能看到投资者的单, decode(%v,2,5,-1)
|
|
|
- sqlId.FormatParam(r.USERTYPE)
|
|
|
+ // 投资者只能看到会员的单, 会员只能看到投资者的单, decode(%v,2,5,-1); or u.userid=r.userid 则为自己的挂单可见
|
|
|
+ sqlId.FormatParam(r.USERTYPE, r.USERID)
|
|
|
sqlId.And("t.GOODSID", r.GOODSID)
|
|
|
sqlId.And("t.BUYORSELL", r.BUYORSELL)
|
|
|
sqlId.JoinEx(r.FtMarketIds != "", fmt.Sprintf(" and g.marketid in(%v)", r.FtMarketIds))
|