resolved #481
This commit is contained in:
parent
2597ab2401
commit
dc3618b2f7
|
@ -1152,8 +1152,9 @@ func (statement *Statement) genCountSQL(bean interface{}) (string, []interface{}
|
||||||
if len(selectSql) <= 0 {
|
if len(selectSql) <= 0 {
|
||||||
if statement.IsDistinct {
|
if statement.IsDistinct {
|
||||||
selectSql = fmt.Sprintf("count(DISTINCT %s)", statement.ColumnStr)
|
selectSql = fmt.Sprintf("count(DISTINCT %s)", statement.ColumnStr)
|
||||||
|
} else {
|
||||||
|
selectSql = "count(*)"
|
||||||
}
|
}
|
||||||
selectSql = "count(*)"
|
|
||||||
}
|
}
|
||||||
return statement.genSelectSQL(selectSql, condSQL), append(statement.joinArgs, condArgs...)
|
return statement.genSelectSQL(selectSql, condSQL), append(statement.joinArgs, condArgs...)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue