Quellcode durchsuchen

WrTrade2/QueryWrOutInApply 接口增加地区出参

zhou.xiaoning vor 2 Jahren
Ursprung
Commit
f1518c03d9
5 geänderte Dateien mit 111 neuen und 6 gelöschten Zeilen
  1. 6 6
      config/config.xml
  2. 32 0
      docs/docs.go
  3. 32 0
      docs/swagger.json
  4. 24 0
      docs/swagger.yaml
  5. 17 0
      models/wrTrade2.go

+ 6 - 6
config/config.xml

@@ -13,11 +13,11 @@
     <DbAddress value="192.168.31.88"/>
     <DbName value="orcl"/>
     <DbPort value="1521"/>
-    <DbUser value="mtp2_test204"/>
+    <DbUser value="mtp2_test167"/>
     <DbPwd value="muchinfo"/>
   </DbSetting>
   <RedisSetting>
-    <Address value="192.168.31.204"/>
+    <Address value="192.168.31.167"/>
     <Port value="5007"/>
     <Timeout value="3"/>
     <ConnNum value="1"/>
@@ -25,11 +25,11 @@
     <Pwd value=""/>
   </RedisSetting>
   <MqSetting>
-    <Url value="amqp://guest:guest@192.168.31.204:5020/test"/>
+    <Url value="amqp://guest:guest@192.168.31.167:5020/test"/>
     <Exchange value="entry"/>
   </MqSetting>
   <MongoDBSetting>
-    <HostName value="192.168.31.204"/>
+    <HostName value="192.168.31.167"/>
     <Port value="5025"/>
     <DBName value="HistoryQuote"/>
     <Username value="quote_test01"/>
@@ -38,8 +38,8 @@
   <MySQLSetting>
     <Host value="192.168.30.72"/>
     <Port value="3306"/>
-    <DBName value="historyquote_test204"/>
-    <Username value="quote_test204"/>
+    <DBName value="historyquote_test167"/>
+    <Username value="quote_test167"/>
     <Password value="123456"/>
   </MySQLSetting>
 </Configuration>

+ 32 - 0
docs/docs.go

@@ -54293,6 +54293,14 @@ const docTemplate = `{
                     "description": "开始交易日(yyyymmdd)",
                     "type": "string"
                 },
+                "cityid": {
+                    "description": "市",
+                    "type": "integer"
+                },
+                "cityname": {
+                    "description": "城市名称",
+                    "type": "string"
+                },
                 "contactname": {
                     "description": "联系人",
                     "type": "string"
@@ -54301,6 +54309,14 @@ const docTemplate = `{
                     "description": "联系方式",
                     "type": "string"
                 },
