rows,err=db.Conn.Query("SELECT operator_id,notifiable_type,notifiable_id,read,created FROM user_notification WHERE user_id=? ORDER BY created DESC LIMIT ?,?",user.ID,(page-1)*perPage,page*perPage)
rows,err=db.Conn.Query("SELECT operator_id,notifiable_type,notifiable_id,no_title,read,created FROM user_notification WHERE user_id=? ORDER BY created DESC LIMIT ?,?",user.ID,(page-1)*perPage,page*perPage)
}elseiftp==models.NotificationComment{
rows,err=db.Conn.Query("SELECT operator_id,notifiable_type,notifiable_id,read,created FROM user_notification WHERE user_id=? and notifiable_type in ('1','6') ORDER BY created DESC LIMIT ?,?",user.ID,(page-1)*perPage,page*perPage)
rows,err=db.Conn.Query("SELECT operator_id,notifiable_type,notifiable_id,no_title,read,created FROM user_notification WHERE user_id=? and notifiable_type in ('1','6') ORDER BY created DESC LIMIT ?,?",user.ID,(page-1)*perPage,page*perPage)
}else{
rows,err=db.Conn.Query("SELECT operator_id,notifiable_type,notifiable_id,read,created FROM user_notification WHERE user_id=? and notifiable_type=? ORDER BY created DESC LIMIT ?,?",user.ID,tp,(page-1)*perPage,page*perPage)
rows,err=db.Conn.Query("SELECT operator_id,notifiable_type,notifiable_id,no_title,read,created FROM user_notification WHERE user_id=? and notifiable_type=? ORDER BY created DESC LIMIT ?,?",user.ID,tp,(page-1)*perPage,page*perPage)