正在显示
1 个修改的文件
包含
1 行增加
和
1 行删除
| @@ -138,7 +138,7 @@ func (c Condition) SetWhere(params QueryOptions, q *gorm.DB) { | @@ -138,7 +138,7 @@ func (c Condition) SetWhere(params QueryOptions, q *gorm.DB) { | ||
| 138 | q.Where(fmt.Sprintf("%v like '%%%v%%'", c.FormatIfNull(params, c.Field), c.Like)) | 138 | q.Where(fmt.Sprintf("%v like '%%%v%%'", c.FormatIfNull(params, c.Field), c.Like)) |
| 139 | } | 139 | } |
| 140 | if len(c.In) > 0 { | 140 | if len(c.In) > 0 { |
| 141 | - q.Where(fmt.Sprintf("%v in %v", c.FormatIfNull(params, c.Field), c.InArgs(c.In))) | 141 | + q.Where(fmt.Sprintf("cast(%v as string) in %v", c.FormatIfNull(params, c.Field), c.InArgs(c.In))) |
| 142 | } | 142 | } |
| 143 | if len(c.Ex) > 0 { | 143 | if len(c.Ex) > 0 { |
| 144 | in := c.InArgs(c.Ex) | 144 | in := c.InArgs(c.Ex) |
-
请 注册 或 登录 后发表评论