|
|
@@ -345,7 +345,7 @@ func QueryErmcpTradePosition(c *gin.Context) {
|
|
|
}
|
|
|
}
|
|
|
// 子账户需要从内部持仓明细(通道)表汇总计划开仓成本和开仓均价
|
|
|
- hedgeInnerHolderDetails, _ := models.GetHedgeInnerHolderDetails(int(item.Goodsid), 0)
|
|
|
+ hedgeInnerHolderDetails, _ := models.GetHedgeInnerHolderDetails(req.AccountID, int(item.Goodsid), 0)
|
|
|
for _, detail := range hedgeInnerHolderDetails {
|
|
|
// 开仓成本 = 建仓价 * 持仓数量 * 合约单位
|
|
|
item.OpenCost += detail.Openprice * float64(detail.Holderqty) * goods.Agreeunit
|
|
|
@@ -446,7 +446,7 @@ func QueryErmcpTradePosition(c *gin.Context) {
|
|
|
}
|
|
|
}
|
|
|
// 子账户需要从内部持仓明细(通道)表汇总计划开仓成本和开仓均价
|
|
|
- hedgeInnerHolderDetails, _ := models.GetHedgeInnerHolderDetails(int(item.Goodsid), 1)
|
|
|
+ hedgeInnerHolderDetails, _ := models.GetHedgeInnerHolderDetails(req.AccountID, int(item.Goodsid), 1)
|
|
|
for _, detail := range hedgeInnerHolderDetails {
|
|
|
// 开仓成本 = 建仓价 * 持仓数量 * 合约单位
|
|
|
item.OpenCost += detail.Openprice * float64(detail.Holderqty) * goods.Agreeunit
|