!17 修复where为空时不是1=1的bug

Merge pull request !17 from 张金富/master
This commit is contained in:
John
2019-01-23 13:46:41 +08:00

View File

@ -43,7 +43,7 @@ func formatCondition(where interface{}, args []interface{}) (string, []interface
buffer.Write(gconv.Bytes(where))
}
if buffer.Len() == 0 {
buffer.WriteString("1")
buffer.WriteString("1=1")
}
// 查询条件处理
newWhere := buffer.String()