Przeglądaj źródła

查定投价接口修改

zou.yingbin 4 lat temu
rodzic
commit
a4247d54b4
1 zmienionych plików z 6 dodań i 1 usunięć
  1. 6 1
      models/qhj.go

+ 6 - 1
models/qhj.go

@@ -1036,8 +1036,13 @@ func (r *QhjReckonPriceLog) buildSql() string {
 		"  LEFT JOIN GOODS g on t.goodsid=g.goodsid" +
 		"  INNER JOIN MARKET m on g.marketid=g.marketid" +
 		" WHERE 1 = 1 and m.marketid=69201"
-	sqlId.AndEx("t.TRADEDATE", r.TRADEDATE, len(r.TRADEDATE) > 0)
 	sqlId.AndEx("t.GOODSID", r.GOODSID, r.GOODSID > 0)
+	if r.TRADEDATE != "" {
+		sqlId.AndEx("t.TRADEDATE", r.TRADEDATE, len(r.TRADEDATE) > 0)
+	} else {
+		sqlId.JoinFormat(" and t.TRADEDATE = (select max(TRADEDATE) from RECKON_PRICELOG)")
+	}
+
 	return sqlId.String()
 }