Retail Store Discount. Steps to Run the App.
-
mvn install {Create Jar file}
-
java -jar target/retailsales-0.0.1-SNAPSHOT.jar {Run the jar file}
-
Access the application using 8080 port host is localhost.
-
Creating User. Method Post http://localhost:8080/user/add { "userid":0, "username":"Prakash", "role":"Employee", "createddate":"2019-08-30T06:36:35.000+0000", "password":"abc" }
-
Adding Products Method Post Add first Product http://localhost:8080/products/add { "id":0, "itemname":"Coalgate", "itemqty":5, "itemprice":"20", "itemtype":"GROCERY" } Add Second Product http://localhost:8080/products/add { "id":0, "itemname":"EGG", "itemqty":10, "itemprice":"10", "itemtype":"FOOD" }
-
Add to Cart Method Post http://localhost:8080/cart/add { "id":0, "userid":1, "productid":1 } Add two products to cart by passing product id. http://localhost:8080/cart/add { "id":0, "userid":1, "productid":2 }
7.Appling Discount Method Get http://localhost:8080/bill/applydiscount/{UserId} http://localhost:8080/bill/applydiscount/1