- add TmpGetJxBadComments
This commit is contained in:
@@ -608,7 +608,7 @@ func TmpGetJxBadCommentsNo(ctx *jxcontext.Context, storeID int) (count int, err
|
||||
return count, err
|
||||
}
|
||||
|
||||
func TmpGetJxBadCommentsByStoreId(ctx *jxcontext.Context, storeID, pageNo, pageSize, commentType int, fromTime, toTime time.Time) (retVal map[string]interface{}, err error) {
|
||||
func TmpGetJxBadCommentsByStoreId(ctx *jxcontext.Context, storeIDs []int, offset, pageSize, commentType int, fromTime, toTime time.Time) (retVal map[string]interface{}, err error) {
|
||||
db := dao.GetDB()
|
||||
sql := `
|
||||
SELECT SQL_CALC_FOUND_ROWS *
|
||||
@@ -616,9 +616,9 @@ func TmpGetJxBadCommentsByStoreId(ctx *jxcontext.Context, storeID, pageNo, pageS
|
||||
WHERE 1 = 1
|
||||
`
|
||||
sqlParams := []interface{}{}
|
||||
if storeID > 0 {
|
||||
sql += " AND jxstoreid = ?"
|
||||
sqlParams = append(sqlParams, storeID)
|
||||
if len(storeIDs) > 0 {
|
||||
sql += " AND jxstoreid IN (" + dao.GenQuestionMarks(len(storeIDs)) + ")"
|
||||
sqlParams = append(sqlParams, storeIDs)
|
||||
}
|
||||
if commentType == GET_BAD_COMMENTS_TYPE {
|
||||
sql += " AND status = ?"
|
||||
@@ -634,7 +634,6 @@ func TmpGetJxBadCommentsByStoreId(ctx *jxcontext.Context, storeID, pageNo, pageS
|
||||
}
|
||||
sql += " ORDER BY createtime DESC"
|
||||
pageSize = jxutils.FormalizePageSize(pageSize)
|
||||
offset := (pageNo - 1) * pageSize
|
||||
if offset < 0 {
|
||||
offset = 0
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user