Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Реализация системы социального рейтинга для сайта #5

Open
RaingGOR opened this issue Aug 31, 2024 · 0 comments
Assignees
Labels
enhancement New feature or request

Comments

@RaingGOR
Copy link
Member

RaingGOR commented Aug 31, 2024

Описание задачи:

Необходимо реализовать систему социального рейтинга для пользователей сайта. Рейтинг пользователя будет складываться из двух составляющих:

  1. Рейтинг статей автора:

    • Если пользователь имеет роль "Автор", его рейтинг будет зависеть от рейтинга его статей.
    • Каждая статья автора будет иметь свой рейтинг, который складывается из количества положительных и отрицательных оценок (лайки/дизлайки).
    • Общий рейтинг статей автора будет вычисляться как сумма всех рейтингов его статей.
  2. Внутренний рейтинг:

    • Внутренний рейтинг можно регулировать вручную через профиль пользователя.
    • В профиле должна быть возможность увеличивать или понижать рейтинг на 1 единицу.
    • Эту возможность должны иметь пользователи с определенными правами (например, администраторы или модераторы).
      image
      Task Description:

It is necessary to implement a social rating system for site users. The user rating will consist of two components:

  1. Author's Article Rating:
  • If the user has the "Author" role, his rating will depend on the rating of his articles.
  • Each author's article will have its own rating, which consists of the number of positive and negative ratings (likes/dislikes).
  • The overall rating of the author's articles will be calculated as the sum of all the ratings of his articles.
  1. Internal Rating:
  • The internal rating can be adjusted manually through the user profile.
  • The profile should have the ability to increase or decrease the rating by 1 unit.
  • Users with certain rights (for example, administrators or moderators) should have this ability.
@RaingGOR RaingGOR added this to InfoHub Aug 31, 2024
@RaingGOR RaingGOR added the enhancement New feature or request label Aug 31, 2024
@RaingGOR RaingGOR moved this to Todo in InfoHub Aug 31, 2024
@RaingGOR RaingGOR pinned this issue Aug 31, 2024
RaingGOR added a commit that referenced this issue Sep 3, 2024
Добавлены тесты
RaingGOR added a commit that referenced this issue Sep 15, 2024
* patch #1 НЕДОДЕЛАНО
Add Role model.

For us ->   * WebSite Moderation :

    HEAD_ADMINISTRATOR,
    ADMINISTRATOR,
    USER

For community blog's ->
   * Community Moderation :

    HEAD_MODERATOR,
    MODERATOR

 Add Security
 Add Community(plug v)
 Add Configs + files for roles

 NEED :"Создаем кастомный сервис проверки ролей"

* patch #2
Refactoring

* patch #3
Отказ от прошлой системы в связи ее нагруженности и неремонтопригодности.

* Изменение ролей
* добавление CRUD
* добавление Security (заглушка)
* добавление кастомных эксепшенов

* patch #4
фиксы с ревью

* patch #5
Добавлены тесты

* patch #6
Фикс бесконечного цикла

* patch #7
Правки по запросу белого кита=)

* patch #8
Слизал с прошлого проекта секьюр.
JWTValidationFilter.java нужно пересмотреть Claims, хрен что знает как эта хренобесина работает

* patch #8
Добавил пагинацию

* patch #9
возвращение к истокам

* patch #10 УРАА + РЕГИСТРАЦИЯ

* Добавление регистрации через Oauth2

* patch #11

* Теперь что бы получить профиль можно просто спросить через getCurrentUser
RaingGOR added a commit that referenced this issue Sep 30, 2024
* patch #1 Add Domain Article
* create domain Article, Comment
* Update User
* Update migrations

* patch #2 Add Service Article and fix anything
* fix domain Article, User,UserDTO
* Create ArticleDT,ArticleService, ArticleNotFoundException
* Update GlobalExceptionHandler, V.0.0.1__init_db.sql, UserConvertor

* patch #3 Controller
* fix UserController
* delete deprecated method (delete User)
* create ArticleController, pagination
* update ArticleService

* patch #4 Проверка на вшивость
* add check user Author or not

* patch #5 добавление тест контроллера против вшивых

* patch #6 проверка на администратора

* patch #7 убрал тестовую хрень
RaingGOR added a commit that referenced this issue Oct 5, 2024
RaingGOR added a commit that referenced this issue Oct 8, 2024
* patch #1 Add Domain Article
* create domain Article, Comment
* Update User
* Update migrations

* patch #2 Add Service Article and fix anything
* fix domain Article, User,UserDTO
* Create ArticleDT,ArticleService, ArticleNotFoundException
* Update GlobalExceptionHandler, V.0.0.1__init_db.sql, UserConvertor

* patch #3 Controller
* fix UserController
* delete deprecated method (delete User)
* create ArticleController, pagination
* update ArticleService

* patch #4 Проверка на вшивость
* add check user Author or not

* patch #5 добавление тест контроллера против вшивых

* patch #6 проверка на администратора

* patch #7 убрал тестовую хрень

* patch #1 Добавление фич
* add CommentNotFoundException,
CommentRepository, CommentRepository

* clean code SecurityAuthorizationManager,
SecurityConfig

* fix GlobalExceptionHandler,
UserNotAuthorArticleException

* Delete src/main/resources/application.yaml

* patch #2 Major update commentary system

* updated CommentService, CommentController, GlobalExceptionHandler

* more clean code and more

* patch #3 fix patch

* patch #4 upgrade exception system

* patch #4 create tests for commentary system

* patch #5 CleanUp Code

* patch #6 update migrations
@RaingGOR RaingGOR self-assigned this Oct 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: Todo
Development

No branches or pull requests

1 participant