Jelajahi Sumber

临时版本:报价牌、持仓汇总和持仓明细不显示“待退市”商品

zhou.xiaoning 1 tahun lalu
induk
melakukan
bcbea54d5a
3 mengubah file dengan 5 tambahan dan 4 penghapusan
  1. 1 1
      controllers/order/order.go
  2. 1 1
      models/ermcpGoods.go
  3. 3 2
      models/tradexx.go

+ 1 - 1
controllers/order/order.go

@@ -149,7 +149,7 @@ func GetTradePosition(accIds string, tradeModes string) (rst []QueryTradePositio
 	engine := db.GetEngine()
 	// ORACLE好像在JOIN里不支持别名功能(在XORM中)
 	s := engine.Table("TRADEPOSITION").
-		Join("LEFT", "GOODS", "TRADEPOSITION.GOODSID = GOODS.GOODSID").
+		Join("LEFT", "GOODS", "TRADEPOSITION.GOODSID = GOODS.GOODSID AND GOODS.GOODSSTATUS <> 7").
 		Join("LEFT", "GOODSEX EX", "EX.GOODSID = GOODS.GOODSID").
 		Join("LEFT", "MARKET", "GOODS.MARKETID = MARKET.MARKETID").
 		Join("LEFT", "ENUMDICITEM", "GOODS.GOODUNITID = ENUMDICITEM.ENUMITEMNAME and ENUMDICITEM.ENUMDICCODE = 'goodsunit'").

+ 1 - 1
models/ermcpGoods.go

@@ -137,7 +137,7 @@ func GetErmcpGoodses(userid int64, lastUpdateTime string, loginID int64) ([]Ermc
 		Join("LEFT", "MARKET M", "M.MARKETID = G.MARKETID").
 		Join("LEFT", "GOODSMARGINCONFIG GM", "GM.GOODSID = G.GOODSID AND GM.ISDEFAULT = 1").
 		Join("LEFT", "GOODSEX EX", "EX.GOODSID = G.GOODSID").
-		Where("G.GOODSSTATUS in (3, 7)")
+		Where("G.GOODSSTATUS in (3)")
 	if loginID != 0 {
 		session = session.In("G.MARKETID", ids)
 	}

+ 3 - 2
models/tradexx.go

@@ -252,7 +252,8 @@ with gtmp as
       on g.currencyid = e2.enumitemname
      and e2.enumdiccode = 'currency'
     left join market m
-      on g.marketid = m.marketid),
+      on g.marketid = m.marketid
+	  where g.GOODSSTATUS <> 7 ),
 utmp as
  (select ta.accountid,
          ta.accountname taname,
@@ -292,7 +293,7 @@ SELECT to_char(t.TRADEID) TRADEID,
        gtmp.*,
        utmp.*
   FROM TRADE_HOLDERDETAIL t
-  LEFT JOIN gtmp on t.goodsid=gtmp.goodsid
+  INNER JOIN gtmp on t.goodsid=gtmp.goodsid
   LEFT JOIN utmp on t.accountid=utmp.accountid
  WHERE 1 = 1 and t.HOLDERQTY > 0
 `