Kaynağa Gözat

修改“查询我的库存”出参注释错误

zhou.xiaoning 3 yıl önce
ebeveyn
işleme
0198c7d35d
4 değiştirilmiş dosya ile 16 ekleme ve 14 silme
  1. 2 2
      docs/docs.go
  2. 2 2
      docs/swagger.json
  3. 2 2
      docs/swagger.yaml
  4. 10 8
      models/guangzuan.go

+ 2 - 2
docs/docs.go

@@ -32472,11 +32472,11 @@ const docTemplate = `{
                     "type": "string"
                 },
                 "ffreezeqty": {
-                    "description": "期初均价",
+                    "description": "冻结数量:WRPosition表:FREEZEQTY/100 , 保留两位小数",
                     "type": "number"
                 },
                 "ftotalqty": {
-                    "description": "期初均价",
+                    "description": "库存数量:WRPosition表:TOTALQTY /100 , 保留两位小数",
                     "type": "number"
                 },
                 "goodsno": {

+ 2 - 2
docs/swagger.json

@@ -32463,11 +32463,11 @@
                     "type": "string"
                 },
                 "ffreezeqty": {
-                    "description": "期初均价",
+                    "description": "冻结数量:WRPosition表:FREEZEQTY/100 , 保留两位小数",
                     "type": "number"
                 },
                 "ftotalqty": {
-                    "description": "期初均价",
+                    "description": "库存数量:WRPosition表:TOTALQTY /100 , 保留两位小数",
                     "type": "number"
                 },
                 "goodsno": {

+ 2 - 2
docs/swagger.yaml

@@ -11980,10 +11980,10 @@ definitions:
         description: 金伯利证书编号 - 类型:3
         type: string
       ffreezeqty:
-        description: 期初均价
+        description: 冻结数量:WRPosition表:FREEZEQTY/100 , 保留两位小数
         type: number
       ftotalqty:
-        description: 期初均价
+        description: 库存数量:WRPosition表:TOTALQTY /100 , 保留两位小数
         type: number
       goodsno:
         description: 商品编号

+ 10 - 8
models/guangzuan.go

@@ -161,10 +161,10 @@ type MyWRPosition struct {
 	ZSCZCOLOR3TYPE      int32   `json:"zsczcolor3type" xorm:"ZSCZCOLOR3TYPE"`              // 彩钻颜色3 - 枚举”ZSCZColor3Type“ - 类型:5
 	ISVALID             int32   `json:"isvalid" xorm:"ISVALID"`                            // 是否有效 - 0:无效 1:有效
 
-	TOTALQTY   int64    `json:"-" xorm:"TOTALQTY"`
-	FREEZEQTY  int64    `json:"-" xorm:"FREEZEQTY"`
-	FTOTALQTY  SFLOAT64 `json:"ftotalqty"`  // 库存数量:WRPosition表:TOTALQTY /100 , 保留两位小数
-	FFREEZEQTY SFLOAT64 `json:"ffreezeqty"` // 冻结数量:WRPosition表:FREEZEQTY/100 , 保留两位小数
+	TOTALQTY   int64   `json:"-" xorm:"TOTALQTY"`
+	FREEZEQTY  int64   `json:"-" xorm:"FREEZEQTY"`
+	FTOTALQTY  float64 `json:"ftotalqty"`  // 库存数量:WRPosition表:TOTALQTY /100 , 保留两位小数
+	FFREEZEQTY float64 `json:"ffreezeqty"` // 冻结数量:WRPosition表:FREEZEQTY/100 , 保留两位小数
 
 	PageEx `xorm:"extends"` // 页码信息
 
@@ -173,12 +173,14 @@ type MyWRPosition struct {
 
 func (r *MyWRPosition) calc() {
 	if r.TOTALQTY != 0 {
-		r.FTOTALQTY = SFLOAT64(r.TOTALQTY / 100)
-		r.FTOTALQTY.Round(2)
+		a := SFLOAT64(r.TOTALQTY / 100)
+		a.Round(2)
+		r.FTOTALQTY = a.Float64()
 	}
 	if r.FREEZEQTY != 0 {
-		r.FFREEZEQTY = SFLOAT64(r.FREEZEQTY / 100)
-		r.FFREEZEQTY.Round(2)
+		a := SFLOAT64(r.FREEZEQTY / 100)
+		a.Round(2)
+		r.FFREEZEQTY = a.Float64()
 	}
 }