Skip to content

Hw13#16

Open
ArchieSW wants to merge 2 commits intohw12from
hw13
Open

Hw13#16
ArchieSW wants to merge 2 commits intohw12from
hw13

Conversation

@ArchieSW
Copy link
Owner

No description provided.

public boolean orderAJob(@PathVariable UUID innerId, @RequestBody Order order) {
return handymanService.orderAJob(innerId, order);
@KafkaListener(topics = "handyman.notify.order")
public void orderAJob(SendOrderToUser orderToUser) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

лучше вынести в отдельный класс и пакет kafka.consumer


private final HandymanClient handymanClient;
private final OrderClient orderClient;
private final KafkaTemplate<String, Object> kafkaTemplate;
Copy link
Collaborator

Choose a reason for hiding this comment

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

лучше в отдельный класс и пакет kafka.producer

private final HandymanRepository handymanRepository;
private final HandymanClient handymanClient;
private final GardenerClient gardenerClient;
private final KafkaTemplate<String, SendOrderToUser> kafkaTemplate;
Copy link
Collaborator

Choose a reason for hiding this comment

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

лучше в отдельный класс KafkaProducer

Field field = fieldService.getById(orderDto.getFieldId());
Order order = mapCreatingOrderDtoToOrder(orderDto, user, field);
return orderRepository.save(order);
order.setSkills(orderDto.getSkills()
Copy link
Collaborator

Choose a reason for hiding this comment

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

Лучше вынести в приватный метод

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