This commit is contained in:
苏尹岚
2021-01-07 10:00:46 +08:00
parent 1218e2077c
commit 027d546151

View File

@@ -298,9 +298,6 @@ func GetPayStatistics(db *DaoDB, userID string, pop int, cityCodes []int, mobile
if pop == 1 {
sql2 += " JOIN user e ON e.moblie = ? AND a.pop_user = e.user_id"
sqlParams2 = append(sqlParams2, mobile)
} else {
sql2 += " AND a.mobile = ?"
sqlParams2 = append(sqlParams2, mobile)
}
}
sql2 += `
@@ -324,6 +321,12 @@ func GetPayStatistics(db *DaoDB, userID string, pop int, cityCodes []int, mobile
sql2 += ` AND a.city_code IN (` + GenQuestionMarks(len(cityCodes)) + `)`
sqlParams2 = append(sqlParams2, cityCodes)
}
if mobile != "" {
if pop == 0 {
sql2 += " AND a.mobile = ?"
sqlParams2 = append(sqlParams2, mobile)
}
}
if userID != "" {
if pop == 1 {
sql2 += " AND a.pop_user = ?"