Quellcode durchsuchen

敞口/期货头寸/期货明细只查当前表

zou.yingbin vor 4 Jahren
Ursprung
Commit
b92fd031b6
1 geänderte Dateien mit 1 neuen und 18 gelöschten Zeilen
  1. 1 18
      models/ermcpExposure.go

+ 1 - 18
models/ermcpExposure.go

@@ -761,24 +761,7 @@ func (r *ErmcpHedgePositionDetail) buildSql() string {
 		"   and ta.relateduserid = %v" +
 		"  left join goods g" +
 		"    on t.hedgegoodsid = g.goodsid" +
-		" where t.hedgegoodsid = %v" +
-		" union all " +
-		"select t.hedgegoodsid," +
-		"       t.buyorsell," +
-		"       tradeqty," +
-		"       t.channelbuildtype," +
-		"       to_char(t.tradetime, 'yyyy-mm-dd hh24:mi:ss') tradetime," +
-		"       g.goodscode," +
-		"       g.goodsname" +
-		"  from his_hedge_outtradedetail t" +
-		" inner join taaccount ta" +
-		"    on t.accountid = ta.accountid" +
-		"   and ta.ismain = 1" +
-		"   and ta.relateduserid = %v" +
-		"  left join goods g" +
-		"    on t.hedgegoodsid = g.goodsid" +
-		" where t.isvalid = 1" +
-		"   and t.hedgegoodsid = %v"
+		" where t.hedgegoodsid = %v"
 	sqlId = fmt.Sprintf(sqlId, r.AREAUSERID, r.HEDGEGOODSID, r.AREAUSERID, r.HEDGEGOODSID)
 	return sqlId
 }