Merge pull request #167 from windha/master

修复自定义查询 in 查询bug
master
xxj 3 years ago committed by GitHub
commit 47a40accbe
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -117,7 +117,7 @@ type Condition struct {
} }
// And a condition by and .and 一个条件 // And a condition by and .and 一个条件
func (c *Condition) And(column string, cases string, value ...interface{}) { func (c *Condition) And(column string, cases string, value interface{}) {
c.list = append(c.list, &conditionInfo{ c.list = append(c.list, &conditionInfo{
andor: "and", andor: "and",
column: column, // 列名 column: column, // 列名
@ -127,7 +127,7 @@ func (c *Condition) And(column string, cases string, value ...interface{}) {
} }
// Or a condition by or .or 一个条件 // Or a condition by or .or 一个条件
func (c *Condition) Or(column string, cases string, value ...interface{}) { func (c *Condition) Or(column string, cases string, value interface{}) {
c.list = append(c.list, &conditionInfo{ c.list = append(c.list, &conditionInfo{
andor: "or", andor: "or",
column: column, // 列名 column: column, // 列名

@ -98,7 +98,7 @@ type Condition struct {
} }
// And a condition by and .and 一个条件 // And a condition by and .and 一个条件
func (c *Condition) And(column string, cases string, value ...interface{}) { func (c *Condition) And(column string, cases string, value interface{}) {
c.list = append(c.list, &conditionInfo{ c.list = append(c.list, &conditionInfo{
andor: "and", andor: "and",
column: column, // 列名 column: column, // 列名
@ -108,7 +108,7 @@ func (c *Condition) And(column string, cases string, value ...interface{}) {
} }
// Or a condition by or .or 一个条件 // Or a condition by or .or 一个条件
func (c *Condition) Or(column string, cases string, value ...interface{}) { func (c *Condition) Or(column string, cases string, value interface{}) {
c.list = append(c.list, &conditionInfo{ c.list = append(c.list, &conditionInfo{
andor: "or", andor: "or",
column: column, // 列名 column: column, // 列名

Loading…
Cancel
Save