format code (#386)

This commit is contained in:
Kevin Wan
2021-01-14 13:24:24 +08:00
committed by GitHub
parent 744c18b7cb
commit eca4ed2cc0
16 changed files with 114 additions and 96 deletions

View File

@@ -15,11 +15,14 @@ func genUpdate(table Table, withCache bool) (string, string, error) {
if camel == "CreateTime" || camel == "UpdateTime" {
continue
}
if field.IsPrimaryKey {
continue
}
expressionValues = append(expressionValues, "data."+camel)
}
expressionValues = append(expressionValues, "data."+table.PrimaryKey.Name.ToCamel())
camelTableName := table.Name.ToCamel()
text, err := util.LoadTemplate(category, updateTemplateFile, template.Update)