From 1578d83da84d56c26936c73d5750ae4761f48f8b Mon Sep 17 00:00:00 2001 From: public_host Date: Wed, 28 Apr 2021 13:05:35 +0800 Subject: [PATCH] fix --- hasaki-gen-crud/template.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/hasaki-gen-crud/template.go b/hasaki-gen-crud/template.go index 613c032..a449b06 100644 --- a/hasaki-gen-crud/template.go +++ b/hasaki-gen-crud/template.go @@ -106,9 +106,15 @@ func (TempLowHead3A60 *Temp3A60) Save(isAllCols ...bool) (err error) { if tmp.Id == 0 { err = TempLowHead3A60.insertPretreatment() + if err != nil { + return + } _, err = TempLowHead3A60.getXorm().Insert(TempLowHead3A60) } else { err = TempLowHead3A60.updatePretreatment() + if err != nil { + return + } if len(isAllCols) > 0 { if isAllCols[0] { _, err = TempLowHead3A60.getXorm().AllCols().Where(whereQuery, whereArgs...).Update(TempLowHead3A60)