mirror of
https://github.com/zeromicro/go-zero.git
synced 2026-05-10 00:20:00 +08:00
feat: goctl model Add a new method hasField (#5484)
This commit is contained in:
@@ -61,7 +61,7 @@ func genUpdate(table Table, withCache, postgreSql bool) (
|
||||
return "", "", err
|
||||
}
|
||||
|
||||
output, err := util.With("update").Parse(text).Execute(
|
||||
output, err := util.With("update").Parse(text).AddFunc("hasField", hasField(table)).Execute(
|
||||
map[string]any{
|
||||
"withCache": withCache,
|
||||
"containsIndexCache": table.ContainsUniqueCacheKey,
|
||||
@@ -94,7 +94,7 @@ func genUpdate(table Table, withCache, postgreSql bool) (
|
||||
return "", "", err
|
||||
}
|
||||
|
||||
updateMethodOutput, err := util.With("updateMethod").Parse(text).Execute(
|
||||
updateMethodOutput, err := util.With("updateMethod").Parse(text).AddFunc("hasField", hasField(table)).Execute(
|
||||
map[string]any{
|
||||
"upperStartCamelObject": camelTableName,
|
||||
"data": table,
|
||||
|
||||
Reference in New Issue
Block a user