From 73a3d53bfcfa0fde7b9ea2a14c8bcfea42ebf3ad Mon Sep 17 00:00:00 2001
From: lishihai <dslsh@dscom>
Date: 星期四, 13 六月 2024 10:50:00 +0800
Subject: [PATCH] 概述(一级模块)-入库(二级模块)-新建时保存新建单据人信息;验证时保存验证人信息

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

diff --git a/models/location_product_amount.go b/models/location_product_amount.go
index f1f2dc3..efa1205 100644
--- a/models/location_product_amount.go
+++ b/models/location_product_amount.go
@@ -253,6 +253,9 @@
 		db      = slf.build()
 	)
 
+	if slf.PageNum*slf.PageSize > 0 {
+		db = db.Offset((slf.PageNum - 1) * slf.PageSize).Limit(slf.PageSize)
+	}
 	if err := db.Find(&records).Error; err != nil {
 		return records, fmt.Errorf("find records err: %v", err)
 	}

--
Gitblit v1.8.0