WH01243 1 жил өмнө
parent
commit
5ebc9e5194

+ 1 - 2
service/message_mail_box.go

@@ -244,7 +244,6 @@ func (b MessaggeService) UserList(in *messagecenter.UserReq) (data *[]map[string
 			in.Size = 50
 		}
 		pageIndex := (in.Page - 1) * in.Size
-		pageEnd := in.Page * in.Size
 		sqlStr = fmt.Sprintf(`SELECT 
     				(
 						CASE
@@ -271,7 +270,7 @@ func (b MessaggeService) UserList(in *messagecenter.UserReq) (data *[]map[string
 	   				(%s) a
 				LEFT JOIN socialize_message c ON ( a.message_id = c.id )
 			ORDER BY
-			a.timestamp DESC limit %v ,%v`, restrictionSql, pageIndex, pageEnd)
+			a.timestamp DESC limit %v ,%v`, restrictionSql, pageIndex, in.Size)
 		countStr = fmt.Sprintf(`SELECT  count(1)
    				FROM
 	   				(%s) a