From e67802cd15e273da46bfb734e339a947b7d1eceb Mon Sep 17 00:00:00 2001
From: zhangqian <zhangqian@123.com>
Date: 星期五, 15 九月 2023 16:01:04 +0800
Subject: [PATCH] debug
---
model/procedures.go | 12 ++++++++++++
1 files changed, 12 insertions(+), 0 deletions(-)
diff --git a/model/procedures.go b/model/procedures.go
index 6a4762e..99e45f4 100644
--- a/model/procedures.go
+++ b/model/procedures.go
@@ -17,6 +17,7 @@
OrderID string `gorm:"index;type:varchar(191);not null;comment:璁㈠崟ID" json:"-"`
DeviceID string `gorm:"index;type:varchar(191);comment:璁惧ID" json:"deviceId"`
ProcedureID string `gorm:"index;type:varchar(191);comment:宸ュ簭ID" json:"procedureId"`
+ Position int `gorm:"type:int;comment:宸ヤ綔浣嶇疆" json:"position"` //姣忎釜璁惧鍙兘鏈夊涓満浣嶅悓鏃剁敓浜э紝鐢╬osition琛ㄧず浣嶇疆
StartTime int64 `gorm:"comment:璁″垝寮�濮嬫椂闂�" json:"startTime"`
EndTime int64 `gorm:"comment:璁″垝缁撴潫鏃堕棿" json:"endTime"`
Status ProcedureStatus
@@ -271,6 +272,17 @@
return records, total, nil
}
+func (slf *ProceduresSearch) Count() (int64, error) {
+ var (
+ total int64
+ db = slf.build()
+ )
+ if err := db.Count(&total).Error; err != nil {
+ return total, fmt.Errorf("find count err: %v", err)
+ }
+ return total, nil
+}
+
func (slf *ProceduresSearch) FindNotTotal() ([]*Procedures, error) {
var (
records = make([]*Procedures, 0)
--
Gitblit v1.8.0