- fix bug in TmpGetJxBadCommentsByStoreId
This commit is contained in:
@@ -626,22 +626,22 @@ func TmpGetJxBadCommentsByStoreId(ctx *jxcontext.Context, storeIDs []int, offset
|
|||||||
`
|
`
|
||||||
sqlParams := []interface{}{}
|
sqlParams := []interface{}{}
|
||||||
if len(storeIDs) > 0 {
|
if len(storeIDs) > 0 {
|
||||||
sql += " AND jxstoreid IN (" + dao.GenQuestionMarks(len(storeIDs)) + ")"
|
sql += " AND t1.jxstoreid IN (" + dao.GenQuestionMarks(len(storeIDs)) + ")"
|
||||||
sqlParams = append(sqlParams, storeIDs)
|
sqlParams = append(sqlParams, storeIDs)
|
||||||
}
|
}
|
||||||
if commentType == GET_BAD_COMMENTS_TYPE {
|
if commentType == GET_BAD_COMMENTS_TYPE {
|
||||||
sql += " AND status = ?"
|
sql += " AND t1.status = ?"
|
||||||
sqlParams = append(sqlParams, commentType)
|
sqlParams = append(sqlParams, commentType)
|
||||||
}
|
}
|
||||||
if !utils.IsTimeZero(fromTime) {
|
if !utils.IsTimeZero(fromTime) {
|
||||||
sql += " AND createtime >= ?"
|
sql += " AND t1.createtime >= ?"
|
||||||
sqlParams = append(sqlParams, fromTime)
|
sqlParams = append(sqlParams, fromTime)
|
||||||
}
|
}
|
||||||
if !utils.IsTimeZero(toTime) {
|
if !utils.IsTimeZero(toTime) {
|
||||||
sql += " AND createtime < ?"
|
sql += " AND t1.createtime < ?"
|
||||||
sqlParams = append(sqlParams, toTime)
|
sqlParams = append(sqlParams, toTime)
|
||||||
}
|
}
|
||||||
sql += " ORDER BY createtime DESC"
|
sql += " ORDER BY t1.createtime DESC"
|
||||||
pageSize = jxutils.FormalizePageSize(pageSize)
|
pageSize = jxutils.FormalizePageSize(pageSize)
|
||||||
if offset < 0 {
|
if offset < 0 {
|
||||||
offset = 0
|
offset = 0
|
||||||
|
|||||||
Reference in New Issue
Block a user