|
|
@@ -367,15 +367,6 @@ func GetHsbyListingGoodsDetail(goodsID, accountID int) (*HsbyListingGoodsDetail,
|
|
|
// 计算手数最小变动单位,改在上层进行设置,这里暂时设置成1
|
|
|
hsbyListingGoodsDetail.LotSize = 1
|
|
|
|
|
|
- // 获取购买上限
|
|
|
- if accountID != 0 {
|
|
|
- buyMaxQty, err := GetCPTradeBuyLimit(goodsID, accountID)
|
|
|
- if err != nil {
|
|
|
- return nil, err
|
|
|
- }
|
|
|
- hsbyListingGoodsDetail.Buymaxqty = buyMaxQty
|
|
|
- }
|
|
|
-
|
|
|
return &hsbyListingGoodsDetail, nil
|
|
|
}
|
|
|
|
|
|
@@ -761,6 +752,7 @@ type HsbyPreGoodsDetail struct {
|
|
|
Refprice float64 `json:"refprice" xorm:"'REFPRICE'"` // 参考价格[一口价]
|
|
|
Presaledqty int64 `json:"presaledqty" xorm:"'PRESALEDQTY'"` // 已预售量(预售结束时更新)
|
|
|
EnableQty int64 `json:"enableqty" xorm:"ENABLEQTY"` // 剩余数量
|
|
|
+ Buymaxqty int `json:"buymaxqty" xorm:"'BUYMAXQTY'"` // 购买上限 [71] - 0为不限
|
|
|
|
|
|
Videourls string `json:"videourls" xorm:"'VIDEOURLS'"` // 介绍视频[多张用逗号分隔]
|
|
|
Picurls string `json:"picurls" xorm:"'PICURLS'"` // 介绍图片[多张用逗号分隔]
|
|
|
@@ -780,9 +772,8 @@ type HsbyPreGoodsDetail struct {
|
|
|
|
|
|
Customername string `json:"customername" xorm:"'CUSTOMERNAME'"` // 发行单位
|
|
|
|
|
|
- StepValue float64 `json:"stepvalue" xorm:"-"` // 价格最小变动单位
|
|
|
- LotSize int `json:"lotsize" xorm:"-"` // 手数最小变动单位
|
|
|
- Buymaxqty int `json:"buymaxqty" xorm:"'-'"` // 购买上限 [71] - 0为不限
|
|
|
+ StepValue float64 `json:"stepvalue" xorm:"-"` // 价格最小变动单位
|
|
|
+ LotSize int `json:"lotsize" xorm:"-"` // 手数最小变动单位
|
|
|
}
|
|
|
|
|
|
// GetHsbyPreGoodsDetail 获取一级市场(产能预售)商品信息详情
|
|
|
@@ -798,7 +789,7 @@ func GetHsbyPreGoodsDetail(goodsID, accountID int) (*HsbyPreGoodsDetail, error)
|
|
|
session := engine.Table("GOODS").
|
|
|
Select(`GOODS.*,
|
|
|
CPTRADE_PRESALEGOODSEX.RELATEDGOODSID, CPTRADE_PRESALEGOODSEX.PRESALEQTY, CPTRADE_PRESALEGOODSEX.REFPRICE,
|
|
|
- CPTRADE_PRESALEGOODSEX.PRESALEDQTY, (CPTRADE_PRESALEGOODSEX.PRESALEQTY - CPTRADE_PRESALEGOODSEX.PRESALEDQTY) ENABLEQTY,
|
|
|
+ CPTRADE_PRESALEGOODSEX.PRESALEDQTY, (CPTRADE_PRESALEGOODSEX.PRESALEQTY - CPTRADE_PRESALEGOODSEX.PRESALEDQTY) ENABLEQTY, CPTRADE_PRESALEGOODSEX.BUYMAXQTY,
|
|
|
HSBY_GOODSEX.VIDEOURLS, HSBY_GOODSEX.PICURLS, HSBY_GOODSEX.DESCPROVINCEID, HSBY_GOODSEX.Desccityid, HSBY_GOODSEX.Goodsdesc,
|
|
|
ENUMDICITEM.ENUMDICNAME CURRENCY, ENUMDICITEM.PARAM2 CURRENCYSIGN,
|
|
|
E1.ENUMDICNAME GOODUNIT,
|
|
|
@@ -1675,15 +1666,6 @@ func GetHsbyMarketGoodsDetail(orderID, accountID int) (*HsbyMarketGoodsDetail, e
|
|
|
// 最小交易手数在上层进行设置,这里暂设置为1
|
|
|
hsbyMarketGoodsDetail.LotSize = 1
|
|
|
|
|
|
- // 获取购买上限
|
|
|
- if accountID != 0 {
|
|
|
- buyMaxQty, err := GetCPTradeBuyLimit(int(hsbyMarketGoodsDetail.Goodsid), accountID)
|
|
|
- if err != nil {
|
|
|
- return nil, err
|
|
|
- }
|
|
|
- hsbyMarketGoodsDetail.Buymaxqty = buyMaxQty
|
|
|
- }
|
|
|
-
|
|
|
return &hsbyMarketGoodsDetail, nil
|
|
|
}
|
|
|
|