فهرست منبع

海商查询“我的商品”信息接口增加字段

zhou.xiaoning 5 سال پیش
والد
کامیت
528f98dc84
5فایلهای تغییر یافته به همراه27 افزوده شده و 1 حذف شده
  1. 4 0
      docs/docs.go
  2. 4 0
      docs/swagger.json
  3. 3 0
      docs/swagger.yaml
  4. 14 0
      models/goods.go
  5. 2 1
      models/hsby.go

+ 4 - 0
docs/docs.go

@@ -4616,6 +4616,10 @@ var doc = `{
                     "description": "商品名称",
                     "type": "string"
                 },
+                "goodsstatus": {
+                    "description": "商品状态- 1:待审核 2:未上市 3:上市 4:已注销 5:审核拒绝 6:退市 7:待退市",
+                    "type": "integer"
+                },
                 "picurls": {
                     "description": "介绍图片[多张用逗号分隔]",
                     "type": "string"

+ 4 - 0
docs/swagger.json

@@ -4600,6 +4600,10 @@
                     "description": "商品名称",
                     "type": "string"
                 },
+                "goodsstatus": {
+                    "description": "商品状态- 1:待审核 2:未上市 3:上市 4:已注销 5:审核拒绝 6:退市 7:待退市",
+                    "type": "integer"
+                },
                 "picurls": {
                     "description": "介绍图片[多张用逗号分隔]",
                     "type": "string"

+ 3 - 0
docs/swagger.yaml

@@ -1461,6 +1461,9 @@ definitions:
       goodsname:
         description: 商品名称
         type: string
+      goodsstatus:
+        description: 商品状态- 1:待审核 2:未上市 3:上市 4:已注销 5:审核拒绝 6:退市 7:待退市
+        type: integer
       picurls:
         description: 介绍图片[多张用逗号分隔]
         type: string

+ 14 - 0
models/goods.go

@@ -60,6 +60,20 @@ func (Goods) TableName() string {
 	return "GOODS"
 }
 
+// Cptradebuylimitedconfig 产能预售商品购买限制表
+type Cptradebuylimitedconfig struct {
+	Goodsid    int64     `json:"goodsid"  xorm:"'GOODSID'" binding:"required"`     // 商品ID
+	Accountid  int64     `json:"accountid"  xorm:"'ACCOUNTID'" binding:"required"` // 账户ID
+	Buymaxqty  int64     `json:"buymaxqty"  xorm:"'BUYMAXQTY'"`                    // 限制上限
+	Creatorid  int64     `json:"creatorid"  xorm:"'CREATORID'"`                    // 创建人
+	Createtime time.Time `json:"createtime"  xorm:"'CREATETIME'"`                  // 创建时间
+}
+
+// TableName is CPTRADE_BUYLIMITEDCONFIG
+func (Cptradebuylimitedconfig) TableName() string {
+	return "CPTRADE_BUYLIMITEDCONFIG"
+}
+
 // GetGoodsByGoodsCode 通过商品代码获取商品信息
 // 参数 goodsCode string 商品代码
 // 返回值 *Goods 商品信息

+ 2 - 1
models/hsby.go

@@ -479,6 +479,7 @@ type HsbyMyGoods struct {
 	Goodsname    string  `json:"goodsname"  xorm:"'GOODSNAME'" binding:"required"` // 商品名称
 	Decimalplace int64   `json:"decimalplace"  xorm:"'DECIMALPLACE'"`              // 报价小数位
 	Agreeunit    float64 `json:"agreeunit"  xorm:"'AGREEUNIT'"`                    // 合约单位
+	Goodsstatus  int64   `json:"goodsstatus"  xorm:"'GOODSSTATUS'"`                // 商品状态- 1:待审核 2:未上市 3:上市 4:已注销 5:审核拒绝 6:退市 7:待退市
 
 	Picurls string `json:"picurls"  xorm:"'PICURLS'"` // 介绍图片[多张用逗号分隔]
 
@@ -498,7 +499,7 @@ func GetHsbyMyGoods(accountIDs string) ([]HsbyMyGoods, error) {
 	// 此定制版本,只查询出当前手数(期末)大于0的数据 (TRADEPOSITION.BUYCURPOSITIONQTY > 0)
 	if err := engine.Table("TRADEPOSITION").
 		Select(`TRADEPOSITION.*, (TRADEPOSITION.BUYCURPOSITIONQTY - TRADEPOSITION.BUYFROZENQTY - TRADEPOSITION.BUYOTHERFROZENQTY) ENABLEQTY, 
-				GOODS.GOODSCODE, GOODS.GOODSNAME, GOODS.DECIMALPLACE, GOODS.AGREEUNIT, 
+				GOODS.GOODSCODE, GOODS.GOODSNAME, GOODS.DECIMALPLACE, GOODS.AGREEUNIT, GOODS.GOODSSTATUS, 
 				HSBY_GOODSEX.PICURLS, 
 				ENUMDICITEM.PARAM2 CURRENCYSIGN`).
 		Join("LEFT", "GOODS", "GOODS.GOODSID = TRADEPOSITION.GOODSID").