From 36ce04a666db02c8f3018af12ab28ae82901dcb6 Mon Sep 17 00:00:00 2001 From: yfsoftcom Date: Thu, 20 Jan 2022 14:51:36 +0800 Subject: [PATCH] fix --- plugins/dbImpl.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/dbImpl.go b/plugins/dbImpl.go index 46533a0..a9cdda3 100644 --- a/plugins/dbImpl.go +++ b/plugins/dbImpl.go @@ -216,7 +216,7 @@ func (p *ormImpl) FindObject(q *db.QueryData) (data []map[string]interface{}, er // err = dbclient.Model(Fake{}).Condition("name = ?", "c").Count(&total).Error() // total is the count func (p *ormImpl) Count(q *db.BaseData, total *int64) error { - return p.db.Table(q.Table).Where(fmt.Sprintf("(%s) and deleted_at is null", q.Condition, q.Arguments...).Count(total).Error + return p.db.Table(q.Table).Where(fmt.Sprintf("(%s) and deleted_at is null", q.Condition), q.Arguments...).Count(total).Error } //OK