From 2445d2bc7c399cbe788f8cc712a41524af9d3af8 Mon Sep 17 00:00:00 2001 From: yujinKim Date: Fri, 26 Apr 2024 13:17:57 +0900 Subject: [PATCH 1/2] =?UTF-8?q?fix=20:=20=EC=98=A4=EB=A5=98=20=ED=95=B4?= =?UTF-8?q?=EA=B2=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../book/util/BookServiceUtils.java | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 src/main/java/com/t3t/bookstoreapi/book/util/BookServiceUtils.java diff --git a/src/main/java/com/t3t/bookstoreapi/book/util/BookServiceUtils.java b/src/main/java/com/t3t/bookstoreapi/book/util/BookServiceUtils.java new file mode 100644 index 00000000..bfdb8e7f --- /dev/null +++ b/src/main/java/com/t3t/bookstoreapi/book/util/BookServiceUtils.java @@ -0,0 +1,17 @@ +package com.t3t.bookstoreapi.book.util; + +import java.math.BigDecimal; + +public class BookServiceUtils { + + private BookServiceUtils() { + throw new AssertionError("Utility class should not be instantiated"); + } + + public static BigDecimal calculateDiscountedPrice(BigDecimal originalPrice, BigDecimal discountRate) { + BigDecimal discountPercentage = discountRate.divide(BigDecimal.valueOf(100)); + BigDecimal discountAmount = originalPrice.multiply(discountPercentage); + + return originalPrice.subtract(discountAmount); + } +} \ No newline at end of file From f6698d58b65be97b204fa31008bd0212731106fc Mon Sep 17 00:00:00 2001 From: yujinKim Date: Fri, 26 Apr 2024 15:32:02 +0900 Subject: [PATCH 2/2] =?UTF-8?q?chore:=20workflow=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/maven.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml index f4cc013c..3f39b0f1 100644 --- a/.github/workflows/maven.yml +++ b/.github/workflows/maven.yml @@ -10,9 +10,9 @@ name: Java CI with Maven on: push: - branches: [ "main" ] + branches: [ "develop" ] pull_request: - branches: [ "main" ] + branches: [ "develop" ] jobs: build: