Kaynağa Gözat

"定制【海商报业】"相关接口增加markid返回

zhou.xiaoning 5 yıl önce
ebeveyn
işleme
b3cbcd19d7
4 değiştirilmiş dosya ile 35 ekleme ve 5 silme
  1. 12 2
      docs/docs.go
  2. 12 2
      docs/swagger.json
  3. 8 0
      docs/swagger.yaml
  4. 3 1
      models/hsby.go

+ 12 - 2
docs/docs.go

@@ -3461,7 +3461,8 @@ var doc = `{
             "required": [
                 "goodscode",
                 "goodsid",
-                "goodsname"
+                "goodsname",
+                "marketid"
             ],
             "properties": {
                 "currency": {
@@ -3508,6 +3509,10 @@ var doc = `{
                     "description": "现价",
                     "type": "number"
                 },
+                "marketid": {
+                    "description": "所属市场ID",
+                    "type": "integer"
+                },
                 "picurls": {
                     "description": "介绍图片[多张用逗号分隔]",
                     "type": "string"
@@ -3527,7 +3532,8 @@ var doc = `{
             "required": [
                 "goodscode",
                 "goodsid",
-                "goodsname"
+                "goodsname",
+                "marketid"
             ],
             "properties": {
                 "currency": {
@@ -3562,6 +3568,10 @@ var doc = `{
                     "description": "现价",
                     "type": "number"
                 },
+                "marketid": {
+                    "description": "所属市场ID",
+                    "type": "integer"
+                },
                 "picurls": {
                     "description": "介绍图片[多张用逗号分隔]",
                     "type": "string"

+ 12 - 2
docs/swagger.json

@@ -3445,7 +3445,8 @@
             "required": [
                 "goodscode",
                 "goodsid",
-                "goodsname"
+                "goodsname",
+                "marketid"
             ],
             "properties": {
                 "currency": {
@@ -3492,6 +3493,10 @@
                     "description": "现价",
                     "type": "number"
                 },
+                "marketid": {
+                    "description": "所属市场ID",
+                    "type": "integer"
+                },
                 "picurls": {
                     "description": "介绍图片[多张用逗号分隔]",
                     "type": "string"
@@ -3511,7 +3516,8 @@
             "required": [
                 "goodscode",
                 "goodsid",
-                "goodsname"
+                "goodsname",
+                "marketid"
             ],
             "properties": {
                 "currency": {
@@ -3546,6 +3552,10 @@
                     "description": "现价",
                     "type": "number"
                 },
+                "marketid": {
+                    "description": "所属市场ID",
+                    "type": "integer"
+                },
                 "picurls": {
                     "description": "介绍图片[多张用逗号分隔]",
                     "type": "string"

+ 8 - 0
docs/swagger.yaml

@@ -1255,6 +1255,9 @@ definitions:
       last:
         description: 现价
         type: number
+      marketid:
+        description: 所属市场ID
+        type: integer
       picurls:
         description: 介绍图片[多张用逗号分隔]
         type: string
@@ -1268,6 +1271,7 @@ definitions:
     - goodscode
     - goodsid
     - goodsname
+    - marketid
     type: object
   models.HsbyTopGoods:
     properties:
@@ -1295,6 +1299,9 @@ definitions:
       last:
         description: 现价
         type: number
+      marketid:
+        description: 所属市场ID
+        type: integer
       picurls:
         description: 介绍图片[多张用逗号分隔]
         type: string
@@ -1305,6 +1312,7 @@ definitions:
     - goodscode
     - goodsid
     - goodsname
+    - marketid
     type: object
   models.OperationPrimaryMenu:
     properties:

+ 3 - 1
models/hsby.go

@@ -52,6 +52,7 @@ type HsbyTopGoods struct {
 	Goodscode    string `json:"goodscode"  xorm:"'GOODSCODE'" binding:"required"` // 商品代码(内部)
 	Goodsname    string `json:"goodsname"  xorm:"'GOODSNAME'" binding:"required"` // 商品名称
 	Decimalplace int64  `json:"decimalplace"  xorm:"'DECIMALPLACE'"`              // 报价小数位
+	Marketid     int64  `json:"marketid"  xorm:"'MARKETID'" binding:"required"`   // 所属市场ID
 
 	Hotindex  int32  `json:"hotindex"  xorm:"'HOTINDEX'"`   // 景点热度
 	Videourls string `json:"videourls"  xorm:"'VIDEOURLS'"` // 介绍视频[多张用逗号分隔]
@@ -133,6 +134,7 @@ type HsbyListingGoodsDetail struct {
 	Goodscode    string `json:"goodscode"  xorm:"'GOODSCODE'" binding:"required"` // 商品代码(内部)
 	Goodsname    string `json:"goodsname"  xorm:"'GOODSNAME'" binding:"required"` // 商品名称
 	Decimalplace int64  `json:"decimalplace"  xorm:"'DECIMALPLACE'"`              // 报价小数位
+	Marketid     int64  `json:"marketid"  xorm:"'MARKETID'" binding:"required"`   // 所属市场ID
 
 	Hotindex       int32  `json:"hotindex"  xorm:"'HOTINDEX'"`             // 景点热度
 	Videourls      string `json:"videourls"  xorm:"'VIDEOURLS'"`           // 介绍视频[多张用逗号分隔]
@@ -160,7 +162,7 @@ func GetHsbyListingGoodsDetail(goodsID int) (*HsbyListingGoodsDetail, error) {
 	// 获取挂牌商品信息,以及扩展表信息
 	// FIXME: - 这里使用Get方法,会造成SQL语句的嵌套出错,后期再研究
 	session := engine.Table("GOODS").
-		Select(`GOODS.GOODSID, GOODS.GOODSCODE, GOODS.GOODSNAME, GOODS.DECIMALPLACE,
+		Select(`GOODS.GOODSID, GOODS.GOODSCODE, GOODS.GOODSNAME, GOODS.DECIMALPLACE, GOODS.MARKETID,
 				HSBY_GOODSEX.HOTINDEX, HSBY_GOODSEX.VIDEOURLS, HSBY_GOODSEX.PICURLS, HSBY_GOODSEX.DESCPROVINCEID, HSBY_GOODSEX.Desccityid, HSBY_GOODSEX.Goodsdesc,
 				ENUMDICITEM.ENUMDICNAME CURRENCY, ENUMDICITEM.PARAM2 CURRENCYSIGN, 
 				HSBY_SUPPLIERINFO.VENDORNAME`).