From fc3313955a083c9480e4ea74398f72f9ba6addcd Mon Sep 17 00:00:00 2001
From: zhangqian <zhangqian@123.com>
Date: 星期四, 01 八月 2024 20:29:51 +0800
Subject: [PATCH] 月度统计查询多单位数据计算改查询。

---
 models/location_product_amount.go |   13 +++++++++++++
 1 files changed, 13 insertions(+), 0 deletions(-)

diff --git a/models/location_product_amount.go b/models/location_product_amount.go
index 928dddb..279ab69 100644
--- a/models/location_product_amount.go
+++ b/models/location_product_amount.go
@@ -334,6 +334,19 @@
 	return records, nil
 }
 
+func (slf *LocationProductAmountSearch) FindAll() ([]*LocationProductAmount, error) {
+	var (
+		records = make([]*LocationProductAmount, 0)
+		db      = slf.build()
+	)
+
+	if err := db.Find(&records).Error; err != nil {
+		return records, fmt.Errorf("find records err: %v", err)
+	}
+
+	return records, nil
+}
+
 func (slf *LocationProductAmountSearch) FirstRes() (*LocationProductAmount, *gorm.DB) {
 	var (
 		record = new(LocationProductAmount)

--
Gitblit v1.8.0