From 04694eb712db8fee416967007c30f3848794ee37 Mon Sep 17 00:00:00 2001 From: zhangxin Date: Thu, 4 Nov 2021 09:51:29 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=9A=E6=97=B6=E4=BB=BB=E5=8A=A1=E5=8F=AA?= =?UTF-8?q?=E8=A7=A3=E6=9E=90A30=E7=9A=84=E6=96=87=E4=BB=B6=E9=9C=80?= =?UTF-8?q?=E6=B1=82=E4=BB=BB=E5=8A=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- dao/om/implments/DemandHead.dao.impl.go | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/dao/om/implments/DemandHead.dao.impl.go b/dao/om/implments/DemandHead.dao.impl.go index e56193f..70654a9 100644 --- a/dao/om/implments/DemandHead.dao.impl.go +++ b/dao/om/implments/DemandHead.dao.impl.go @@ -310,12 +310,13 @@ func (impl *DemandHeadDAOImplement) UpdateWhere(predicates []grmi.Predicate, ent ******************************************************************************/ func (impl *DemandHeadDAOImplement) SelectUnparsedFile() ([]model.DemandHead, error) { - where := fmt.Sprintf("%s = ? and %s = ? and %s < ?", + where := fmt.Sprintf("%s = ? and %s = ? and %s < ? and %s != ?", meta.DemandHead_PlantNr.ColumnName, meta.DemandHead_Status.ColumnName, meta.DemandHead_ErrNum.ColumnName, - ) - session := impl.session.Table(impl.meta.TableName).Where(where, impl.plantNr, model.DemandHeadUnParsedStatus, model.DemandMaxTry) + meta.DemandHead_Source.ColumnName, + ) + session := impl.session.Table(impl.meta.TableName).Where(where, impl.plantNr, model.DemandHeadUnParsedStatus, model.DemandMaxTry, model.ParseSourceInterval) session = session.OrderBy(meta.DemandHead_PlantNr.ColumnName) session = session.OrderBy(meta.DemandHead_FileNr.ColumnName).Limit(1) data := make([]model.DemandHead, 0, 1) @@ -324,4 +325,4 @@ func (impl *DemandHeadDAOImplement) SelectUnparsedFile() ([]model.DemandHead, er return nil, grmi.NewDataBaseError(err) } return data, nil -} \ No newline at end of file +}