+                "countryid": {
+                    "description": "国家",
+                    "type": "integer"
+                },
+                "countryname": {
+                    "description": "国家名称",
+                    "type": "string"
+                },
                 "deliverygoodscode": {
                     "description": "品种代码",
                     "type": "string"
@@ -54313,6 +54329,14 @@ const docTemplate = `{
                     "description": "品种名称",
                     "type": "string"
                 },
+                "districtid": {
+                    "description": "区",
+                    "type": "integer"
+                },
+                "districtname": {
+                    "description": "地区名称",
+                    "type": "string"
+                },
                 "enddate": {
                     "description": "结束交易日(yyyymmdd)",
                     "type": "string"
@@ -54337,6 +54361,14 @@ const docTemplate = `{
                     "description": "选择项比较串【{选择项ID}+{冒号}+选择项值 } ,逗号分隔,头尾加逗号】-- 所有选择项拼接,用于比较",
                     "type": "string"
                 },
+                "provinceid": {
+                    "description": "省",
+                    "type": "integer"
+                },
+                "provincename": {
+                    "description": "省名称",
+                    "type": "string"
+                },
                 "qty": {
                     "description": "数量",
                     "type": "integer"

+ 32 - 0
docs/swagger.json

@@ -54284,6 +54284,14 @@
                     "description": "开始交易日(yyyymmdd)",
                     "type": "string"
                 },
+                "cityid": {
+                    "description": "市",
+                    "type": "integer"
+                },
+                "cityname": {
+                    "description": "城市名称",
+                    "type": "string"
+                },
                 "contactname": {
                     "description": "联系人",
                     "type": "string"
@@ -54292,6 +54300,14 @@
                     "description": "联系方式",
                     "type": "string"
                 },
+                "countryid": {
+                    "description": "国家",
+                    "type": "integer"
+                },
+                "countryname": {
+                    "description": "国家名称",
+                    "type": "string"
+                },
                 "deliverygoodscode": {
                     "description": "品种代码",
                     "type": "string"
@@ -54304,6 +54320,14 @@
                     "description": "品种名称",
                     "type": "string"
                 },
+                "districtid": {
+                    "description": "区",
+                    "type": "integer"
+                },
+                "districtname": {
+                    "description": "地区名称",
+                    "type": "string"
+                },
                 "enddate": {
                     "description": "结束交易日(yyyymmdd)",
                     "type": "string"
@@ -54328,6 +54352,14 @@
                     "description": "选择项比较串【{选择项ID}+{冒号}+选择项值 } ,逗号分隔,头尾加逗号】-- 所有选择项拼接,用于比较",
                     "type": "string"
                 },
+                "provinceid": {
+                    "description": "省",
+                    "type": "integer"
+                },
+                "provincename": {
+                    "description": "省名称",
+                    "type": "string"
+                },
                 "qty": {
                     "description": "数量",
                     "type": "integer"

+ 24 - 0
docs/swagger.yaml

@@ -24678,12 +24678,24 @@ definitions:
       begindate:
         description: 开始交易日(yyyymmdd)
         type: string
+      cityid:
+        description: 市
+        type: integer
+      cityname:
+        description: 城市名称
+        type: string
       contactname:
         description: 联系人
         type: string
       contactnum:
         description: 联系方式
         type: string
+      countryid:
+        description: 国家
+        type: integer
+      countryname:
+        description: 国家名称
+        type: string
       deliverygoodscode:
         description: 品种代码
         type: string
@@ -24693,6 +24705,12 @@ definitions:
       deliverygoodsname:
         description: 品种名称
         type: string
+      districtid:
+        description: 区
+        type: integer
+      districtname:
+        description: 地区名称
+        type: string
       enddate:
         description: 结束交易日(yyyymmdd)
         type: string
@@ -24711,6 +24729,12 @@ definitions:
       optioncompare:
         description: 选择项比较串【{选择项ID}+{冒号}+选择项值 } ,逗号分隔,头尾加逗号】-- 所有选择项拼接,用于比较
         type: string
+      provinceid:
+        description: 省
+        type: integer
+      provincename:
+        description: 省名称
+        type: string
       qty:
         description: 数量
         type: integer

+ 17 - 0
models/wrTrade2.go

@@ -2959,12 +2959,25 @@ type WrOutInApply struct {
 	CONTACTNUM              string `json:"contactnum"  xorm:"'CONTACTNUM'"`                           // 联系方式
 	ADDRESS                 string `json:"address"  xorm:"ADDRESS"`                                   // 详细地址
 	APPOINTMENTREMARK       string `json:"appointmentremark"  xorm:"'APPOINTMENTREMARK'"`             // 申请备注
+	COUNTRYID               int32  `json:"countryid" xorm:"COUNTRYID"`                                // 国家
+	PROVINCEID              int32  `json:"provinceid" xorm:"PROVINCEID"`                              // 省
+	CITYID                  int32  `json:"cityid" xorm:"CITYID"`                                      // 市
+	DISTRICTID              int32  `json:"districtid" xorm:"DISTRICTID"`                              // 区
+	COUNTRYNAME             string `json:"countryname"`                                               // 国家名称
+	CITYNAME                string `json:"cityname"`                                                  // 城市名称
+	PROVINCENAME            string `json:"provincename"`                                              // 省名称
+	DISTRICTNAME            string `json:"districtname"`                                              // 地区名称
 
 	PageEx `xorm:"extends"` // 页码信息
 }
 
 func (r *WrOutInApply) calc() {
 	r.Wr2FactorType.Calc()
+
+	r.COUNTRYNAME = mtpcache.GetDivisionName(r.COUNTRYID)
+	r.CITYNAME = mtpcache.GetDivisionName(r.CITYID)
+	r.PROVINCENAME = mtpcache.GetDivisionName(r.PROVINCEID)
+	r.DISTRICTNAME = mtpcache.GetDivisionName(r.DISTRICTID)
 }
 
 func (r *WrOutInApply) buildSql() string {
@@ -3005,6 +3018,10 @@ func (r *WrOutInApply) buildSql() string {
 		"		en1.enumdicname appointmentmodeldisplay," +
 		"		t.contactname," +
 		"		t.contactnum," +
+		" t.COUNTRYID," +
+		" t.PROVINCEID," +
+		" t.CITYID," +
+		" t.DISTRICTID," +
 		"		t.address," +
 		"		t.appointmentremark," +
 		"       k.*" +