From f45e4cb8045fe60f96f467dc4ea1e2ae57445712 Mon Sep 17 00:00:00 2001
From: zhangqian <zhangqian@123.com>
Date: 星期三, 03 七月 2024 23:13:40 +0800
Subject: [PATCH] 默认位置parent_id为视图位置id

---
 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