Răsfoiți Sursa

代码生成细节处理

yxh 4 ani în urmă
părinte
comite
11fc5c731f
1 a modificat fișierele cu 1 adăugiri și 1 ștergeri
  1. 1 1
      template/vm/go/dao.template

+ 1 - 1
template/vm/go/dao.template

@@ -9,7 +9,7 @@ package dao
 
 {{$hasGTime:=false}}
 {{range $index, $column := .table.Columns}}
-{{if eq $column.GoType "Time"}}
+{{if and (eq $column.GoType "Time") (or (eq $column.IsInsert "1") (eq $column.IsEdit "1"))}}
 {{$hasGTime = true}}
 {{end}}
 {{end}}