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)