zhangqian
2024-07-01 73b6baf6af3d88cdcb0e2df7932a9bd96b0b85c5
models/location_product_amount.go
@@ -47,6 +47,7 @@
      ProductId               string                     `json:"productId" gorm:"column:product_id"`
      ProductName             string                     `json:"productName" gorm:"column:product_name"`
      Amount                  decimal.Decimal            `json:"amount" gorm:"column:amount"`
      AmountMoreUnits         []UnitItems                `json:"amountMoreUnits" gorm:"-"` //在库数量多单位
      Unit                    string                     `json:"unit" gorm:"column:unit"`
      CreateDate              string                     `json:"createDate" gorm:"column:create_date"`
      AdjustAmount            decimal.Decimal            `json:"adjustAmount" gorm:"column:adjust_amount"` //差值
@@ -314,3 +315,13 @@
   }
   return result, nil
}
func (slf *LocationProductAmountSearch) Save(record *LocationProductAmount) error {
   var db = slf.build()
   if err := db.Omit("CreatedAt").Save(record).Error; err != nil {
      return fmt.Errorf("save err: %v, record: %+v", err, record)
   }
   return nil
}