Преглед на файлове

修改“获取目标登录账号当前对冲账号在线状态”返回参数

zhou.xiaoning преди 4 години
родител
ревизия
8808eec143
променени са 4 файла, в които са добавени 18 реда и са изтрити 2 реда
  1. 4 0
      docs/docs.go
  2. 4 0
      docs/swagger.json
  3. 3 0
      docs/swagger.yaml
  4. 7 2
      models/ermcpUser.go

+ 4 - 0
docs/docs.go

@@ -18425,6 +18425,10 @@ var doc = `{
                     "description": "期货公司ID",
                     "type": "integer"
                 },
+                "fcname": {
+                    "description": "期货公司名称",
+                    "type": "string"
+                },
                 "hedgeaccountcode": {
                     "description": "对冲账号ID",
                     "type": "string"

+ 4 - 0
docs/swagger.json

@@ -18409,6 +18409,10 @@
                     "description": "期货公司ID",
                     "type": "integer"
                 },
+                "fcname": {
+                    "description": "期货公司名称",
+                    "type": "string"
+                },
                 "hedgeaccountcode": {
                     "description": "对冲账号ID",
                     "type": "string"

+ 3 - 0
docs/swagger.yaml

@@ -7276,6 +7276,9 @@ definitions:
       fcid:
         description: 期货公司ID
         type: integer
+      fcname:
+        description: 期货公司名称
+        type: string
       hedgeaccountcode:
         description: 对冲账号ID
         type: string

+ 7 - 2
models/ermcpUser.go

@@ -30,11 +30,13 @@ type Hedgeoutmainconfig struct {
 	Authcode                  string `json:"authcode"  xorm:"'AUTHCODE'"`                                   // 授权码[易盛]
 	Status                    int32  `json:"status"  xorm:"'STATUS'"`                                       // 渠道账号状态 1-可买入可卖出 2-可卖出不可买入
 	Limitnumber               int64  `json:"limitnumber"  xorm:"'LIMITNUMBER'"`                             // 挂单笔数限额
-	Appid                     string `json:"appid"  xorm:"'APPID'"`                                         // AppID
+	Appid                     string `json:"appid"  xorm:"-"`                                               // AppID
 	Userproductinfo           string `json:"userproductinfo"  xorm:"'USERPRODUCTINFO'"`                     // 客户端产品信息
 	Connectflag               int32  `json:"connectflag"  xorm:"'CONNECTFLAG'"`                             // 是否联接外部交易 - 0:不连接 1:连接
 	Hedgeaccounttype          int32  `json:"hedgeaccounttype"  xorm:"'HEDGEACCOUNTTYPE'"`                   // 母账号类型 - 1-交易下单 2-跟单
 	Fcid                      int32  `json:"fcid"  xorm:"'FCID'"`                                           // 期货公司ID
+
+	Fcname string `json:"fcname" xorm:"FCNAME"` // 期货公司名称
 }
 
 // TableName is HEDGE_OUTMAINCONFIG
@@ -61,7 +63,10 @@ func (r *Hedgeoutmainconfig) GetOutAccountStatus(loginID int) ([]Hedgeoutmaincon
 			ids = append(ids, int(v.Parentaccountid))
 		}
 	}
-	if err := db.GetEngine().In("ACCOUNTID", ids).Find(&datas); err != nil {
+	if err := db.GetEngine().Table("HEDGE_OUTMAINCONFIG T").
+		Select("T.*, F.FCNAME").
+		Join("LEFT", "ERMCP_FUTURESCOMPANY F", "F.FCID = T.FCID").
+		In("T.ACCOUNTID", ids).Find(&datas); err != nil {
 		return nil, err
 	}