Bladeren bron

完成新菜单接口

Simon Zhou 5 jaren geleden
bovenliggende
commit
670f1d1d07
3 gewijzigde bestanden met toevoegingen van 43 en 2 verwijderingen
  1. 2 2
      config/config.xml
  2. 0 0
      controllers/order/order.go
  3. 41 0
      models/orderModels.go

+ 2 - 2
config/config.xml

@@ -16,12 +16,12 @@
         <DbAddress value="192.168.31.117"/>
         <DbName    value="orcl"/>
         <DbPort    value="1521"/>
-        <DbUser    value="mtp2_test104"/>
+        <DbUser    value="mtp2_test82"/>
         <DbPwd     value="muchinfo"/>
     </DbSetting>
 
     <RedisSetting>
-        <Address   value="192.168.31.104"/>
+        <Address   value="192.168.30.182"/>
         <Port      value="5007"/>
         <Timeout   value="3"/>
         <ConnNum   value="1"/>

+ 0 - 0
controllers/order/order.go


+ 41 - 0
models/orderModels.go

@@ -0,0 +1,41 @@
+package models
+
+// Tradeposition 持仓头寸表 - 导历史
+type Tradeposition struct {
+	Accountid           uint64  `json:"accountid"  xorm:"'ACCOUNTID'" binding:"required"`   // 账号Id
+	Goodsid             uint32  `json:"goodsid"  xorm:"'GOODSID'" binding:"required"`       // 商品Id
+	Holdertype          uint32  `json:"holdertype"  xorm:"'HOLDERTYPE'" binding:"required"` // 持仓类别 - 1:单边持仓 2:双边持仓
+	Buypositionqty      uint64  `json:"buypositionqty"  xorm:"'BUYPOSITIONQTY'"`            // 买期初持仓数量
+	Buyholderamount     float64 `json:"buyholderamount"  xorm:"'BUYHOLDERAMOUNT'"`          // 买期初持仓总金额[商品币种]
+	Buycurpositionqty   uint64  `json:"buycurpositionqty"  xorm:"'BUYCURPOSITIONQTY'"`      // 买当前持仓总数量
+	Buycurholderamount  float64 `json:"buycurholderamount"  xorm:"'BUYCURHOLDERAMOUNT'"`    // 买当前持仓总金额[商品币种]
+	Buyfrozenqty        uint64  `json:"buyfrozenqty"  xorm:"'BUYFROZENQTY'"`                // 买持仓冻结数量
+	Buyotherfrozenqty   uint64  `json:"buyotherfrozenqty"  xorm:"'BUYOTHERFROZENQTY'"`      // 买持仓其他冻结数量(交割冻结)
+	Buyopenreqqty       uint64  `json:"buyopenreqqty"  xorm:"'BUYOPENREQQTY'"`              // 买开仓申请数量(用于比较最大持仓数量)
+	Buyopentotalqty     uint64  `json:"buyopentotalqty"  xorm:"'BUYOPENTOTALQTY'"`          // 买开仓总数量
+	Buyclosetotalqty    uint64  `json:"buyclosetotalqty"  xorm:"'BUYCLOSETOTALQTY'"`        // 买平仓总数量
+	Sellpositionqty     uint64  `json:"sellpositionqty"  xorm:"'SELLPOSITIONQTY'"`          // 卖期初持仓数量
+	Sellholderamount    float64 `json:"sellholderamount"  xorm:"'SELLHOLDERAMOUNT'"`        // 卖期初持仓总金额[商品币种]
+	Sellcurpositionqty  uint64  `json:"sellcurpositionqty"  xorm:"'SELLCURPOSITIONQTY'"`    // 卖当前持仓数量
+	Sellcurholderamount float64 `json:"sellcurholderamount"  xorm:"'SELLCURHOLDERAMOUNT'"`  // 卖当前持仓总金额[商品币种]
+	Sellfrozenqty       uint64  `json:"sellfrozenqty"  xorm:"'SELLFROZENQTY'"`              // 卖持仓冻结
+	Sellotherfrozenqty  uint64  `json:"sellotherfrozenqty"  xorm:"'SELLOTHERFROZENQTY'"`    // 卖持仓其他冻结(交割冻结)
+	Sellopenreqqty      uint64  `json:"sellopenreqqty"  xorm:"'SELLOPENREQQTY'"`            // 卖开仓申请数量(用于比较最大持仓数量)
+	Sellopentotalqty    uint64  `json:"sellopentotalqty"  xorm:"'SELLOPENTOTALQTY'"`        // 卖开仓总数量
+	Sellclosetotalqty   uint64  `json:"sellclosetotalqty"  xorm:"'SELLCLOSETOTALQTY'"`      // 卖平仓总数量
+	Usedmargin          float64 `json:"usedmargin"  xorm:"'USEDMARGIN'"`                    // 占用保证金[商品币种]
+	Tradeproperty       uint32  `json:"tradeproperty"  xorm:"'TRADEPROPERTY'"`              // 交易属性
+	Buytnqty            uint64  `json:"buytnqty"  xorm:"'BUYTNQTY'"`                        // 买T+N冻结总量
+	Buytnusedqty        uint64  `json:"buytnusedqty"  xorm:"'BUYTNUSEDQTY'"`                // 买T+N使用量(可以使用T+N的冻结数量)
+	Selltnqty           uint64  `json:"selltnqty"  xorm:"'SELLTNQTY'"`                      // 卖T+N冻结总量
+	Selltnusedqty       uint64  `json:"selltnusedqty"  xorm:"'SELLTNUSEDQTY'"`              // 卖T+N使用量(可以使用T+N的冻结数量)
+	Buycurtdposition    uint64  `json:"buycurtdposition"  xorm:"'BUYCURTDPOSITION'"`        // 买期末今日头寸
+	Buyfretdposition    uint64  `json:"buyfretdposition"  xorm:"'BUYFRETDPOSITION'"`        // 买冻结今日头寸
+	Sellcurtdposition   uint64  `json:"sellcurtdposition"  xorm:"'SELLCURTDPOSITION'"`      // 卖期末今日头寸
+	Sellfretdposition   uint64  `json:"sellfretdposition"  xorm:"'SELLFRETDPOSITION'"`      // 卖冻结今日头寸
+}
+
+// TableName is TRADEPOSITION
+func (Tradeposition) TableName() string {
+	return "TRADEPOSITION"
+}