From eba4eb850f0ecfb5839395aa125955ceaa2a454f Mon Sep 17 00:00:00 2001 From: zhangqian <zhangqian@123.com> Date: 星期四, 19 十月 2023 16:39:07 +0800 Subject: [PATCH] Merge branch 'feat-serf' --- model/work_order.go | 28 ++++++++++++++-------------- 1 files changed, 14 insertions(+), 14 deletions(-) diff --git a/model/work_order.go b/model/work_order.go index 076edef..b854461 100644 --- a/model/work_order.go +++ b/model/work_order.go @@ -3,25 +3,25 @@ import ( "apsClient/pkg/sqlitex" "fmt" + "github.com/jinzhu/gorm" "github.com/shopspring/decimal" - "gorm.io/gorm" ) type ( Order struct { - gorm.Model `json:"-"` - WorkOrderID string `gorm:"index;type:varchar(191);not null;comment:宸ュ崟ID" json:"workOrderId"` - OrderID string `gorm:"index;type:varchar(191);not null;comment:璁㈠崟ID" json:"orderId"` - ProductID string `gorm:"type:varchar(191);comment:浜у搧ID" json:"productId"` - ProductName string `gorm:"type:varchar(191);comment:浜у搧鍚嶇О" json:"productName"` - Parameter string `gorm:"type:varchar(1024);comment:鍙傛暟闇�姹�" json:"parameter"` - Customer string `gorm:"type:varchar(191);comment:瀹㈡埛缂栫爜" json:"customer"` - DeliverDate string `gorm:"type:varchar(100);comment:浜よ揣鏃ユ湡" json:"deliverDate"` + gorm.Model + WorkOrderID string `gorm:"index;type:varchar(191);not null" json:"workOrderId"` + OrderID string `gorm:"index;type:varchar(191);not null" json:"orderId"` + ProductID string `gorm:"type:varchar(191)" json:"productId"` + ProductName string `gorm:"type:varchar(191)" json:"productName"` + Parameter string `gorm:"type:varchar(1024)" json:"parameter"` + Customer string `gorm:"type:varchar(191)" json:"customer"` + DeliverDate string `gorm:"type:varchar(100)" json:"deliverDate"` OrderAttr string `json:"orderAttr"` // 璁㈠崟灞炴�ф嫾鎺ョ殑瀛楃涓诧紝鍗宠揣鐗╂弿杩� - Amount decimal.Decimal `gorm:"type:decimal(35,18);comment:鏁伴噺" json:"amount"` - Unit string `gorm:"type:varchar(100);comment:鍗曚綅" json:"unit"` - StartTime int64 `gorm:"comment:璁″垝寮�濮嬫椂闂�" json:"startTime"` - EndTime int64 `gorm:"comment:璁″垝缁撴潫鏃堕棿" json:"endTime"` + Amount decimal.Decimal `gorm:"type:decimal(35,18)" json:"amount"` + Unit string `gorm:"type:varchar(100)" json:"unit"` + StartTime int64 `json:"startTime"` + EndTime int64 `json:"endTime"` Status OrderStatus } @@ -132,7 +132,7 @@ } if len(slf.StatusList) != 0 { - db = db.Where("status in ?", slf.StatusList) + db = db.Where("status IN (?)", slf.StatusList) } if slf.StartTimeMax != 0 { -- Gitblit v1.8.0