public_host 4 years ago
parent
commit
1578d83da8
  1. 6
      hasaki-gen-crud/template.go

6
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)

Loading…
Cancel
Save