Skip to content

Hw12#15

Open
ArchieSW wants to merge 3 commits intohw11from
hw12
Open

Hw12#15
ArchieSW wants to merge 3 commits intohw11from
hw12

Conversation

@ArchieSW
Copy link
Owner

No description provided.

@ArchieSW ArchieSW changed the base branch from main to hw11 June 26, 2023 19:09
@ArchieSW ArchieSW self-assigned this Jun 26, 2023
handymanService.delete(id);
}

@PostMapping("/order/{innerId}")
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

не соотносится с методологией REST

import java.util.UUID;

public interface HandymanRepository extends MongoRepository<Handyman, String> {
boolean existsByInnerId(UUID innerId);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Лучше добавить чуть больше контекста в наименования


public void evaluateTheOrder(OrderDto orderDto) {
log.info("По данному запросу копателей не нашлось. Измените объем работ.");
// по-хорошему тут нужно держать соединение с клиентом, но представим, что мы его уведомили
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Таких комментариев тут не должно быть

public void evaluateTheOrder(OrderDto orderDto) {
log.info("По данному запросу копателей не нашлось. Измените объем работ.");
// по-хорошему тут нужно держать соединение с клиентом, но представим, что мы его уведомили
Random random = new Random();
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Лучше вынести на уровень класса

gardenerService.delete(id);
}

@PostMapping("/notify/missingWorkers")
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

не соответствует методологии REST

foundHandymen.add(handyman);
}
});
return foundHandymen.stream().limit(3).toList();
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

число вынести в константу


@Transactional
public void resolve() {
Optional<Order> firstCreatedOrder = orderRepository.findFirstCreatedOrder();
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

лучше сделать select for share

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants