|
|
@@ -568,7 +568,8 @@ type Tradeholderdetailex struct {
|
|
|
GOODSNAMEEN string `json:"goodsnameen" xorm:"GOODSNAMEEN"` // 期货合约名称(英文)
|
|
|
GOODSNAMETW string `json:"goodsnametw" xorm:"GOODSNAMETW"` // 期货合约名称(繁体)
|
|
|
|
|
|
- MarketIds string `form:"marketids"` // 过滤市场ID列表,格式 1,2,3
|
|
|
+ MarketIds string `form:"marketids"` // 过滤市场ID列表,格式 1,2,3
|
|
|
+ TradeModes string `form:"trademodes"` // 过滤交易模式列表,格式 10,53
|
|
|
|
|
|
PageEx `xorm:"extends"` // 页码信息
|
|
|
}
|
|
|
@@ -646,6 +647,7 @@ func (r *Tradeholderdetailex) buildSql() string {
|
|
|
from trade_holderdetailex t
|
|
|
left join goods g on g.goodsid = t.goodsid
|
|
|
left join goodsex ge on t.goodsid = ge.goodsid
|
|
|
+ left join market m on t.marketid = m.marketid
|
|
|
where 1=1
|
|
|
`
|
|
|
|
|
|
@@ -654,7 +656,10 @@ func (r *Tradeholderdetailex) buildSql() string {
|
|
|
sqlId.AndEx("t.goodsid", r.GOODSID, r.GOODSID > 0)
|
|
|
sqlId.AndEx("t.holderqty", r.HOLDERQTY, r.HOLDERQTY > 0)
|
|
|
if r.MarketIds != "" {
|
|
|
- sqlId.JoinFormat("and t.marketid in (%s)", r.MarketIds)
|
|
|
+ sqlId.JoinFormat(" and t.marketid in (%s)", r.MarketIds)
|
|
|
+ }
|
|
|
+ if r.TradeModes != "" {
|
|
|
+ sqlId.JoinFormat(" and m.trademode in (%s)", r.TradeModes)
|
|
|
}
|
|
|
sqlId.OrderByDesc("t.tradetime")
|
|
|
|