Quellcode durchsuchen

处理ID失真BUG

zhou.xiaoning vor 3 Jahren
Ursprung
Commit
05ffd4dedb
4 geänderte Dateien mit 54 neuen und 35 gelöschten Zeilen
  1. 14 7
      docs/docs.go
  2. 14 7
      docs/swagger.json
  3. 12 7
      docs/swagger.yaml
  4. 14 14
      models/ferroalloy.go

+ 14 - 7
docs/docs.go

@@ -41288,7 +41288,7 @@ const docTemplate = `{
                 },
                 "presaleapplyid": {
                     "description": "预售申请ID(184+Unix秒时间戳(10位)+xxxxxx)",
-                    "type": "integer"
+                    "type": "string"
                 },
                 "receiptinfo": {
                     "description": "发票信息",
@@ -41368,7 +41368,7 @@ const docTemplate = `{
                 },
                 "wrfactortypeid": {
                     "description": "仓单要素类型ID",
-                    "type": "integer"
+                    "type": "string"
                 },
                 "wrstandardid": {
                     "description": "现货商品ID",
@@ -41380,12 +41380,15 @@ const docTemplate = `{
                 },
                 "wrtradedetailid": {
                     "description": "采购成交单ID(321+Unix秒时间戳(10位)+xxxxxx)",
-                    "type": "integer"
+                    "type": "string"
                 }
             }
         },
         "models.Thjpurchasetransfer": {
             "type": "object",
+            "required": [
+                "ordertype"
+            ],
             "properties": {
                 "buyaccountid": {
                     "description": "买方账号ID",
@@ -41411,13 +41414,17 @@ const docTemplate = `{
                     "description": "市场ID(固定为(64202)",
                     "type": "integer"
                 },
+                "ordertype": {
+                    "description": "类型 - 1:转让 2:受让",
+                    "type": "integer"
+                },
                 "payeddeposit": {
                     "description": "买方已付定金",
                     "type": "number"
                 },
                 "presaleapplyid": {
                     "description": "预售申请ID(184+Unix秒时间戳(10位)+xxxxxx)",
-                    "type": "integer"
+                    "type": "string"
                 },
                 "remark": {
                     "description": "备注",
@@ -41457,7 +41464,7 @@ const docTemplate = `{
                 },
                 "transferid": {
                     "description": "协议转让ID(332+Unix秒时间戳(10位)+xxxxxx)",
-                    "type": "integer"
+                    "type": "string"
                 },
                 "transferprice": {
                     "description": "转让价格",
@@ -41481,7 +41488,7 @@ const docTemplate = `{
                 },
                 "wrfactortypeid": {
                     "description": "仓单要素类型ID",
-                    "type": "integer"
+                    "type": "string"
                 },
                 "wrstandardid": {
                     "description": "现货商品ID",
@@ -41493,7 +41500,7 @@ const docTemplate = `{
                 },
                 "wrtradedetailid": {
                     "description": "采购成交单ID(321+Unix秒时间戳(10位)+xxxxxx)",
-                    "type": "integer"
+                    "type": "string"
                 }
             }
         },

+ 14 - 7
docs/swagger.json

@@ -41279,7 +41279,7 @@
                 },
                 "presaleapplyid": {
                     "description": "预售申请ID(184+Unix秒时间戳(10位)+xxxxxx)",
-                    "type": "integer"
+                    "type": "string"
                 },
                 "receiptinfo": {
                     "description": "发票信息",
@@ -41359,7 +41359,7 @@
                 },
                 "wrfactortypeid": {
                     "description": "仓单要素类型ID",
-                    "type": "integer"
+                    "type": "string"
                 },
                 "wrstandardid": {
                     "description": "现货商品ID",
@@ -41371,12 +41371,15 @@
                 },
                 "wrtradedetailid": {
                     "description": "采购成交单ID(321+Unix秒时间戳(10位)+xxxxxx)",
-                    "type": "integer"
+                    "type": "string"
                 }
             }
         },
         "models.Thjpurchasetransfer": {
             "type": "object",
+            "required": [
+                "ordertype"
+            ],
             "properties": {
                 "buyaccountid": {
                     "description": "买方账号ID",
@@ -41402,13 +41405,17 @@
                     "description": "市场ID(固定为(64202)",
                     "type": "integer"
                 },
+                "ordertype": {
+                    "description": "类型 - 1:转让 2:受让",
+                    "type": "integer"
+                },
                 "payeddeposit": {
                     "description": "买方已付定金",
                     "type": "number"
                 },
                 "presaleapplyid": {
                     "description": "预售申请ID(184+Unix秒时间戳(10位)+xxxxxx)",
-                    "type": "integer"
+                    "type": "string"
                 },
                 "remark": {
                     "description": "备注",
@@ -41448,7 +41455,7 @@
                 },
                 "transferid": {
                     "description": "协议转让ID(332+Unix秒时间戳(10位)+xxxxxx)",
-                    "type": "integer"
+                    "type": "string"
                 },
                 "transferprice": {
                     "description": "转让价格",
@@ -41472,7 +41479,7 @@
                 },
                 "wrfactortypeid": {
                     "description": "仓单要素类型ID",
-                    "type": "integer"
+                    "type": "string"
                 },
                 "wrstandardid": {
                     "description": "现货商品ID",
@@ -41484,7 +41491,7 @@
                 },
                 "wrtradedetailid": {
                     "description": "采购成交单ID(321+Unix秒时间戳(10位)+xxxxxx)",
-                    "type": "integer"
+                    "type": "string"
                 }
             }
         },

+ 12 - 7
docs/swagger.yaml

@@ -17427,7 +17427,7 @@ definitions:
         type: string
       presaleapplyid:
         description: 预售申请ID(184+Unix秒时间戳(10位)+xxxxxx)
-        type: integer
+        type: string
       receiptinfo:
         description: 发票信息
         type: string
@@ -17487,7 +17487,7 @@ definitions:
         type: string
       wrfactortypeid:
         description: 仓单要素类型ID
-        type: integer
+        type: string
       wrstandardid:
         description: 现货商品ID
         type: integer
@@ -17496,7 +17496,7 @@ definitions:
         type: string
       wrtradedetailid:
         description: 采购成交单ID(321+Unix秒时间戳(10位)+xxxxxx)
-        type: integer
+        type: string
     required:
     - buyuserid
     type: object
@@ -17520,12 +17520,15 @@ definitions:
       marketid:
         description: 市场ID(固定为(64202)
         type: integer
+      ordertype:
+        description: 类型 - 1:转让 2:受让
+        type: integer
       payeddeposit:
         description: 买方已付定金
         type: number
       presaleapplyid:
         description: 预售申请ID(184+Unix秒时间戳(10位)+xxxxxx)
-        type: integer
+        type: string
       remark:
         description: 备注
         type: string
@@ -17555,7 +17558,7 @@ definitions:
         type: number
       transferid:
         description: 协议转让ID(332+Unix秒时间戳(10位)+xxxxxx)
-        type: integer
+        type: string
       transferprice:
         description: 转让价格
         type: number
@@ -17573,7 +17576,7 @@ definitions:
         type: integer
       wrfactortypeid:
         description: 仓单要素类型ID
-        type: integer
+        type: string
       wrstandardid:
         description: 现货商品ID
         type: integer
@@ -17582,7 +17585,9 @@ definitions:
         type: string
       wrtradedetailid:
         description: 采购成交单ID(321+Unix秒时间戳(10位)+xxxxxx)
-        type: integer
+        type: string
+    required:
+    - ordertype
     type: object
   models.ThjpurchasetransferDetail:
     properties:

+ 14 - 14
models/ferroalloy.go

@@ -624,11 +624,11 @@ func (r *THJWrstandardDetailReq) GetTHJWrstandardDetail() (rsp *THJWrstandardDet
 
 // Thjpurchasetradedetail 铁合金采购成交扩展表
 type Thjpurchasetradedetail struct {
-	WRTRADEDETAILID      int64     `json:"wrtradedetailid" xorm:"WRTRADEDETAILID"`                      // 采购成交单ID(321+Unix秒时间戳(10位)+xxxxxx)
-	PRESALEAPPLYID       int64     `json:"presaleapplyid" xorm:"PRESALEAPPLYID"`                        // 预售申请ID(184+Unix秒时间戳(10位)+xxxxxx)
+	WRTRADEDETAILID      string    `json:"wrtradedetailid" xorm:"WRTRADEDETAILID"`                      // 采购成交单ID(321+Unix秒时间戳(10位)+xxxxxx)
+	PRESALEAPPLYID       string    `json:"presaleapplyid" xorm:"PRESALEAPPLYID"`                        // 预售申请ID(184+Unix秒时间戳(10位)+xxxxxx)
 	TRADEDATE            string    `json:"tradedate" xorm:"TRADEDATE"`                                  // 交易日(yyyyMMdd)
 	MARKETID             int32     `json:"marketid" xorm:"MARKETID"`                                    // 市场ID
-	WRFACTORTYPEID       int64     `json:"wrfactortypeid" xorm:"WRFACTORTYPEID"`                        // 仓单要素类型ID
+	WRFACTORTYPEID       string    `json:"wrfactortypeid" xorm:"WRFACTORTYPEID"`                        // 仓单要素类型ID
 	DELIVERYGOODSID      int32     `json:"deliverygoodsid" xorm:"DELIVERYGOODSID"`                      // 现货品种ID
 	WRSTANDARDID         int32     `json:"wrstandardid" xorm:"WRSTANDARDID"`                            // 现货商品ID
 	WAREHOUSEID          int64     `json:"warehouseid" xorm:"WAREHOUSEID"`                              // 仓库ID
@@ -689,11 +689,11 @@ func (r *Thjpurchasetradedetail) buildSql() string {
 		wh.WAREHOUSENAME,
 		en1.enumdicname THJDELIVERYMODEDISPLAY,
 		en2.enumdicname THJORDERSTATUSDISPLAY,
-		t.WRTRADEDETAILID,
-		t.PRESALEAPPLYID,
+		to_char(t.WRTRADEDETAILID) WRTRADEDETAILID,
+		to_char(t.PRESALEAPPLYID) PRESALEAPPLYID,
 		t.TRADEDATE,
 		t.MARKETID,
-		t.WRFACTORTYPEID,
+		to_char(t.WRFACTORTYPEID) WRFACTORTYPEID,
 		t.DELIVERYGOODSID,
 		t.WRSTANDARDID,
 		t.WAREHOUSEID,
@@ -1206,11 +1206,11 @@ func (r *THJPurchaseTradeDetailReq) GetData() (rsp *THJPurchaseTradeDetailRsp, e
 
 // Thjpurchasetransfer 铁合金采购协议表
 type Thjpurchasetransfer struct {
-	TRANSFERID               int64   `json:"transferid" xorm:"TRANSFERID"`                             // 协议转让ID(332+Unix秒时间戳(10位)+xxxxxx)
-	WRTRADEDETAILID          int64   `json:"wrtradedetailid" xorm:"WRTRADEDETAILID"`                   // 采购成交单ID(321+Unix秒时间戳(10位)+xxxxxx)
-	PRESALEAPPLYID           int64   `json:"presaleapplyid" xorm:"PRESALEAPPLYID"`                     // 预售申请ID(184+Unix秒时间戳(10位)+xxxxxx)
+	TRANSFERID               string  `json:"transferid" xorm:"TRANSFERID"`                             // 协议转让ID(332+Unix秒时间戳(10位)+xxxxxx)
+	WRTRADEDETAILID          string  `json:"wrtradedetailid" xorm:"WRTRADEDETAILID"`                   // 采购成交单ID(321+Unix秒时间戳(10位)+xxxxxx)
+	PRESALEAPPLYID           string  `json:"presaleapplyid" xorm:"PRESALEAPPLYID"`                     // 预售申请ID(184+Unix秒时间戳(10位)+xxxxxx)
 	TRADEDATE                string  `json:"tradedate" xorm:"TRADEDATE"`                               // 交易日(yyyyMMdd)
-	WRFACTORTYPEID           int64   `json:"wrfactortypeid" xorm:"WRFACTORTYPEID"`                     // 仓单要素类型ID
+	WRFACTORTYPEID           string  `json:"wrfactortypeid" xorm:"WRFACTORTYPEID"`                     // 仓单要素类型ID
 	DELIVERYGOODSID          int32   `json:"deliverygoodsid" xorm:"DELIVERYGOODSID"`                   // 现货品种ID
 	WRSTANDARDID             int32   `json:"wrstandardid" xorm:"WRSTANDARDID"`                         // 现货商品ID
 	WAREHOUSEID              int64   `json:"warehouseid" xorm:"WAREHOUSEID"`                           // 仓库ID
@@ -1252,11 +1252,11 @@ func (r *Thjpurchasetransfer) buildSql() string {
 	    wr.WRSTANDARDNAME, 
 		p.TRADEPRICE, 
 		p.PAYEDDEPOSIT, 
-		t.TRANSFERID,
-		t.WRTRADEDETAILID,
-		t.PRESALEAPPLYID,
+		to_char(t.TRANSFERID) TRANSFERID,
+		to_char(t.WRTRADEDETAILID) WRTRADEDETAILID,
+		to_char(t.PRESALEAPPLYID) PRESALEAPPLYID,
 		t.TRADEDATE,
-		t.WRFACTORTYPEID,
+		to_char(t.WRFACTORTYPEID) WRFACTORTYPEID,
 		t.DELIVERYGOODSID,
 		t.WRSTANDARDID,
 		t.WAREHOUSEID,