fix test
This commit is contained in:
parent
c02c051f3e
commit
59a3ceed43
|
@ -83,6 +83,8 @@ func (statement *Statement) GenSumSQL(bean interface{}, columns ...string) (stri
|
||||||
for _, colName := range columns {
|
for _, colName := range columns {
|
||||||
if !strings.Contains(colName, " ") && !strings.Contains(colName, "(") {
|
if !strings.Contains(colName, " ") && !strings.Contains(colName, "(") {
|
||||||
colName = statement.quote(colName)
|
colName = statement.quote(colName)
|
||||||
|
} else {
|
||||||
|
colName = statement.ReplaceQuote(colName)
|
||||||
}
|
}
|
||||||
sumStrs = append(sumStrs, fmt.Sprintf("COALESCE(sum(%s),0)", colName))
|
sumStrs = append(sumStrs, fmt.Sprintf("COALESCE(sum(%s),0)", colName))
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue