import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.RestController; import java.util.*; @RestController public class CheckoutController { @GetMapping("/checkout") public Map checkout( @RequestParam String products, @RequestParam(required = false) String coupon) { // Parse products Map productQuantities = new HashMap<>(); for (String productEntry : products.split(",")) { String[] parts = productEntry.split(":"); productQuantities.put( parts[0], // Product ID Integer.parseInt(parts[1]) // Quantity ); } // Build result Map result = new HashMap<>(); result.put("products", productQuantities); result.put("coupon", coupon != null ? coupon : "No coupon applied"); return result; } }
top of page

Profile

Join date: Dec 29, 2017

Overview

First Name
Hannah

Posts (34)

Jan 27, 20261 min
Grandma Wanda’s Pecan Tassies Recipe
My grandma Wanda used to make us this recipe every Christmas and I love them. I’m not going to pretend that they are in any way healthy. But they are definitely delicious. I hope you enjoy them ❤️ Dough: 1 Cup butter. (room temperature) 8 Ounces cream cheese. (room temperature) 2 Cups flour. Filling: 1 Egg. 3/4 Cups packed brown sugar. 2 Tbs melted butter. 1/2 Tsp vanilla extract. Dash of salt. Chopped pecans (around 1/2 cup but add more or less based on personal preference) Directions: Mix...

6
0
1
Jan 9, 20264 min
Discover the Benefits of Mom Support Groups
Bringing a new life into the world is one of the most beautiful experiences, but it can also be overwhelming. If you’ve ever felt a wave of sadness, anxiety, or exhaustion after giving birth, you’re not alone. Many women face these feelings, and that’s where mom support groups come in. Today I want to share with you why support groups can be a game-changer for new moms navigating the emotional ups and downs of motherhood.

3
0
Feb 7, 20251 min
Banana Bread Recipe
don’t worry I won’t bore you with a long story no one will read. Here is the recipe 🤣👇🏻 Ingredients 3 bananas, mashed 1/2 cup avocado oil (or oil of choice) 1 cup granulated sugar 2 eggs 1 tsp cinnamon 1 tsp vanilla 1 3/4 cups flour 1 tsp baking soda 1/2 tsp baking powder 1/2 tsp salt Instructions Preheat oven to 325 degrees. Add the mashed bananas, oil, granulated sugar, eggs, cinnamon, and vanilla to a large bowl. Whisk until everything is well combined. Add the flour, baking soda,...

57
0
1

Hannah Wilson

Admin
More actions
  • Facebook Social Icon
  • YouTube Social  Icon
  • Instagram

Newsletter Sign Up

Never miss an important update! Dont worry I wont spam! I generally send 1-2 Emails per month.

Name

Email

bottom of page