瀏覽代碼

Merge branch 'master' of 192.168.30.132:MTP2.0/MTP20_IF

zwl 5 年之前
父節點
當前提交
1f88c99e37
共有 3 個文件被更改,包括 26 次插入0 次删除
  1. 3 0
      controllers/erms3/spotContract.go
  2. 1 0
      controllers/order/order.go
  3. 22 0
      models/account.go

+ 3 - 0
controllers/erms3/spotContract.go

@@ -0,0 +1,3 @@
+package erms3
+
+// spotContract.go 现货合同

+ 1 - 0
controllers/order/order.go

@@ -51,6 +51,7 @@ type QueryTradePositionRsp struct {
 	FreTDPosition   int64   `json:"fretdposition"  xorm:"'FRETDPOSITION'"`        // 冻结今日头寸
 	EnableQTY       int64   `json:"enableqty"  xorm:"'ENABLEQTY'"`                // 可用量
 	AveragePrice    float64 `json:"averageprice" xorm:"AVERAGEPRICE"`             // 持仓均价
+	Usedmargin      float64 `json:"usedmargin"  xorm:"'USEDMARGIN'"`              // 占用保证金[商品币种]
 }
 
 // QueryTradePosition 持仓汇总查询(合约市场)

+ 22 - 0
models/account.go

@@ -509,3 +509,25 @@ func InsertMessageBoard(userID int, message string) int {
 
 	return 0
 }
+
+// GetUsers 获取批量用户信息
+// 输入 userIDs string 目标用户ID列表,格式:1,2,3
+func GetUsers(userIDs string) ([]Userinfo, error) {
+	engine := db.GetEngine()
+
+	userInfos := make([]Userinfo, 0)
+	if err := engine.Where("USERID in (?)", userIDs).Find(&userInfos); err != nil {
+		return nil, err
+	}
+
+	return userInfos, nil
+}
+
+func GetTaAccounts(userID int) ([]Taaccount, error) {
+	engine := db.GetEngine()
+
+	taAccounts := make([]Taaccount, 0)
+	engine.Where("")
+
+	return taAccounts, nil
+}