We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 3ad2b78 commit 0316100Copy full SHA for 0316100
1 file changed
cmd/jzero/.template/go-zero/model/customized.tpl
@@ -20,6 +20,9 @@ func (m *custom{{.upperStartCamelObject}}Model) BulkInsert(ctx context.Context,
20
}
21
22
func (m *custom{{.upperStartCamelObject}}Model) FindSelectedColumnsByCondition(ctx context.Context, session sqlx.Session, columns []string, conds ...condition.Condition) ([]*{{.upperStartCamelObject}}, error) {
23
+ if len(columns) == 0 {
24
+ columns = {{.lowerStartCamelObject}}FieldNames
25
+ }
26
sb := sqlbuilder.Select(columns...).From(m.table)
27
builder := condition.Select(*sb, conds...)
28
statement, args := builder.Build()
0 commit comments