Jelajahi Sumber

修复新建包装id为零值错误

sun-pc-linux 7 bulan lalu
induk
melakukan
3cb28dafc8
1 mengubah file dengan 1 tambahan dan 1 penghapusan
  1. 1 1
      boxcost/db/model/pack.go

+ 1 - 1
boxcost/db/model/pack.go

@@ -8,7 +8,7 @@ import (
 
 // 包装
 type Pack struct {
-	Id        primitive.ObjectID `bson:"_id" json:"_id"`
+	Id        primitive.ObjectID `bson:"_id,omitempty" json:"_id"`
 	Name      string             `bson:"name" json:"name"`
 	Thumbnail string             `bson:"thumbnail" json:"thumbnail"`
 	// 部件数量