From 1ef4fe8d2bd448db5d6038d716b00600a914c045 Mon Sep 17 00:00:00 2001 From: yinbentan <yinbentan@live.com> Date: 星期五, 05 七月 2024 17:36:58 +0800 Subject: [PATCH] 创建人没有值,应当为当前登录的账号名称 --- models/month_stats.go | 11 ++++++++++- 1 files changed, 10 insertions(+), 1 deletions(-) diff --git a/models/month_stats.go b/models/month_stats.go index a40c003..f86026f 100644 --- a/models/month_stats.go +++ b/models/month_stats.go @@ -9,7 +9,7 @@ ) type ( - // MonthStats 绉诲姩鍘嗗彶 + // MonthStats 鏈堝害缁熻 MonthStats struct { WmsModel Id int `json:"id" gorm:"column:id;primary_key;AUTO_INCREMENT"` @@ -347,3 +347,12 @@ } return m } + +func (slf *MonthStatsSearch) Count() (int64, error) { + var ( + total int64 + db = slf.build() + ) + err := db.Count(&total).Error + return total, err +} -- Gitblit v1.8.0