Browse Source

删除 QueryHisTradeDetail 接口不必要出参,提升查询效率

zhou.xiaoning 1 năm trước cách đây
mục cha
commit
09f17b44ea
2 tập tin đã thay đổi với 7 bổ sung8 xóa
  1. 6 6
      config/config.xml
  2. 1 2
      controllers/order/order.go

+ 6 - 6
config/config.xml

@@ -15,11 +15,11 @@
     <DbAddress value="192.168.31.88"/>
     <DbName value="orcl"/>
     <DbPort value="1521"/>
-    <DbUser value="mtp2_test204"/>
+    <DbUser value="mtp2_test169"/>
     <DbPwd value="muchinfo"/>
   </DbSetting>
   <RedisSetting>
-    <Address value="192.168.31.204"/>
+    <Address value="192.168.31.169"/>
     <Port value="5007"/>
     <Timeout value="3"/>
     <ConnNum value="1"/>
@@ -27,11 +27,11 @@
     <Pwd value=""/>
   </RedisSetting>
   <MqSetting>
-    <Url value="amqp://guest:guest@192.168.31.204:5020/test"/>
+    <Url value="amqp://guest:guest@192.168.31.169:5020/test"/>
     <Exchange value="entry"/>
   </MqSetting>
   <MongoDBSetting>
-    <HostName value="192.168.31.204"/>
+    <HostName value="192.168.31.169"/>
     <Port value="5025"/>
     <DBName value="HistoryQuote"/>
     <Username value="quote_test01"/>
@@ -40,8 +40,8 @@
   <MySQLSetting>
     <Host value="192.168.30.72"/>
     <Port value="3306"/>
-    <DBName value="historyquote_test204"/>
-    <Username value="quote_test204"/>
+    <DBName value="historyquote_test169"/>
+    <Username value="quote_test169"/>
     <Password value="123456"/>
   </MySQLSetting>
   <Tencent>

+ 1 - 2
controllers/order/order.go

@@ -786,12 +786,11 @@ func QueryHisTradeDetail(c *gin.Context) {
 	s := engine.Table("HIS_TRADE_TRADEDETAIL").
 		Join("LEFT", "GOODS", "GOODS.GOODSID = HIS_TRADE_TRADEDETAIL.GOODSID").
 		Join("LEFT", "MARKET", "MARKET.MARKETID = HIS_TRADE_TRADEDETAIL.MARKETID").
-		Join("LEFT", "HIS_TRADE_ORDERDETAIL", "HIS_TRADE_ORDERDETAIL.ORDERID = HIS_TRADE_TRADEDETAIL.ORDERID").
 		Join("LEFT", "TRADE_PAYORDER", "TRADE_PAYORDER.TRADEID = HIS_TRADE_TRADEDETAIL.TRADEID").
 		Select(`to_char(HIS_TRADE_TRADEDETAIL.TRADEID) as TRADEID, to_char(HIS_TRADE_TRADEDETAIL.ORDERID) as ORDERID, 
 				HIS_TRADE_TRADEDETAIL.*, CASE HIS_TRADE_TRADEDETAIL.BUILDTYPE WHEN 1 THEN HIS_TRADE_TRADEDETAIL.OPENCHARGE ELSE HIS_TRADE_TRADEDETAIL.CLOSECHARGE END as CHARGE,
 				GOODS.GOODSCODE, GOODS.GOODSNAME,GOODS.DECIMALPLACE, GOODS.QTYDECIMALPLACE, GOODS.GOODUNITID, MARKET.MARKETNAME, MARKET.TRADEMODE, 
-				HIS_TRADE_ORDERDETAIL.LISTINGSELECTTYPE, TRADE_PAYORDER.ADVANCERATIO, TRADE_PAYORDER.PAYAMOUNT, TRADE_PAYORDER.TRADECHARGE`).
+				TRADE_PAYORDER.ADVANCERATIO, TRADE_PAYORDER.PAYAMOUNT, TRADE_PAYORDER.TRADECHARGE`).
 		// Where(fmt.Sprintf("HIS_TRADE_TRADEDETAIL.ISVALIDDATA = 1 and HIS_TRADE_TRADEDETAIL.ACCOUNTID in (%s)", req.AccountID)).
 		Where("HIS_TRADE_TRADEDETAIL.ISVALIDDATA = 1").
 		In("HIS_TRADE_TRADEDETAIL.ACCOUNTID", accountIds).