|
|
@@ -757,7 +757,10 @@ func (r *Ermcppatradelinkdetail) buildSql() string {
|
|
|
LEFT JOIN ERMCP_PA_TradeLink p ON p.TradeID = t.TradeID AND p.BuyorSell = t.BuyorSell
|
|
|
LEFT JOIN TAACCOUNT ta ON ta.ACCOUNTID = p.ACCOUNTID
|
|
|
LEFT JOIN USERACCOUNT u on u.userid = ta.relateduserid
|
|
|
- WHERE t.HedgeFlag = 13 AND t.SpotContractID = %v
|
|
|
+ WHERE
|
|
|
+ t.HedgeFlag = 13
|
|
|
+ AND t.SpotContractID = %v
|
|
|
+ AND t.relatedmode in (1,2) AND t.linkstatus = 1
|
|
|
ORDER BY p.TradeTime
|
|
|
`
|
|
|
sqlId.FormatParam(r.SPOTCONTRACTID)
|