|
|
@@ -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
|
|
|
}
|