From 115bd9b51f5d8eade4658f844de37516486c60e7 Mon Sep 17 00:00:00 2001 From: liujiandao <274878379@qq.com> Date: 星期六, 18 十一月 2023 17:25:25 +0800 Subject: [PATCH] crm获取aps项目模块信息 --- model/product.go | 6 +++++- 1 files changed, 5 insertions(+), 1 deletions(-) diff --git a/model/product.go b/model/product.go index 7ec7b6b..2ac4adc 100644 --- a/model/product.go +++ b/model/product.go @@ -12,9 +12,10 @@ Name string `json:"name" gorm:"column:name;type:varchar(255);comment:浜у搧鍚嶇О"` Price decimal.Decimal `json:"price" gorm:"column:price;type:decimal(10,2);comment:浜у搧浠锋牸"` Number string `json:"number" gorm:"column:number;type:varchar(255);comment:浜у搧缂栧彿"` - Amount decimal.Decimal `json:"amount" gorm:"column:amount;type:int;comment:浜у搧鏁伴噺"` + Amount decimal.Decimal `json:"amount" gorm:"column:amount;type:decimal(12,2);comment:浜у搧鏁伴噺"` Total decimal.Decimal `json:"total" gorm:"column:total;type:decimal(10,2);comment:浜у搧鎬讳环"` Desc string `json:"desc" gorm:"column:desc;type:varchar(255);comment:浜у搧鎻忚堪"` + Unit string `json:"unit" gorm:"column:unit;type:varchar(255);comment:鍗曚綅"` gorm.Model `json:"-"` } @@ -47,6 +48,9 @@ if slf.Name != "" { db = db.Where("name = ?", slf.Name) } + if len(slf.Ids) != 0 { + db = db.Where("id in ?", slf.Ids) + } return db } -- Gitblit v1.8.0