From c2b845d20735af74c53a4472ce0978cd53be3612 Mon Sep 17 00:00:00 2001 From: allanwei Date: Tue, 27 Jul 2021 17:15:42 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E4=BA=86=E8=87=AA=E5=8A=A8?= =?UTF-8?q?=E7=94=9F=E6=88=90=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- dao/om/implments/DemandLst.dao.impl.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/dao/om/implments/DemandLst.dao.impl.go b/dao/om/implments/DemandLst.dao.impl.go index 608f1bf..6a191bb 100644 --- a/dao/om/implments/DemandLst.dao.impl.go +++ b/dao/om/implments/DemandLst.dao.impl.go @@ -245,7 +245,9 @@ func (impl *DemandLstDAOImplement) SelectAndPaging(paging *grmi.Paging, predicat } parameters = append(parameters, paging.Offset(), paging.Size) data := make([]model.DemandLst, 0, 10) - where = " where " + where + if where != "" { + where = " where " + where + } err = impl.session.Table(impl.meta.TableName).SQL("select * from "+impl.meta.TableName+where+orderBy+" offset ? row fetch next ? row only", parameters...).Find(&data) if err != nil { return grmi.EmptyPagingResult, err