作者 yangfu

fix: no query result when filed type is Date

... ... @@ -146,6 +146,8 @@ func (c Condition) SetWhere(params QueryOptions, q *gorm.DB) {
} else {
q.Where(fmt.Sprintf("%v in %v", c.CastType(c.Field.SQLName, domain.DECIMALV2.ToString()), c.InArgs(c.In)))
}
} else if c.Field.SQLType == domain.Date.ToString() {
q.Where(fmt.Sprintf("%v in %v", c.CastType(c.FormatIfNull(params, c.Field), "datetime"), c.InArgs(c.In)))
} else {
q.Where(fmt.Sprintf("%v in %v", c.CastType(c.FormatIfNull(params, c.Field), "string"), c.InArgs(c.In)))
}
... ...