|
|
@@ -151,7 +151,9 @@ type HsbyListingGoodsDetail struct {
|
|
|
Vendorphone string `json:"vendorphone" xorm:"'VENDORPHONE'"` // 供应商客服电话
|
|
|
Vendorattr string `json:"vendorattr" xorm:"'VENDORATTR'"` // 供应商附件(多张,逗号分隔)
|
|
|
|
|
|
- Last float64 `json:"last" xorm:"-"` // 现价
|
|
|
+ Last float64 `json:"last" xorm:"-"` // 现价
|
|
|
+ Limitup float64 `json:"limitup" xorm:"-"` // 涨停价
|
|
|
+ Limitdown float64 `json:"limitdown" xorm:"-"` // 跌停价
|
|
|
}
|
|
|
|
|
|
// GetHsbyListingGoodsDetail 获取二级市场(挂牌点选)商品信息详情
|
|
|
@@ -182,7 +184,7 @@ func GetHsbyListingGoodsDetail(goodsID int) (*HsbyListingGoodsDetail, error) {
|
|
|
}
|
|
|
hsbyListingGoodsDetail := details[0]
|
|
|
|
|
|
- // 获取商品现价
|
|
|
+ // 获取商品现价和涨跌停价
|
|
|
quoteDays, err := GetQuoteDays(hsbyListingGoodsDetail.Goodscode)
|
|
|
if err != nil {
|
|
|
return nil, err
|
|
|
@@ -191,6 +193,12 @@ func GetHsbyListingGoodsDetail(goodsID int) (*HsbyListingGoodsDetail, error) {
|
|
|
if quoteDays[0].Last != 0 {
|
|
|
hsbyListingGoodsDetail.Last = utils.IntToFloat64(int(quoteDays[0].Last), int(hsbyListingGoodsDetail.Decimalplace))
|
|
|
}
|
|
|
+ if quoteDays[0].Limitup != 0 {
|
|
|
+ hsbyListingGoodsDetail.Limitup = utils.IntToFloat64(int(quoteDays[0].Limitup), int(hsbyListingGoodsDetail.Decimalplace))
|
|
|
+ }
|
|
|
+ if quoteDays[0].Limitdown != 0 {
|
|
|
+ hsbyListingGoodsDetail.Limitdown = utils.IntToFloat64(int(quoteDays[0].Limitdown), int(hsbyListingGoodsDetail.Decimalplace))
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
return &hsbyListingGoodsDetail, nil
|
|
|
@@ -285,6 +293,7 @@ type HybsMyBuyOrderDetail struct {
|
|
|
Goodsid int32 `json:"goodsid" xorm:"'GOODSID'" binding:"required"` // 商品ID
|
|
|
Accountid int64 `json:"accountid" xorm:"'ACCOUNTID'" binding:"required"` // 账户ID[报价币种]
|
|
|
Buyorsell int32 `json:"buyorsell" xorm:"'BUYORSELL'" binding:"required"` // 买卖 - 0:买 1:卖
|
|
|
+ Orderprice float64 `json:"orderprice" xorm:"'ORDERPRICE'"` // 委托价格
|
|
|
Orderqty int64 `json:"orderqty" xorm:"'ORDERQTY'" binding:"required"` // 委托数量
|
|
|
Tradeqty int64 `json:"tradeqty" xorm:"'TRADEQTY'"` // 成交数量
|
|
|
Cancelqty int64 `json:"cancelqty" xorm:"'CANCELQTY'"` // 撤单数量
|
|
|
@@ -301,6 +310,8 @@ type HybsMyBuyOrderDetail struct {
|
|
|
|
|
|
Currencysign string `json:"currencysign" xorm:"'CURRENCYSIGN'"` // 货币符号
|
|
|
|
|
|
+ Vendorname string `json:"vendorname" xorm:"'VENDORNAME'"` // 供应商名称
|
|
|
+
|
|
|
MyBuyStatus int `json:"mybuystatus" xorm:"-"` // "我的订单"显示状态- 1:抢购中 2:求购中 3:已完成 4:已撤消 5:委托失败
|
|
|
}
|
|
|
|
|
|
@@ -350,11 +361,13 @@ func GetHsbyBuyMyOrderDetails(accountID, myBuyStatus int) ([]HybsMyBuyOrderDetai
|
|
|
GOODS.GOODSNAME, GOODS.DECIMALPLACE,
|
|
|
HSBY_GOODSEX.PICURLS,
|
|
|
MARKET.TRADEMODE,
|
|
|
- ENUMDICITEM.PARAM2 CURRENCYSIGN`).
|
|
|
+ ENUMDICITEM.PARAM2 CURRENCYSIGN,
|
|
|
+ HSBY_SUPPLIERINFO.VENDORNAME`).
|
|
|
Join("LEFT", "GOODS", "GOODS.GOODSID = TRADE_ORDERDETAIL.GOODSID").
|
|
|
Join("LEFT", "HSBY_GOODSEX", "HSBY_GOODSEX.GOODSID = GOODS.GOODSID").
|
|
|
Join("LEFT", "ENUMDICITEM", "GOODS.CURRENCYID = ENUMDICITEM.ENUMITEMNAME and ENUMDICITEM.ENUMDICCODE = 'currency'").
|
|
|
Join("LEFT", "MARKET", "MARKET.MARKETID = TRADE_ORDERDETAIL.MARKETID").
|
|
|
+ Join("LEFT", "HSBY_SUPPLIERINFO", "HSBY_SUPPLIERINFO.VENDORID = HSBY_GOODSEX.VENDORID").
|
|
|
Where("TRADE_ORDERDETAIL.ACCOUNTID = ?", accountID)
|
|
|
// 是否过滤市场(抢购中、求购中)
|
|
|
if marketID > 0 {
|