Skip to content

Commit 7a38ac3

Browse files
committed
orderservice
1 parent 6f32108 commit 7a38ac3

File tree

21 files changed

+6
-2
lines changed

21 files changed

+6
-2
lines changed
Binary file not shown.

microservices-frontend/src/app/pages/home-page/home-page.component.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,9 @@ export class HomePageComponent implements OnInit {
5555
firstName: result.userData.firstName,
5656
lastName: result.userData.lastName
5757
};
58+
console.log("email : ",result.userData.email);
59+
console.log("firstname : ",userDetails.firstName);
60+
console.log("firstname : ",result.userData.firstName);
5861

5962
if(!quantity) {
6063
this.orderFailed = true;

order-service/mysql/#ib_16384_0.dblwr

0 Bytes
Binary file not shown.
0 Bytes
Binary file not shown.
0 Bytes
Binary file not shown.

order-service/mysql/binlog.000011

2.62 KB
Binary file not shown.

order-service/mysql/ibdata1

0 Bytes
Binary file not shown.

order-service/mysql/mysql.ibd

0 Bytes
Binary file not shown.
0 Bytes
Binary file not shown.

order-service/mysql/undo_001

0 Bytes
Binary file not shown.

order-service/mysql/undo_002

0 Bytes
Binary file not shown.

order-service/src/main/java/com/nipundas/microservices/order/controller/OrderController.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ public class OrderController {
1616

1717
private final OrderService orderService;
1818

19-
2019
@PostMapping
2120
@ResponseStatus(HttpStatus.CREATED)
2221
public String placeOrder(@RequestBody OrderRequest orderRequest){

order-service/src/main/java/com/nipundas/microservices/order/service/OrderService.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ public void placeOrder(OrderRequest orderRequest) {
3131
order.setPrice(orderRequest.price().multiply(BigDecimal.valueOf(orderRequest.quantity())));
3232
order.setSkuCode(orderRequest.skuCode());
3333
order.setQuantity(orderRequest.quantity());
34+
3435
orderRepository.save(order);
3536

3637
// Send the message to Kafka Topic
@@ -39,6 +40,7 @@ public void placeOrder(OrderRequest orderRequest) {
3940
orderPlacedEvent.setEmail(orderRequest.userDetails().email());
4041
orderPlacedEvent.setFirstName(orderRequest.userDetails().firstName());
4142
orderPlacedEvent.setLastName(orderRequest.userDetails().lastName());
43+
System.out.println(orderPlacedEvent.getFirstName());
4244
log.info("Start - Sending OrderPlacedEvent {} to Kafka topic order-placed", orderPlacedEvent);
4345
kafkaTemplate.send("order-placed", orderPlacedEvent);
4446
log.info("End - Sending OrderPlacedEvent {} to Kafka topic order-placed", orderPlacedEvent);

0 commit comments

Comments
 (0)