diff --git a/cart-service/.DS_Store b/cart-service/.DS_Store index 4e319a4e..2bfcd482 100644 Binary files a/cart-service/.DS_Store and b/cart-service/.DS_Store differ diff --git a/cart-service/.gradle/7.1/dependencies-accessors/93689cd522c269a60faa7da7bd5224d9051d95a4/sources/org/gradle/accessors/dm/LibrariesForLibs.java b/cart-service/.gradle/7.1/dependencies-accessors/93689cd522c269a60faa7da7bd5224d9051d95a4/sources/org/gradle/accessors/dm/LibrariesForLibs.java deleted file mode 100644 index e1ea6794..00000000 --- a/cart-service/.gradle/7.1/dependencies-accessors/93689cd522c269a60faa7da7bd5224d9051d95a4/sources/org/gradle/accessors/dm/LibrariesForLibs.java +++ /dev/null @@ -1,237 +0,0 @@ -package org.gradle.accessors.dm; - -import org.gradle.api.NonNullApi; -import org.gradle.api.artifacts.MinimalExternalModuleDependency; -import org.gradle.api.artifacts.ExternalModuleDependencyBundle; -import org.gradle.api.artifacts.MutableVersionConstraint; -import org.gradle.api.provider.Provider; -import org.gradle.api.provider.ProviderFactory; -import org.gradle.api.internal.catalog.AbstractExternalDependencyFactory; -import org.gradle.api.internal.catalog.DefaultVersionCatalog; -import java.util.Map; -import javax.inject.Inject; - -/** - * A catalog of dependencies accessible via the `libs` extension. -*/ -@NonNullApi -public class LibrariesForLibs extends AbstractExternalDependencyFactory { - - private final AbstractExternalDependencyFactory owner = this; - private final ApacheLibraryAccessors laccForApacheLibraryAccessors = new ApacheLibraryAccessors(owner); - private final CloudLibraryAccessors laccForCloudLibraryAccessors = new CloudLibraryAccessors(owner); - private final JavaLibraryAccessors laccForJavaLibraryAccessors = new JavaLibraryAccessors(owner); - private final RedisLibraryAccessors laccForRedisLibraryAccessors = new RedisLibraryAccessors(owner); - private final SpringLibraryAccessors laccForSpringLibraryAccessors = new SpringLibraryAccessors(owner); - private final VersionAccessors vaccForVersionAccessors = new VersionAccessors(providers, config); - private final BundleAccessors baccForBundleAccessors = new BundleAccessors(providers, config); - - @Inject - public LibrariesForLibs(DefaultVersionCatalog config, ProviderFactory providers) { - super(config, providers); - } - - /** - * Creates a dependency provider for h2 (com.h2database:h2) - * This dependency was declared in catalog libs.versions.toml - */ - public Provider getH2() { return create("h2"); } - - /** - * Creates a dependency provider for hibernate (org.hibernate:hibernate-core) - * This dependency was declared in catalog libs.versions.toml - */ - public Provider getHibernate() { return create("hibernate"); } - - /** - * Creates a dependency provider for jpa (org.springframework.boot:spring-boot-starter-data-jpa) - * This dependency was declared in catalog libs.versions.toml - */ - public Provider getJpa() { return create("jpa"); } - - /** - * Creates a dependency provider for json (com.fasterxml.jackson.core:jackson-annotations) - * This dependency was declared in catalog libs.versions.toml - */ - public Provider getJson() { return create("json"); } - - /** - * Creates a dependency provider for jwt (io.jsonwebtoken:jjwt) - * This dependency was declared in catalog libs.versions.toml - */ - public Provider getJwt() { return create("jwt"); } - - /** - * Creates a dependency provider for lombok (org.projectlombok:lombok) - * This dependency was declared in catalog libs.versions.toml - */ - public Provider getLombok() { return create("lombok"); } - - /** - * Creates a dependency provider for mysql (mysql:mysql-connector-java) - * This dependency was declared in catalog libs.versions.toml - */ - public Provider getMysql() { return create("mysql"); } - - /** - * Creates a dependency provider for sl4j (org.slf4j:slf4j-api) - * This dependency was declared in catalog libs.versions.toml - */ - public Provider getSl4j() { return create("sl4j"); } - - /** - * Returns the group of libraries at apache - */ - public ApacheLibraryAccessors getApache() { return laccForApacheLibraryAccessors; } - - /** - * Returns the group of libraries at cloud - */ - public CloudLibraryAccessors getCloud() { return laccForCloudLibraryAccessors; } - - /** - * Returns the group of libraries at java - */ - public JavaLibraryAccessors getJava() { return laccForJavaLibraryAccessors; } - - /** - * Returns the group of libraries at redis - */ - public RedisLibraryAccessors getRedis() { return laccForRedisLibraryAccessors; } - - /** - * Returns the group of libraries at spring - */ - public SpringLibraryAccessors getSpring() { return laccForSpringLibraryAccessors; } - - /** - * Returns the group of versions at versions - */ - public VersionAccessors getVersions() { return vaccForVersionAccessors; } - - /** - * Returns the group of bundles at bundles - */ - public BundleAccessors getBundles() { return baccForBundleAccessors; } - - public static class ApacheLibraryAccessors extends SubDependencyFactory { - - public ApacheLibraryAccessors(AbstractExternalDependencyFactory owner) { super(owner); } - - /** - * Creates a dependency provider for avro (org.apache.avro:avro) - * This dependency was declared in catalog libs.versions.toml - */ - public Provider getAvro() { return create("apache-avro"); } - - } - - public static class CloudLibraryAccessors extends SubDependencyFactory { - - public CloudLibraryAccessors(AbstractExternalDependencyFactory owner) { super(owner); } - - /** - * Creates a dependency provider for ver ('org.springframework.cloud:spring-cloud-dependencies') - * This dependency was declared in catalog libs.versions.toml - */ - public Provider getVer() { return create("cloud-ver"); } - - } - - public static class JavaLibraryAccessors extends SubDependencyFactory { - - public JavaLibraryAccessors(AbstractExternalDependencyFactory owner) { super(owner); } - - /** - * Creates a dependency provider for validation (javax.validation:validation-api) - * This dependency was declared in catalog libs.versions.toml - */ - public Provider getValidation() { return create("java-validation"); } - - } - - public static class RedisLibraryAccessors extends SubDependencyFactory { - - public RedisLibraryAccessors(AbstractExternalDependencyFactory owner) { super(owner); } - - /** - * Creates a dependency provider for client (redis.clients:jedis) - * This dependency was declared in catalog libs.versions.toml - */ - public Provider getClient() { return create("redis-client"); } - - } - - public static class SpringLibraryAccessors extends SubDependencyFactory { - - public SpringLibraryAccessors(AbstractExternalDependencyFactory owner) { super(owner); } - - /** - * Creates a dependency provider for boot (org.springframework.boot:spring-boot-starter-web) - * This dependency was declared in catalog libs.versions.toml - */ - public Provider getBoot() { return create("spring-boot"); } - - /** - * Creates a dependency provider for fegin (org.springframework.cloud:spring-cloud-starter-openfeign) - * This dependency was declared in catalog libs.versions.toml - */ - public Provider getFegin() { return create("spring-fegin"); } - - /** - * Creates a dependency provider for feign (org.springframework.cloud:spring-cloud-starter-openfeign) - * This dependency was declared in catalog libs.versions.toml - */ - public Provider getFeign() { return create("spring-feign"); } - - /** - * Creates a dependency provider for kafka (org.springframework.kafka:spring-kafka) - * This dependency was declared in catalog libs.versions.toml - */ - public Provider getKafka() { return create("spring-kafka"); } - - /** - * Creates a dependency provider for oauth (org.springframework.security:spring-security-oauth2-client) - * This dependency was declared in catalog libs.versions.toml - */ - public Provider getOauth() { return create("spring-oauth"); } - - /** - * Creates a dependency provider for redis (org.springframework.data:spring-data-redis) - * This dependency was declared in catalog libs.versions.toml - */ - public Provider getRedis() { return create("spring-redis"); } - - /** - * Creates a dependency provider for security (org.springframework.boot:spring-boot-starter-security) - * This dependency was declared in catalog libs.versions.toml - */ - public Provider getSecurity() { return create("spring-security"); } - - /** - * Creates a dependency provider for test (org.springframework.boot:spring-boot-starter-test) - * This dependency was declared in catalog libs.versions.toml - */ - public Provider getTest() { return create("spring-test"); } - - /** - * Creates a dependency provider for web (org.springframework:spring-web) - * This dependency was declared in catalog libs.versions.toml - */ - public Provider getWeb() { return create("spring-web"); } - - } - - public static class VersionAccessors extends VersionFactory { - - public VersionAccessors(ProviderFactory providers, DefaultVersionCatalog config) { super(providers, config); } - - } - - public static class BundleAccessors extends BundleFactory { - - public BundleAccessors(ProviderFactory providers, DefaultVersionCatalog config) { super(providers, config); } - - } - -} diff --git a/cart-service/.gradle/7.1/dependencies-accessors/dependencies-accessors.lock b/cart-service/.gradle/7.1/dependencies-accessors/dependencies-accessors.lock deleted file mode 100644 index e69de29b..00000000 diff --git a/cart-service/.gradle/7.1/dependencies-accessors/executionHistory.bin b/cart-service/.gradle/7.1/dependencies-accessors/executionHistory.bin deleted file mode 100644 index e69de29b..00000000 diff --git a/cart-service/.gradle/7.1/dependencies-accessors/gc.properties b/cart-service/.gradle/7.1/dependencies-accessors/gc.properties deleted file mode 100644 index e69de29b..00000000 diff --git a/cart-service/.gradle/7.1/executionHistory/executionHistory.bin b/cart-service/.gradle/7.1/executionHistory/executionHistory.bin deleted file mode 100644 index e69de29b..00000000 diff --git a/cart-service/.gradle/7.1/executionHistory/executionHistory.lock b/cart-service/.gradle/7.1/executionHistory/executionHistory.lock deleted file mode 100644 index e69de29b..00000000 diff --git a/cart-service/.gradle/7.1/fileChanges/last-build.bin b/cart-service/.gradle/7.1/fileChanges/last-build.bin deleted file mode 100644 index e69de29b..00000000 diff --git a/cart-service/.gradle/7.1/fileHashes/fileHashes.bin b/cart-service/.gradle/7.1/fileHashes/fileHashes.bin deleted file mode 100644 index e69de29b..00000000 diff --git a/cart-service/.gradle/7.1/fileHashes/fileHashes.lock b/cart-service/.gradle/7.1/fileHashes/fileHashes.lock deleted file mode 100644 index e69de29b..00000000 diff --git a/cart-service/.gradle/7.1/fileHashes/resourceHashesCache.bin b/cart-service/.gradle/7.1/fileHashes/resourceHashesCache.bin deleted file mode 100644 index e69de29b..00000000 diff --git a/cart-service/.gradle/7.1/gc.properties b/cart-service/.gradle/7.1/gc.properties deleted file mode 100644 index e69de29b..00000000 diff --git a/cart-service/.gradle/buildOutputCleanup/buildOutputCleanup.lock b/cart-service/.gradle/buildOutputCleanup/buildOutputCleanup.lock deleted file mode 100644 index e69de29b..00000000 diff --git a/cart-service/.gradle/buildOutputCleanup/cache.properties b/cart-service/.gradle/buildOutputCleanup/cache.properties deleted file mode 100644 index c5ba86e6..00000000 --- a/cart-service/.gradle/buildOutputCleanup/cache.properties +++ /dev/null @@ -1,2 +0,0 @@ -#Sat Oct 21 13:24:52 KST 2023 -gradle.version=7.1 diff --git a/cart-service/.gradle/buildOutputCleanup/outputFiles.bin b/cart-service/.gradle/buildOutputCleanup/outputFiles.bin deleted file mode 100644 index e69de29b..00000000 diff --git a/cart-service/.gradle/checksums/checksums.lock b/cart-service/.gradle/checksums/checksums.lock deleted file mode 100644 index e69de29b..00000000 diff --git a/cart-service/.gradle/checksums/md5-checksums.bin b/cart-service/.gradle/checksums/md5-checksums.bin deleted file mode 100644 index e69de29b..00000000 diff --git a/cart-service/.gradle/checksums/sha1-checksums.bin b/cart-service/.gradle/checksums/sha1-checksums.bin deleted file mode 100644 index e69de29b..00000000 diff --git a/cart-service/.gradle/vcs-1/gc.properties b/cart-service/.gradle/vcs-1/gc.properties deleted file mode 100644 index e69de29b..00000000 diff --git a/cart-service/.idea/.gitignore b/cart-service/.idea/.gitignore deleted file mode 100644 index 8bf4d45d..00000000 --- a/cart-service/.idea/.gitignore +++ /dev/null @@ -1,6 +0,0 @@ -# Default ignored files -/shelf/ -/workspace.xml -# Datasource local storage ignored files -/dataSources/ -/dataSources.local.xml diff --git a/cart-service/.idea/checkstyle-idea.xml b/cart-service/.idea/checkstyle-idea.xml deleted file mode 100644 index d8d68524..00000000 --- a/cart-service/.idea/checkstyle-idea.xml +++ /dev/null @@ -1,15 +0,0 @@ - - - - 10.3.4 - JavaOnly - - - \ No newline at end of file diff --git a/cart-service/.idea/compiler.xml b/cart-service/.idea/compiler.xml deleted file mode 100644 index 609bbbd3..00000000 --- a/cart-service/.idea/compiler.xml +++ /dev/null @@ -1,27 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/cart-service/.idea/dataSources.xml b/cart-service/.idea/dataSources.xml deleted file mode 100644 index bf1b1626..00000000 --- a/cart-service/.idea/dataSources.xml +++ /dev/null @@ -1,12 +0,0 @@ - - - - - mysql.8 - true - com.mysql.cj.jdbc.Driver - jdbc:mysql://localhost:3306/cart-service - $ProjectFileDir$ - - - \ No newline at end of file diff --git a/cart-service/.idea/gradle.xml b/cart-service/.idea/gradle.xml deleted file mode 100644 index 4013cba5..00000000 --- a/cart-service/.idea/gradle.xml +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - - \ No newline at end of file diff --git a/cart-service/.idea/jarRepositories.xml b/cart-service/.idea/jarRepositories.xml deleted file mode 100644 index fdc392fe..00000000 --- a/cart-service/.idea/jarRepositories.xml +++ /dev/null @@ -1,20 +0,0 @@ - - - - - - - - - - - \ No newline at end of file diff --git a/cart-service/.idea/jpa-buddy.xml b/cart-service/.idea/jpa-buddy.xml deleted file mode 100644 index d1cdec73..00000000 --- a/cart-service/.idea/jpa-buddy.xml +++ /dev/null @@ -1,7 +0,0 @@ - - - - - \ No newline at end of file diff --git a/cart-service/.idea/misc.xml b/cart-service/.idea/misc.xml deleted file mode 100644 index 85721100..00000000 --- a/cart-service/.idea/misc.xml +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - - - - - - \ No newline at end of file diff --git a/cart-service/.idea/modules/cart-application/cart-service.cart-application.main.iml b/cart-service/.idea/modules/cart-application/cart-service.cart-application.main.iml deleted file mode 100644 index 9e3449c9..00000000 --- a/cart-service/.idea/modules/cart-application/cart-service.cart-application.main.iml +++ /dev/null @@ -1,6 +0,0 @@ - - - - - \ No newline at end of file diff --git a/cart-service/.idea/modules/cart-container/cart-service.cart-container.iml b/cart-service/.idea/modules/cart-container/cart-service.cart-container.iml deleted file mode 100644 index 9e3449c9..00000000 --- a/cart-service/.idea/modules/cart-container/cart-service.cart-container.iml +++ /dev/null @@ -1,6 +0,0 @@ - - - - - \ No newline at end of file diff --git a/cart-service/.idea/modules/cart-container/cart-service.cart-container.main.iml b/cart-service/.idea/modules/cart-container/cart-service.cart-container.main.iml deleted file mode 100644 index 9e3449c9..00000000 --- a/cart-service/.idea/modules/cart-container/cart-service.cart-container.main.iml +++ /dev/null @@ -1,6 +0,0 @@ - - - - - \ No newline at end of file diff --git a/cart-service/.idea/modules/cart-dataaccess/cart-service.cart-dataaccess.main.iml b/cart-service/.idea/modules/cart-dataaccess/cart-service.cart-dataaccess.main.iml deleted file mode 100644 index 9e3449c9..00000000 --- a/cart-service/.idea/modules/cart-dataaccess/cart-service.cart-dataaccess.main.iml +++ /dev/null @@ -1,6 +0,0 @@ - - - - - \ No newline at end of file diff --git a/cart-service/.idea/modules/cart-domain/cart-domain-application/cart-service.cart-domain.cart-domain-application.main.iml b/cart-service/.idea/modules/cart-domain/cart-domain-application/cart-service.cart-domain.cart-domain-application.main.iml deleted file mode 100644 index 9e3449c9..00000000 --- a/cart-service/.idea/modules/cart-domain/cart-domain-application/cart-service.cart-domain.cart-domain-application.main.iml +++ /dev/null @@ -1,6 +0,0 @@ - - - - - \ No newline at end of file diff --git a/cart-service/.idea/modules/cart-domain/cart-domain-core/cart-service.cart-domain.cart-domain-core.main.iml b/cart-service/.idea/modules/cart-domain/cart-domain-core/cart-service.cart-domain.cart-domain-core.main.iml deleted file mode 100644 index 9e3449c9..00000000 --- a/cart-service/.idea/modules/cart-domain/cart-domain-core/cart-service.cart-domain.cart-domain-core.main.iml +++ /dev/null @@ -1,6 +0,0 @@ - - - - - \ No newline at end of file diff --git a/cart-service/.idea/modules/cart-message/cart-service.cart-message.main.iml b/cart-service/.idea/modules/cart-message/cart-service.cart-message.main.iml deleted file mode 100644 index 9e3449c9..00000000 --- a/cart-service/.idea/modules/cart-message/cart-service.cart-message.main.iml +++ /dev/null @@ -1,6 +0,0 @@ - - - - - \ No newline at end of file diff --git a/cart-service/.idea/modules/cart-service.iml b/cart-service/.idea/modules/cart-service.iml deleted file mode 100644 index 9e3449c9..00000000 --- a/cart-service/.idea/modules/cart-service.iml +++ /dev/null @@ -1,6 +0,0 @@ - - - - - \ No newline at end of file diff --git a/cart-service/.idea/modules/common/cart-service.common.iml b/cart-service/.idea/modules/common/cart-service.common.iml deleted file mode 100644 index 9e3449c9..00000000 --- a/cart-service/.idea/modules/common/cart-service.common.iml +++ /dev/null @@ -1,6 +0,0 @@ - - - - - \ No newline at end of file diff --git a/cart-service/.idea/modules/common/cart-service.common.main.iml b/cart-service/.idea/modules/common/cart-service.common.main.iml deleted file mode 100644 index 9e3449c9..00000000 --- a/cart-service/.idea/modules/common/cart-service.common.main.iml +++ /dev/null @@ -1,6 +0,0 @@ - - - - - \ No newline at end of file diff --git a/cart-service/.idea/modules/common/common-application/cart-service.common.common-application.iml b/cart-service/.idea/modules/common/common-application/cart-service.common.common-application.iml deleted file mode 100644 index 9e3449c9..00000000 --- a/cart-service/.idea/modules/common/common-application/cart-service.common.common-application.iml +++ /dev/null @@ -1,6 +0,0 @@ - - - - - \ No newline at end of file diff --git a/cart-service/.idea/modules/common/common-application/cart-service.common.common-application.main.iml b/cart-service/.idea/modules/common/common-application/cart-service.common.common-application.main.iml deleted file mode 100644 index 9e3449c9..00000000 --- a/cart-service/.idea/modules/common/common-application/cart-service.common.common-application.main.iml +++ /dev/null @@ -1,6 +0,0 @@ - - - - - \ No newline at end of file diff --git a/cart-service/.idea/modules/common/common-domain/cart-service.common.common-domain.main.iml b/cart-service/.idea/modules/common/common-domain/cart-service.common.common-domain.main.iml deleted file mode 100644 index 9e3449c9..00000000 --- a/cart-service/.idea/modules/common/common-domain/cart-service.common.common-domain.main.iml +++ /dev/null @@ -1,6 +0,0 @@ - - - - - \ No newline at end of file diff --git a/cart-service/.idea/sonarlint/issuestore/0/5/05efc8b1657769a27696d478ded1e95f38737233 b/cart-service/.idea/sonarlint/issuestore/0/5/05efc8b1657769a27696d478ded1e95f38737233 deleted file mode 100644 index e69de29b..00000000 diff --git a/cart-service/.idea/sonarlint/issuestore/0/8/084812c09b7a0227a95fe39812befd820f8883a3 b/cart-service/.idea/sonarlint/issuestore/0/8/084812c09b7a0227a95fe39812befd820f8883a3 deleted file mode 100644 index e69de29b..00000000 diff --git a/cart-service/.idea/sonarlint/issuestore/0/d/0d6c3ae5fe39c6a6e4364d66e49cec7ab7f95e67 b/cart-service/.idea/sonarlint/issuestore/0/d/0d6c3ae5fe39c6a6e4364d66e49cec7ab7f95e67 deleted file mode 100644 index e69de29b..00000000 diff --git a/cart-service/.idea/sonarlint/issuestore/0/f/0f08f94c107a335dc5f2d027a329ff03263f85b5 b/cart-service/.idea/sonarlint/issuestore/0/f/0f08f94c107a335dc5f2d027a329ff03263f85b5 deleted file mode 100644 index e69de29b..00000000 diff --git a/cart-service/.idea/sonarlint/issuestore/1/4/142f22bc0c667c977f862a3d31468b80369adef8 b/cart-service/.idea/sonarlint/issuestore/1/4/142f22bc0c667c977f862a3d31468b80369adef8 deleted file mode 100644 index e69de29b..00000000 diff --git a/cart-service/.idea/sonarlint/issuestore/1/5/156b1fd1f8d453bb2030501e0f2c67ebf9bac2ae b/cart-service/.idea/sonarlint/issuestore/1/5/156b1fd1f8d453bb2030501e0f2c67ebf9bac2ae deleted file mode 100644 index e69de29b..00000000 diff --git a/cart-service/.idea/sonarlint/issuestore/2/1/21553f3e203ad0f6c6a497060eb5d4e497670e69 b/cart-service/.idea/sonarlint/issuestore/2/1/21553f3e203ad0f6c6a497060eb5d4e497670e69 deleted file mode 100644 index e69de29b..00000000 diff --git a/cart-service/.idea/sonarlint/issuestore/2/2/2271cd982451bf7b678535d4239334c6432b2479 b/cart-service/.idea/sonarlint/issuestore/2/2/2271cd982451bf7b678535d4239334c6432b2479 deleted file mode 100644 index e69de29b..00000000 diff --git a/cart-service/.idea/sonarlint/issuestore/2/9/297529f38228c6112e7423fb07ed34fdae9a87ef b/cart-service/.idea/sonarlint/issuestore/2/9/297529f38228c6112e7423fb07ed34fdae9a87ef deleted file mode 100644 index e69de29b..00000000 diff --git a/cart-service/.idea/sonarlint/issuestore/2/f/2f2faed829fc692748316c1251f4453f2e02b826 b/cart-service/.idea/sonarlint/issuestore/2/f/2f2faed829fc692748316c1251f4453f2e02b826 deleted file mode 100644 index e69de29b..00000000 diff --git a/cart-service/.idea/sonarlint/issuestore/3/3/330b6db9347095375f823637e5c296b6f4628784 b/cart-service/.idea/sonarlint/issuestore/3/3/330b6db9347095375f823637e5c296b6f4628784 deleted file mode 100644 index e69de29b..00000000 diff --git a/cart-service/.idea/sonarlint/issuestore/3/b/3bfc71c60d325a954e65a41e2ae78478a7ce196a b/cart-service/.idea/sonarlint/issuestore/3/b/3bfc71c60d325a954e65a41e2ae78478a7ce196a deleted file mode 100644 index e69de29b..00000000 diff --git a/cart-service/.idea/sonarlint/issuestore/3/c/3cee417b04347627e63df848bf04c298f51e4fe2 b/cart-service/.idea/sonarlint/issuestore/3/c/3cee417b04347627e63df848bf04c298f51e4fe2 deleted file mode 100644 index e69de29b..00000000 diff --git a/cart-service/.idea/sonarlint/issuestore/3/e/3e6487d999e2c83cedf3023690b3da6967bed3c5 b/cart-service/.idea/sonarlint/issuestore/3/e/3e6487d999e2c83cedf3023690b3da6967bed3c5 deleted file mode 100644 index e69de29b..00000000 diff --git a/cart-service/.idea/sonarlint/issuestore/4/3/4386a54c237ffa24f807638525c4f278156e3323 b/cart-service/.idea/sonarlint/issuestore/4/3/4386a54c237ffa24f807638525c4f278156e3323 deleted file mode 100644 index e69de29b..00000000 diff --git a/cart-service/.idea/sonarlint/issuestore/4/5/4528aa482e4bfe3de208cd9ded0519af204c0b96 b/cart-service/.idea/sonarlint/issuestore/4/5/4528aa482e4bfe3de208cd9ded0519af204c0b96 deleted file mode 100644 index e69de29b..00000000 diff --git a/cart-service/.idea/sonarlint/issuestore/5/c/5c23a73f3b1be7d6214194048e5ccd4842575f5c b/cart-service/.idea/sonarlint/issuestore/5/c/5c23a73f3b1be7d6214194048e5ccd4842575f5c deleted file mode 100644 index e69de29b..00000000 diff --git a/cart-service/.idea/sonarlint/issuestore/6/1/6100fca173015033b1d4b748fece03cf3a6001d0 b/cart-service/.idea/sonarlint/issuestore/6/1/6100fca173015033b1d4b748fece03cf3a6001d0 deleted file mode 100644 index e69de29b..00000000 diff --git a/cart-service/.idea/sonarlint/issuestore/6/d/6d044f8fac5e8ce7bb8a3e143b5db2e3971df8a6 b/cart-service/.idea/sonarlint/issuestore/6/d/6d044f8fac5e8ce7bb8a3e143b5db2e3971df8a6 deleted file mode 100644 index e69de29b..00000000 diff --git a/cart-service/.idea/sonarlint/issuestore/7/4/74d274b232efd2c52b7e2bef64f193b2548889b0 b/cart-service/.idea/sonarlint/issuestore/7/4/74d274b232efd2c52b7e2bef64f193b2548889b0 deleted file mode 100644 index e69de29b..00000000 diff --git a/cart-service/.idea/sonarlint/issuestore/7/9/791ed5829b21cc22b2c21ac0a281cc428eb8f125 b/cart-service/.idea/sonarlint/issuestore/7/9/791ed5829b21cc22b2c21ac0a281cc428eb8f125 deleted file mode 100644 index e69de29b..00000000 diff --git a/cart-service/.idea/sonarlint/issuestore/7/9/79b17492ba96bd3ab2c0562cfe05bcbb29e4c700 b/cart-service/.idea/sonarlint/issuestore/7/9/79b17492ba96bd3ab2c0562cfe05bcbb29e4c700 deleted file mode 100644 index e69de29b..00000000 diff --git a/cart-service/.idea/sonarlint/issuestore/8/2/82320fbc9e9968debc988496901f5106256843fd b/cart-service/.idea/sonarlint/issuestore/8/2/82320fbc9e9968debc988496901f5106256843fd deleted file mode 100644 index e69de29b..00000000 diff --git a/cart-service/.idea/sonarlint/issuestore/8/9/8984f0e27f473bb37ff3880586dfc23dd4a6d316 b/cart-service/.idea/sonarlint/issuestore/8/9/8984f0e27f473bb37ff3880586dfc23dd4a6d316 deleted file mode 100644 index e69de29b..00000000 diff --git a/cart-service/.idea/sonarlint/issuestore/8/d/8d395472260faa3750c9f7d046df94d7bba0aaa0 b/cart-service/.idea/sonarlint/issuestore/8/d/8d395472260faa3750c9f7d046df94d7bba0aaa0 deleted file mode 100644 index e69de29b..00000000 diff --git a/cart-service/.idea/sonarlint/issuestore/8/d/8d52031a744dc999cc37d8a523e8a25370f5da28 b/cart-service/.idea/sonarlint/issuestore/8/d/8d52031a744dc999cc37d8a523e8a25370f5da28 deleted file mode 100644 index e69de29b..00000000 diff --git a/cart-service/.idea/sonarlint/issuestore/8/d/8db6954891072554bd8e64777934b1014c97cecc b/cart-service/.idea/sonarlint/issuestore/8/d/8db6954891072554bd8e64777934b1014c97cecc deleted file mode 100644 index e69de29b..00000000 diff --git a/cart-service/.idea/sonarlint/issuestore/9/4/94358aa3e9fd58aa6deecbc9ec1bf17bc3bf4e49 b/cart-service/.idea/sonarlint/issuestore/9/4/94358aa3e9fd58aa6deecbc9ec1bf17bc3bf4e49 deleted file mode 100644 index e69de29b..00000000 diff --git a/cart-service/.idea/sonarlint/issuestore/9/8/9861f7b22d9b4e1a559fc1ec556e9e0438aa0d79 b/cart-service/.idea/sonarlint/issuestore/9/8/9861f7b22d9b4e1a559fc1ec556e9e0438aa0d79 deleted file mode 100644 index e69de29b..00000000 diff --git a/cart-service/.idea/sonarlint/issuestore/9/c/9c3dcb98e459559bcf05e02b7059a90c70db0bdd b/cart-service/.idea/sonarlint/issuestore/9/c/9c3dcb98e459559bcf05e02b7059a90c70db0bdd deleted file mode 100644 index e69de29b..00000000 diff --git a/cart-service/.idea/sonarlint/issuestore/a/8/a8820eda90421ea42f7eabf285e01e8ed2dd1a04 b/cart-service/.idea/sonarlint/issuestore/a/8/a8820eda90421ea42f7eabf285e01e8ed2dd1a04 deleted file mode 100644 index e69de29b..00000000 diff --git a/cart-service/.idea/sonarlint/issuestore/a/9/a94833e05b45346f21c3fa7ddb2e55c0673cbfbd b/cart-service/.idea/sonarlint/issuestore/a/9/a94833e05b45346f21c3fa7ddb2e55c0673cbfbd deleted file mode 100644 index e69de29b..00000000 diff --git a/cart-service/.idea/sonarlint/issuestore/a/e/ae7797aa9c8bc84c1902d5ac3980177c3058c21a b/cart-service/.idea/sonarlint/issuestore/a/e/ae7797aa9c8bc84c1902d5ac3980177c3058c21a deleted file mode 100644 index e69de29b..00000000 diff --git a/cart-service/.idea/sonarlint/issuestore/b/1/b1747c65e8cfc39c26dba5c7a291a4ca8c0c2ef6 b/cart-service/.idea/sonarlint/issuestore/b/1/b1747c65e8cfc39c26dba5c7a291a4ca8c0c2ef6 deleted file mode 100644 index e69de29b..00000000 diff --git a/cart-service/.idea/sonarlint/issuestore/b/3/b3cab90b648878b4456cc6381c709452ba0ac49a b/cart-service/.idea/sonarlint/issuestore/b/3/b3cab90b648878b4456cc6381c709452ba0ac49a deleted file mode 100644 index e69de29b..00000000 diff --git a/cart-service/.idea/sonarlint/issuestore/b/d/bdf61995748ddf41ca90d0bc8959fa804a13ef73 b/cart-service/.idea/sonarlint/issuestore/b/d/bdf61995748ddf41ca90d0bc8959fa804a13ef73 deleted file mode 100644 index e69de29b..00000000 diff --git a/cart-service/.idea/sonarlint/issuestore/b/f/bfcd5a6e7f7dc9eaa09a062ecc89a4033e314def b/cart-service/.idea/sonarlint/issuestore/b/f/bfcd5a6e7f7dc9eaa09a062ecc89a4033e314def deleted file mode 100644 index e69de29b..00000000 diff --git a/cart-service/.idea/sonarlint/issuestore/d/2/d2b2522f2c5916e0ccac45badd6c12d82bc5b69f b/cart-service/.idea/sonarlint/issuestore/d/2/d2b2522f2c5916e0ccac45badd6c12d82bc5b69f deleted file mode 100644 index e69de29b..00000000 diff --git a/cart-service/.idea/sonarlint/issuestore/d/6/d6d23d222ee2f597c94fa358af93bec2f0684ccd b/cart-service/.idea/sonarlint/issuestore/d/6/d6d23d222ee2f597c94fa358af93bec2f0684ccd deleted file mode 100644 index e69de29b..00000000 diff --git a/cart-service/.idea/sonarlint/issuestore/d/6/d6d5025f638c5459761e9da54b9041075143f172 b/cart-service/.idea/sonarlint/issuestore/d/6/d6d5025f638c5459761e9da54b9041075143f172 deleted file mode 100644 index e69de29b..00000000 diff --git a/cart-service/.idea/sonarlint/issuestore/d/7/d7595319a0658be6f1ed500ad590d42e4b28bc4f b/cart-service/.idea/sonarlint/issuestore/d/7/d7595319a0658be6f1ed500ad590d42e4b28bc4f deleted file mode 100644 index e69de29b..00000000 diff --git a/cart-service/.idea/sonarlint/issuestore/d/d/ddc88804956f3ac149b1645606ca9c10eebf26e4 b/cart-service/.idea/sonarlint/issuestore/d/d/ddc88804956f3ac149b1645606ca9c10eebf26e4 deleted file mode 100644 index e69de29b..00000000 diff --git a/cart-service/.idea/sonarlint/issuestore/e/b/eb44c0092f9117e17ae121935b7ad003bda8dfab b/cart-service/.idea/sonarlint/issuestore/e/b/eb44c0092f9117e17ae121935b7ad003bda8dfab deleted file mode 100644 index e69de29b..00000000 diff --git a/cart-service/.idea/sonarlint/issuestore/e/d/ed2a8a3f4922f5b8a620372d6d8280f1b7201407 b/cart-service/.idea/sonarlint/issuestore/e/d/ed2a8a3f4922f5b8a620372d6d8280f1b7201407 deleted file mode 100644 index e69de29b..00000000 diff --git a/cart-service/.idea/sonarlint/issuestore/e/e/eeb252f227c0a5576e9223b43d27688cbe5af11f b/cart-service/.idea/sonarlint/issuestore/e/e/eeb252f227c0a5576e9223b43d27688cbe5af11f deleted file mode 100644 index e69de29b..00000000 diff --git a/cart-service/.idea/sonarlint/issuestore/e/f/efb638f575def7d059dfb0292f437143f948a27f b/cart-service/.idea/sonarlint/issuestore/e/f/efb638f575def7d059dfb0292f437143f948a27f deleted file mode 100644 index e69de29b..00000000 diff --git a/cart-service/.idea/sonarlint/issuestore/f/0/f07866736216be0ee2aba49e392191aeae700a35 b/cart-service/.idea/sonarlint/issuestore/f/0/f07866736216be0ee2aba49e392191aeae700a35 deleted file mode 100644 index e69de29b..00000000 diff --git a/cart-service/.idea/sonarlint/issuestore/f/3/f3137d5e9eef1a13c9cfc3142198f31007ae52cf b/cart-service/.idea/sonarlint/issuestore/f/3/f3137d5e9eef1a13c9cfc3142198f31007ae52cf deleted file mode 100644 index e69de29b..00000000 diff --git a/cart-service/.idea/sonarlint/issuestore/f/5/f565aa3d92714f26c3439c61204e1734e6bc6924 b/cart-service/.idea/sonarlint/issuestore/f/5/f565aa3d92714f26c3439c61204e1734e6bc6924 deleted file mode 100644 index e69de29b..00000000 diff --git a/cart-service/.idea/sonarlint/issuestore/f/6/f640d922efe0720e0e31a9df0f58fa63b9ea5bf3 b/cart-service/.idea/sonarlint/issuestore/f/6/f640d922efe0720e0e31a9df0f58fa63b9ea5bf3 deleted file mode 100644 index e69de29b..00000000 diff --git a/cart-service/.idea/sonarlint/issuestore/f/8/f84e93ef3226b0fa4e0420d6454a74bba04cd8d7 b/cart-service/.idea/sonarlint/issuestore/f/8/f84e93ef3226b0fa4e0420d6454a74bba04cd8d7 deleted file mode 100644 index e69de29b..00000000 diff --git a/cart-service/.idea/sonarlint/issuestore/index.pb b/cart-service/.idea/sonarlint/issuestore/index.pb deleted file mode 100644 index b6c31765..00000000 --- a/cart-service/.idea/sonarlint/issuestore/index.pb +++ /dev/null @@ -1,103 +0,0 @@ - -I -gradle/libs.versions.toml,d/7/d7595319a0658be6f1ed500ad590d42e4b28bc4f -£ -scommon/common-domain/src/main/java/com/bit/lotte/fresh/cart/common/domain/event/publisher/DomainEventPublisher.java,9/c/9c3dcb98e459559bcf05e02b7059a90c70db0bdd -• -ecommon/common-domain/src/main/java/com/bit/lotte/fresh/cart/common/domain/instant/AuthHeaderName.java,6/d/6d044f8fac5e8ce7bb8a3e143b5db2e3971df8a6 -˜ -hcommon/common-domain/src/main/java/com/bit/lotte/fresh/cart/common/domain/exception/DomainException.java,8/d/8db6954891072554bd8e64777934b1014c97cecc -– -fcommon/common-domain/src/main/java/com/bit/lotte/fresh/cart/common/domain/instant/DomainConstants.java,b/f/bfcd5a6e7f7dc9eaa09a062ecc89a4033e314def -¨ -xcart-domain/cart-domain-application/src/main/java/com/bit/lotte/fresh/cart/service/port/output/BuyCartItemPublisher.java,8/d/8d395472260faa3750c9f7d046df94d7bba0aaa0 -  -pcart-domain/cart-domain-core/src/main/java/com/bit/lotte/fresh/cart/domain/event/product/ProductDomainEvent.java,0/f/0f08f94c107a335dc5f2d027a329ff03263f85b5 -¨ -xcart-domain/cart-domain-application/src/main/java/com/bit/lotte/fresh/cart/service/dto/response/ProductInfoResponse.java,1/4/142f22bc0c667c977f862a3d31468b80369adef8 -? -settings.gradle,0/5/05efc8b1657769a27696d478ded1e95f38737233 -Ά -…cart-domain/cart-domain-application/src/main/java/com/bit/lotte/fresh/cart/service/port/input/message/UpdateProductStockListener.java,2/f/2f2faed829fc692748316c1251f4453f2e02b826 -– -fcart-message/src/main/java/com/bit/lotte/fresh/cart/message/input/ProductStockUpdatedListenerImpl.java,b/1/b1747c65e8cfc39c26dba5c7a291a4ca8c0c2ef6 -Q -!common/common-domain/build.gradle,f/8/f84e93ef3226b0fa4e0420d6454a74bba04cd8d7 - -`common/common-domain/src/main/java/com/bit/lotte/fresh/cart/common/domain/event/DomainEvent.java,b/3/b3cab90b648878b4456cc6381c709452ba0ac49a -V -&common/common-application/build.gradle,2/1/21553f3e203ad0f6c6a497060eb5d4e497670e69 -™ -icommon/common-application/src/main/java/com/bit/lotte/fresh/cart/common/application/handler/ErrorDTO.java,6/1/6100fca173015033b1d4b748fece03cf3a6001d0 -Y -)cart-domain/cart-domain-core/build.gradle,7/4/74d274b232efd2c52b7e2bef64f193b2548889b0 -I -cart-message/build.gradle,d/6/d6d23d222ee2f597c94fa358af93bec2f0684ccd -§ -wcommon/common-application/src/main/java/com/bit/lotte/fresh/cart/common/application/handler/GlobalExceptionHandler.java,d/2/d2b2522f2c5916e0ccac45badd6c12d82bc5b69f -C -common/build.gradle,5/c/5c23a73f3b1be7d6214194048e5ccd4842575f5c -H -cart-domain/build.gradle,f/3/f3137d5e9eef1a13c9cfc3142198f31007ae52cf -L -cart-dataaccess/build.gradle,d/6/d6d5025f638c5459761e9da54b9041075143f172 -¨ -xcart-domain/cart-domain-core/src/main/java/com/bit/lotte/fresh/cart/domain/event/cart/RemoveCartItemCartDomainEvent.java,f/5/f565aa3d92714f26c3439c61204e1734e6bc6924 -Ή -ˆcart-domain/cart-domain-core/src/main/java/com/bit/lotte/fresh/cart/domain/event/cart/UpdateSelectedQuantityCartItemCartDomainEvent.java,e/b/eb44c0092f9117e17ae121935b7ad003bda8dfab -š -jcart-domain/cart-domain-core/src/main/java/com/bit/lotte/fresh/cart/domain/event/cart/CartDomainEvent.java,7/9/79b17492ba96bd3ab2c0562cfe05bcbb29e4c700 -€ -tcart-domain/cart-domain-core/src/main/java/com/bit/lotte/fresh/cart/domain/event/cart/AddCarItemCartDomainEvent.java,3/b/3bfc71c60d325a954e65a41e2ae78478a7ce196a -‘ -qcart-domain/cart-domain-core/src/main/java/com/bit/lotte/fresh/cart/domain/event/cart/BuyCartItemDomainEvent.java,e/f/efb638f575def7d059dfb0292f437143f948a27f -Ά -…cart-domain/cart-domain-application/src/main/java/com/bit/lotte/fresh/cart/service/dto/command/UpdateCartSelectedQuantityCommand.java,a/8/a8820eda90421ea42f7eabf285e01e8ed2dd1a04 -Ž -^cart-dataaccess/src/main/java/com/bit/lotte/fresh/cart/data/valueobject/CartItemEntityKey.java,3/3/330b6db9347095375f823637e5c296b6f4628784 - -]cart-dataaccess/src/main/java/com/bit/lotte/fresh/cart/data/repository/CartJpaRepository.java,3/c/3cee417b04347627e63df848bf04c298f51e4fe2 -‘ -acart-dataaccess/src/main/java/com/bit/lotte/fresh/cart/data/repository/CartItemJpaRepository.java,a/9/a94833e05b45346f21c3fa7ddb2e55c0673cbfbd -Ž -^cart-domain/cart-domain-core/src/main/java/com/bit/lotte/fresh/cart/domain/ProductService.java,2/9/297529f38228c6112e7423fb07ed34fdae9a87ef -¬ -|cart-domain/cart-domain-application/src/main/java/com/bit/lotte/fresh/cart/service/port/input/ProductApplicationService.java,e/d/ed2a8a3f4922f5b8a620372d6d8280f1b7201407 -₯ -ucart-domain/cart-domain-application/src/main/java/com/bit/lotte/fresh/cart/service/ProductApplicationServiceImpl.java,9/4/94358aa3e9fd58aa6deecbc9ec1bf17bc3bf4e49 -< - build.gradle,f/0/f07866736216be0ee2aba49e392191aeae700a35 -… -Ucart-dataaccess/src/main/java/com/bit/lotte/fresh/cart/data/entity/ProductEntity.java,2/2/2271cd982451bf7b678535d4239334c6432b2479 -œ -lcart-domain/cart-domain-application/src/main/java/com/bit/lotte/fresh/cart/service/mapper/ProductMapper.java,8/2/82320fbc9e9968debc988496901f5106256843fd -M -cart-application/build.gradle,8/9/8984f0e27f473bb37ff3880586dfc23dd4a6d316 -` -0cart-domain/cart-domain-application/build.gradle,8/d/8d52031a744dc999cc37d8a523e8a25370f5da28 -” -dcart-domain/cart-domain-core/src/main/java/com/bit/lotte/fresh/cart/domain/valueobject/Province.java,a/e/ae7797aa9c8bc84c1902d5ac3980177c3058c21a -₯ -ucart-domain/cart-domain-application/src/main/java/com/bit/lotte/fresh/cart/service/dto/command/CartItemIdCommand.java,1/5/156b1fd1f8d453bb2030501e0f2c67ebf9bac2ae - -mcart-domain/cart-domain-application/src/main/java/com/bit/lotte/fresh/cart/service/ProductCommandHandler.java,d/d/ddc88804956f3ac149b1645606ca9c10eebf26e4 -“ -ccommon/common-domain/src/main/java/com/bit/lotte/fresh/cart/common/domain/entity/AggregateRoot.java,f/6/f640d922efe0720e0e31a9df0f58fa63b9ea5bf3 -‘ -qcart-domain/cart-domain-application/src/main/java/com/bit/lotte/fresh/cart/service/config/RedisConfiguration.java,e/e/eeb252f227c0a5576e9223b43d27688cbe5af11f - -mcart-domain/cart-domain-application/src/main/java/com/bit/lotte/fresh/cart/service/util/RedisProductUtil.java,4/5/4528aa482e4bfe3de208cd9ded0519af204c0b96 -K -cart-container/build.gradle,9/8/9861f7b22d9b4e1a559fc1ec556e9e0438aa0d79 -‘ -acommon/common-domain/src/main/java/com/bit/lotte/fresh/cart/common/domain/valueobject/BaseId.java,0/8/084812c09b7a0227a95fe39812befd820f8883a3 -” -dcommon/common-domain/src/main/java/com/bit/lotte/fresh/cart/common/domain/valueobject/ProductId.java,7/9/791ed5829b21cc22b2c21ac0a281cc428eb8f125 - -`common/common-domain/src/main/java/com/bit/lotte/fresh/cart/common/domain/entity/BaseEntity.java,4/3/4386a54c237ffa24f807638525c4f278156e3323 -‹ -[cart-dataaccess/src/main/java/com/bit/lotte/fresh/cart/data/adapter/CartRepositoryImpl.java,b/d/bdf61995748ddf41ca90d0bc8959fa804a13ef73 -‰ -Ycart-dataaccess/src/main/java/com/bit/lotte/fresh/cart/data/mapper/ProductDataMapper.java,0/d/0d6c3ae5fe39c6a6e4364d66e49cec7ab7f95e67 -• -ecommon/common-domain/src/main/java/com/bit/lotte/fresh/cart/common/domain/valueobject/UserCartId.java,3/e/3e6487d999e2c83cedf3023690b3da6967bed3c5 \ No newline at end of file diff --git a/cart-service/.idea/vcs.xml b/cart-service/.idea/vcs.xml deleted file mode 100644 index 288b36b1..00000000 --- a/cart-service/.idea/vcs.xml +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - \ No newline at end of file diff --git a/cart-service/build.gradle b/cart-service/build.gradle deleted file mode 100644 index 3bd7c283..00000000 --- a/cart-service/build.gradle +++ /dev/null @@ -1,49 +0,0 @@ -import org.springframework.boot.gradle.plugin.SpringBootPlugin - -plugins { - id 'org.springframework.boot' version '2.7.16' apply false - id 'io.spring.dependency-management' version '1.0.11.RELEASE' apply false - id 'java' -} - - -group 'com.bit.lotte.fresh.cart' -version '1.0-SNAPSHOT' - -repositories { - mavenCentral() -} - -allprojects { - plugins.apply('org.springframework.boot') - plugins.apply('io.spring.dependency-management') - plugins.apply('java') - - repositories { - mavenCentral() - } - ext { - set('springCloudVersion', "2021.0.3") - } - - dependencies { - implementation(libs.json) - annotationProcessor(libs.sl4j) - compileOnly(libs.sl4j) - compileOnly(libs.lombok) - annotationProcessor(libs.lombok) - testImplementation 'org.junit.jupiter:junit-jupiter-api:5.7.0' - testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.7.0' - - dependencyManagement { - imports { - mavenBom(SpringBootPlugin.BOM_COORDINATES) - mavenBom "org.springframework.cloud:spring-cloud-dependencies:${springCloudVersion}" - } - } - } -} - -test { - useJUnitPlatform() -} \ No newline at end of file diff --git a/cart-service/cart-application/build.gradle b/cart-service/cart-application/build.gradle deleted file mode 100644 index 0de93525..00000000 --- a/cart-service/cart-application/build.gradle +++ /dev/null @@ -1,25 +0,0 @@ -plugins { - id 'java' -} - -group 'org.example' -version '1.0-SNAPSHOT' - -repositories { - mavenCentral() -} - -dependencies { - implementation(libs.java.validation) - implementation project(':common:common-domain') - implementation project(':common:common-application') - implementation project(':cart-domain:cart-domain-core') - implementation project(':cart-domain:cart-domain-application') - implementation 'org.springframework.boot:spring-boot-starter-web' - testImplementation 'org.junit.jupiter:junit-jupiter-api:5.7.0' - testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.7.0' -} - -test { - useJUnitPlatform() -} \ No newline at end of file diff --git a/cart-service/cart-application/build/libs/cart-application-1.0-SNAPSHOT-plain.jar b/cart-service/cart-application/build/libs/cart-application-1.0-SNAPSHOT-plain.jar deleted file mode 100644 index e69de29b..00000000 diff --git a/cart-service/cart-application/build/tmp/compileJava/previous-compilation-data.bin b/cart-service/cart-application/build/tmp/compileJava/previous-compilation-data.bin deleted file mode 100644 index e69de29b..00000000 diff --git a/cart-service/cart-application/build/tmp/jar/MANIFEST.MF b/cart-service/cart-application/build/tmp/jar/MANIFEST.MF deleted file mode 100644 index 58630c02..00000000 --- a/cart-service/cart-application/build/tmp/jar/MANIFEST.MF +++ /dev/null @@ -1,2 +0,0 @@ -Manifest-Version: 1.0 - diff --git a/cart-service/cart-application/src/main/java/com/bit/lotte/fresh/cart/app/exception/CartGlobalExceptionHandler.java b/cart-service/cart-application/src/main/java/com/bit/lotte/fresh/cart/app/exception/CartGlobalExceptionHandler.java deleted file mode 100644 index 9f2e6e6d..00000000 --- a/cart-service/cart-application/src/main/java/com/bit/lotte/fresh/cart/app/exception/CartGlobalExceptionHandler.java +++ /dev/null @@ -1,28 +0,0 @@ -package com.bit.lotte.fresh.cart.app.exception; - -import com.bit.lotte.fresh.cart.common.application.handler.ErrorDTO; -import com.bit.lotte.fresh.cart.domain.excepton.CartDomainException; -import org.springframework.http.HttpStatus; -import org.springframework.web.bind.annotation.ControllerAdvice; -import org.springframework.web.bind.annotation.ExceptionHandler; -import org.springframework.web.bind.annotation.ResponseBody; -import org.springframework.web.bind.annotation.ResponseStatus; -import org.springframework.web.bind.annotation.RestController; -import org.springframework.web.bind.annotation.RestControllerAdvice; - - -@RestControllerAdvice -public class CartGlobalExceptionHandler { - @ExceptionHandler(CartDomainException.class) - @ResponseStatus(HttpStatus.BAD_REQUEST) - @ResponseBody - public ErrorDTO handleCartDomainException( - CartDomainException cartDomainException) { - String exceptionMessage = cartDomainException.getMessage(); - return ErrorDTO.builder() - .code(HttpStatus.BAD_REQUEST.getReasonPhrase()) - .status(HttpStatus.valueOf(400)) - .message(exceptionMessage) - .build(); - } -} diff --git a/cart-service/cart-application/src/main/java/com/bit/lotte/fresh/cart/app/rest/CartRestController.java b/cart-service/cart-application/src/main/java/com/bit/lotte/fresh/cart/app/rest/CartRestController.java deleted file mode 100644 index b508e44c..00000000 --- a/cart-service/cart-application/src/main/java/com/bit/lotte/fresh/cart/app/rest/CartRestController.java +++ /dev/null @@ -1,81 +0,0 @@ -package com.bit.lotte.fresh.cart.app.rest; - - -import com.bit.lotte.fresh.cart.common.domain.valueobject.ProductId; -import com.bit.lotte.fresh.cart.common.domain.valueobject.UserCartId; -import com.bit.lotte.fresh.cart.domain.valueobject.Province; -import com.bit.lotte.fresh.cart.service.dto.command.AddProductInCartCommand; -import com.bit.lotte.fresh.cart.service.dto.command.CartItemIdCommand; -import com.bit.lotte.fresh.cart.service.dto.command.GetMyAllCartItemCommand; -import com.bit.lotte.fresh.cart.service.dto.command.UpdateCartSelectedQuantityCommand; -import com.bit.lotte.fresh.cart.service.dto.response.AddProductInCartResponse; -import com.bit.lotte.fresh.cart.service.dto.response.BuyProductInCartResponse; -import com.bit.lotte.fresh.cart.service.dto.response.GetMyAllCartItemListResponse; -import com.bit.lotte.fresh.cart.service.dto.response.RemoveCartProductResponse; -import com.bit.lotte.fresh.cart.service.dto.response.UpdateCartProductSelectedQuantityResponse; -import com.bit.lotte.fresh.cart.service.port.input.CartApplicationService; -import java.util.List; -import javax.validation.Valid; -import lombok.RequiredArgsConstructor; -import lombok.extern.slf4j.Slf4j; -import org.springframework.http.ResponseEntity; -import org.springframework.web.bind.annotation.DeleteMapping; -import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.PathVariable; -import org.springframework.web.bind.annotation.PostMapping; -import org.springframework.web.bind.annotation.PutMapping; -import org.springframework.web.bind.annotation.RequestBody; -import org.springframework.web.bind.annotation.RequestHeader; -import org.springframework.web.bind.annotation.RestController; - -@Slf4j -@RestController -@RequiredArgsConstructor -public class CartRestController { - - private final CartApplicationService applicationService; - - @GetMapping("/carts") - public ResponseEntity> getMyAllCartItemList( - @RequestHeader Long userId) { - List response = applicationService.getCartItemList( - new GetMyAllCartItemCommand(new UserCartId(userId))); - return ResponseEntity.ok(response); - } - - @PostMapping("/carts") - public ResponseEntity addItemIntoCart( - @Valid @RequestBody AddProductInCartCommand command,@RequestHeader Long userId) { - log.info("userId:" + userId); - log.info("product name:" + command.getProductName()); - AddProductInCartResponse response = applicationService.addProductInCart(new UserCartId(userId),command); - return ResponseEntity.ok(response); - } - - @DeleteMapping("/carts/province/{province}/products/{productId}") - public ResponseEntity removeCartItem( - @PathVariable Province province, - @RequestHeader Long userId, @PathVariable Long productId) { - return ResponseEntity.ok( - applicationService.removeCartProduct( - new CartItemIdCommand(new UserCartId(userId), new ProductId(productId), province))); - } - - @PutMapping("/carts/province/{province}/products/{productId}/stock/{selectedQuantity}") - public ResponseEntity updateSelectedQuantity( - @RequestHeader Long userId, @PathVariable Long productId, - @PathVariable Province province,@PathVariable Integer selectedQuantity) { - return ResponseEntity.ok(applicationService.updateCartProductSelectedQuantity( - new UpdateCartSelectedQuantityCommand(new CartItemIdCommand(new UserCartId(userId),new ProductId(productId),province),selectedQuantity))); - } - - @PostMapping("/carts/province/{province}/product/{productId}") - public ResponseEntity buyProductInCart( - @RequestHeader Long userId, @PathVariable Province province, - @PathVariable Long productId) { - return ResponseEntity.ok(applicationService.buyProductListInCart( - new CartItemIdCommand(new UserCartId(userId), new ProductId(productId), province))); - } - - -} diff --git a/cart-service/cart-application/src/main/java/com/bit/lotte/fresh/cart/app/rest/ProductRestController.java b/cart-service/cart-application/src/main/java/com/bit/lotte/fresh/cart/app/rest/ProductRestController.java deleted file mode 100644 index 4478bc14..00000000 --- a/cart-service/cart-application/src/main/java/com/bit/lotte/fresh/cart/app/rest/ProductRestController.java +++ /dev/null @@ -1,32 +0,0 @@ -package com.bit.lotte.fresh.cart.app.rest; - -import com.bit.lotte.fresh.cart.common.domain.valueobject.ProductId; -import com.bit.lotte.fresh.cart.domain.valueobject.Province; -import com.bit.lotte.fresh.cart.service.dto.command.AddProductInCartCommand; -import com.bit.lotte.fresh.cart.service.dto.command.UpdateCartProductStockCommand; -import com.bit.lotte.fresh.cart.service.dto.response.AddProductInCartResponse; -import com.bit.lotte.fresh.cart.service.dto.response.UpdateCartProductSelectedQuantityResponse; -import com.bit.lotte.fresh.cart.service.dto.response.UpdateProductStockResponse; -import com.bit.lotte.fresh.cart.service.port.input.ProductApplicationService; -import javax.validation.Valid; -import lombok.RequiredArgsConstructor; -import org.springframework.http.ResponseEntity; -import org.springframework.web.bind.annotation.PathVariable; -import org.springframework.web.bind.annotation.PutMapping; -import org.springframework.web.bind.annotation.RequestBody; -import org.springframework.web.bind.annotation.RestController; - -@RequiredArgsConstructor -@RestController -public class ProductRestController { - - private final ProductApplicationService productApplicationService; - - @PutMapping("/carts/province/{province}/products/{productId}/stock/{stockNumber}") - public ResponseEntity updateStock( - @PathVariable Province province, - @PathVariable Long productId, @PathVariable Long stockNumber) { - return ResponseEntity.ok(productApplicationService.updateCartProductStock( - new UpdateCartProductStockCommand(new ProductId(productId), province, stockNumber))); - } -} diff --git a/cart-service/cart-container-1.0-SNAPSHOT.jar b/cart-service/cart-container-1.0-SNAPSHOT.jar deleted file mode 100644 index c7fa2b24..00000000 Binary files a/cart-service/cart-container-1.0-SNAPSHOT.jar and /dev/null differ diff --git a/cart-service/cart-container/build.gradle b/cart-service/cart-container/build.gradle deleted file mode 100644 index 31b342b5..00000000 --- a/cart-service/cart-container/build.gradle +++ /dev/null @@ -1,34 +0,0 @@ -plugins { - id 'org.springframework.boot' - id 'io.spring.dependency-management' - id 'java' -} - -group 'com.bit.lotte.fresh.cart.container' -version '1.0-SNAPSHOT' - -repositories { - mavenCentral() -} - - -dependencies { - implementation(libs.json) - implementation(libs.mysql) - implementation('org.springframework.boot:spring-boot-starter-data-jpa') - implementation project(':common:common-domain') - implementation project(':common:common-application') - implementation project(':cart-message') - implementation project(':cart-application') - implementation project(':cart-domain:cart-domain-core') - implementation project(':cart-domain:cart-domain-application') - implementation project(':cart-dataaccess') - implementation 'org.springframework.boot:spring-boot-starter-data-jpa' - implementation 'org.springframework.boot:spring-boot-starter-web' - testImplementation 'org.junit.jupiter:junit-jupiter-api:5.7.0' - testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.7.0' -} - -test { - useJUnitPlatform() -} \ No newline at end of file diff --git a/cart-service/cart-container/build/bootJarMainClassName b/cart-service/cart-container/build/bootJarMainClassName deleted file mode 100644 index 60243932..00000000 --- a/cart-service/cart-container/build/bootJarMainClassName +++ /dev/null @@ -1 +0,0 @@ -com.bit.lotte.fresh.cart.container.CartApplication \ No newline at end of file diff --git a/cart-service/cart-container/build/libs/cart-container-1.0-SNAPSHOT-plain.jar b/cart-service/cart-container/build/libs/cart-container-1.0-SNAPSHOT-plain.jar deleted file mode 100644 index e69de29b..00000000 diff --git a/cart-service/cart-container/build/resources/main/application.yml b/cart-service/cart-container/build/resources/main/application.yml deleted file mode 100644 index ccdff5eb..00000000 --- a/cart-service/cart-container/build/resources/main/application.yml +++ /dev/null @@ -1,54 +0,0 @@ -#server: -# port: 8085 -#spring: -# redis: -# host: ${DB_IP} -# port: ${REDIS_PORT} -# password: ${DB_PASSWORD} -# datasource: -# url: jdbc:mysql://localhost:3306/cart-service?serverTimezone=Asia/Seoul -# username: root -# password: k1651227 -# jpa: -# hibernate: -# ddl-auto: create -# show-sql: true -# properties: -# hiberante: - - server: - port: 8082 - spring: - redis: - host: ${DB_IP} - port: ${REDIS_PORT} - password: ${DB_PASSWORD} - datasource: - url: jdbc:mysql://${DB_IP}:${CART_DB_PORT}/${CART_DB_SCHEMA}?serverTimeZone=UTC - username: ${DB_USERNAME} - password: ${DB_PASSWORD} - driver-class-name: com.mysql.cj.jdbc.Driver - jpa: - hibernate: - ddl-auto: create - properties: - hibernate: - format_sql: true - # dialect: org.hibernate.dialect.MySQLDialect - - cloud: - config: - import-check: - enabled: false - - eureka: - client: - serviceUrl: - defaultZone: http://eureka-service:8761/eureka/ - - logging: - level: - org.hibernate.SQL: debug - org.hibernate.type: trace - org: - springframework: INFO \ No newline at end of file diff --git a/cart-service/cart-container/build/tmp/bootJar/MANIFEST.MF b/cart-service/cart-container/build/tmp/bootJar/MANIFEST.MF deleted file mode 100644 index 45a8319e..00000000 --- a/cart-service/cart-container/build/tmp/bootJar/MANIFEST.MF +++ /dev/null @@ -1,9 +0,0 @@ -Manifest-Version: 1.0 -Main-Class: org.springframework.boot.loader.JarLauncher -Start-Class: com.bit.lotte.fresh.cart.container.CartApplication -Spring-Boot-Version: 2.7.16 -Spring-Boot-Classes: BOOT-INF/classes/ -Spring-Boot-Lib: BOOT-INF/lib/ -Spring-Boot-Classpath-Index: BOOT-INF/classpath.idx -Spring-Boot-Layers-Index: BOOT-INF/layers.idx - diff --git a/cart-service/cart-container/build/tmp/compileJava/previous-compilation-data.bin b/cart-service/cart-container/build/tmp/compileJava/previous-compilation-data.bin deleted file mode 100644 index e69de29b..00000000 diff --git a/cart-service/cart-container/build/tmp/jar/MANIFEST.MF b/cart-service/cart-container/build/tmp/jar/MANIFEST.MF deleted file mode 100644 index 58630c02..00000000 --- a/cart-service/cart-container/build/tmp/jar/MANIFEST.MF +++ /dev/null @@ -1,2 +0,0 @@ -Manifest-Version: 1.0 - diff --git a/cart-service/cart-container/cart-container-1.0-SNAPSHOT.jar b/cart-service/cart-container/cart-container-1.0-SNAPSHOT.jar deleted file mode 100644 index 0a1a97a2..00000000 Binary files a/cart-service/cart-container/cart-container-1.0-SNAPSHOT.jar and /dev/null differ diff --git a/cart-service/cart-container/src/main/java/com/bit/lotte/fresh/cart/container/CartApplication.java b/cart-service/cart-container/src/main/java/com/bit/lotte/fresh/cart/container/CartApplication.java deleted file mode 100644 index 8b11e79e..00000000 --- a/cart-service/cart-container/src/main/java/com/bit/lotte/fresh/cart/container/CartApplication.java +++ /dev/null @@ -1,25 +0,0 @@ -package com.bit.lotte.fresh.cart.container; - -import org.springframework.boot.SpringApplication; -import org.springframework.boot.autoconfigure.SpringBootApplication; -import org.springframework.boot.autoconfigure.domain.EntityScan; -import org.springframework.context.annotation.ComponentScan; -import org.springframework.data.jpa.repository.config.EnableJpaRepositories; -import org.springframework.transaction.annotation.EnableTransactionManagement; - - -@EnableJpaRepositories(basePackages = {"com.bit.lotte.fresh.cart.data.repository"}) -@EntityScan(basePackages = {"com.bit.lotte.fresh.cart.data.entity"}) -@ComponentScan("com.bit.lotte.fresh.cart.service") -@ComponentScan("com.bit.lotte.fresh.cart.service.config") -@ComponentScan("com.bit.lotte.fresh.cart.service.util") -@ComponentScan("com.bit.lotte.fresh.cart.data") -@ComponentScan("com.bit.lotte.fresh.cart.message") -@SpringBootApplication(scanBasePackages = "com.bit.lotte.fresh.cart.app") -public class CartApplication { - - public static void main(String[] args) { - SpringApplication.run(CartApplication.class, args); - - } -} diff --git a/cart-service/cart-container/src/main/resources/application.yml b/cart-service/cart-container/src/main/resources/application.yml deleted file mode 100644 index ccdff5eb..00000000 --- a/cart-service/cart-container/src/main/resources/application.yml +++ /dev/null @@ -1,54 +0,0 @@ -#server: -# port: 8085 -#spring: -# redis: -# host: ${DB_IP} -# port: ${REDIS_PORT} -# password: ${DB_PASSWORD} -# datasource: -# url: jdbc:mysql://localhost:3306/cart-service?serverTimezone=Asia/Seoul -# username: root -# password: k1651227 -# jpa: -# hibernate: -# ddl-auto: create -# show-sql: true -# properties: -# hiberante: - - server: - port: 8082 - spring: - redis: - host: ${DB_IP} - port: ${REDIS_PORT} - password: ${DB_PASSWORD} - datasource: - url: jdbc:mysql://${DB_IP}:${CART_DB_PORT}/${CART_DB_SCHEMA}?serverTimeZone=UTC - username: ${DB_USERNAME} - password: ${DB_PASSWORD} - driver-class-name: com.mysql.cj.jdbc.Driver - jpa: - hibernate: - ddl-auto: create - properties: - hibernate: - format_sql: true - # dialect: org.hibernate.dialect.MySQLDialect - - cloud: - config: - import-check: - enabled: false - - eureka: - client: - serviceUrl: - defaultZone: http://eureka-service:8761/eureka/ - - logging: - level: - org.hibernate.SQL: debug - org.hibernate.type: trace - org: - springframework: INFO \ No newline at end of file diff --git a/cart-service/cart-dataaccess/build.gradle b/cart-service/cart-dataaccess/build.gradle deleted file mode 100644 index 79e579fe..00000000 --- a/cart-service/cart-dataaccess/build.gradle +++ /dev/null @@ -1,25 +0,0 @@ -plugins { - id 'java' -} - -group 'org.example' -version '1.0-SNAPSHOT' - -repositories { - mavenCentral() -} - -dependencies { - implementation project(':common:common-domain') - implementation project(':common:common-application') - implementation(libs.java.validation) - implementation project(':cart-domain:cart-domain-application') - implementation project(':cart-domain:cart-domain-core') - implementation 'org.springframework.boot:spring-boot-starter-data-jpa' - testImplementation 'org.junit.jupiter:junit-jupiter-api:5.7.0' - testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.7.0' -} - -test { - useJUnitPlatform() -} \ No newline at end of file diff --git a/cart-service/cart-dataaccess/build/libs/cart-dataaccess-1.0-SNAPSHOT-plain.jar b/cart-service/cart-dataaccess/build/libs/cart-dataaccess-1.0-SNAPSHOT-plain.jar deleted file mode 100644 index e69de29b..00000000 diff --git a/cart-service/cart-dataaccess/build/tmp/compileJava/previous-compilation-data.bin b/cart-service/cart-dataaccess/build/tmp/compileJava/previous-compilation-data.bin deleted file mode 100644 index e69de29b..00000000 diff --git a/cart-service/cart-dataaccess/build/tmp/jar/MANIFEST.MF b/cart-service/cart-dataaccess/build/tmp/jar/MANIFEST.MF deleted file mode 100644 index 58630c02..00000000 --- a/cart-service/cart-dataaccess/build/tmp/jar/MANIFEST.MF +++ /dev/null @@ -1,2 +0,0 @@ -Manifest-Version: 1.0 - diff --git a/cart-service/cart-dataaccess/src/main/java/com/bit/lotte/fresh/cart/data/adapter/CartRepositoryImpl.java b/cart-service/cart-dataaccess/src/main/java/com/bit/lotte/fresh/cart/data/adapter/CartRepositoryImpl.java deleted file mode 100644 index a7243d5b..00000000 --- a/cart-service/cart-dataaccess/src/main/java/com/bit/lotte/fresh/cart/data/adapter/CartRepositoryImpl.java +++ /dev/null @@ -1,101 +0,0 @@ -package com.bit.lotte.fresh.cart.data.adapter; - -import com.bit.lotte.fresh.cart.common.domain.valueobject.CartItemCompKey; -import com.bit.lotte.fresh.cart.common.domain.valueobject.ProductId; -import com.bit.lotte.fresh.cart.common.domain.valueobject.UserCartId; -import com.bit.lotte.fresh.cart.data.entity.CartItemEntity; -import com.bit.lotte.fresh.cart.data.entity.ProductEntity; -import com.bit.lotte.fresh.cart.data.mapper.ProductDataMapper; -import com.bit.lotte.fresh.cart.data.repository.CartItemJpaRepository; -import com.bit.lotte.fresh.cart.data.valueobject.CartItemEntityKey; -import com.bit.lotte.fresh.cart.domain.entity.Cart; -import com.bit.lotte.fresh.cart.domain.entity.CartItem; -import com.bit.lotte.fresh.cart.domain.excepton.CartDomainException; -import com.bit.lotte.fresh.cart.domain.valueobject.Province; -import com.bit.lotte.fresh.cart.service.mapper.ProductMapper; -import com.bit.lotte.fresh.cart.service.repository.CartRepository; -import com.bit.lotte.fresh.cart.data.entity.CartEntity; -import com.bit.lotte.fresh.cart.data.mapper.CartDataMapper; -import com.bit.lotte.fresh.cart.data.repository.CartJpaRepository; -import com.bit.lotte.fresh.cart.service.repository.ProductRepository; -import java.util.Optional; -import lombok.RequiredArgsConstructor; -import lombok.extern.slf4j.Slf4j; -import org.springframework.data.jpa.repository.JpaRepository; -import org.springframework.stereotype.Repository; - -@Slf4j -@RequiredArgsConstructor -@Repository -public class CartRepositoryImpl implements CartRepository { - - private final ProductDataMapper productDataMapper; - private final CartItemJpaRepository cartItemJpaRepository; - private final CartJpaRepository cartJpaRepository; - private final CartDataMapper cartDataMapper; - - - private CartItemEntityKey keyConvertor(CartItemCompKey cartItemCompKey) { - return new CartItemEntityKey(cartItemCompKey.getUserCartId().getValue(), - cartItemCompKey.getProductId().getValue()); - - } - - @Override - public Cart findCart(UserCartId id) { - Optional entityOptional = cartJpaRepository.findById(id.getValue()); - if (entityOptional.isEmpty()) { - return null; - } - return cartDataMapper.cartEntityToCart(entityOptional.get()); - } - - @Override - public CartItem addCartItem(UserCartId userCartId, CartItem cartItem) { - Cart cart = findCart(userCartId); - if(cart==null){ - CartEntity cartEntity= new CartEntity(); - cartEntity.setCartUserId(userCartId.getValue()); - cartJpaRepository.save(cartEntity); - } - CartEntity cartEntity = new CartEntity(); - cartEntity.setCartUserId(userCartId.getValue()); - - CartItemEntity cartItemEntity = new CartItemEntity(); - cartItemEntity.setCartEntity(cartEntity); - cartItemEntity.setSelectedQuantity(cartItem.getSelectedQuantity()); - cartItemEntity.setId(keyConvertor(cartItem.getEntityId())); - cartItemEntity.setProduct(productDataMapper.productToProductEntity(cartItem.getProduct())); - CartItemEntity savedCartItem = cartItemJpaRepository.save(cartItemEntity); - return cartDataMapper.cartItemEntityToCartItem(savedCartItem); - - } - - @Override - public CartItem findCartItem(CartItemCompKey cartItemCompKey, Province province) { - Optional entityOptional = cartItemJpaRepository.findByProductProvinceAndId( - province, keyConvertor(cartItemCompKey)); - return entityOptional.map(cartDataMapper::cartItemEntityToCartItem).orElse(null); - } - - @Override - public CartItem updateSelectedQuantity(CartItem cartItem) { - Optional cartItemEntityOptional = cartItemJpaRepository.findById( - keyConvertor(cartItem.getEntityId())); - if (cartItemEntityOptional.isEmpty()) { - throw new CartDomainException("μΉ΄νŠΈμ— ν•΄λ‹Ή μ œν’ˆμ΄ μ‘΄μž¬ν•˜μ§€ μ•ŠμŠ΅λ‹ˆλ‹€."); - } - CartItemEntity cartItemEntity = cartItemEntityOptional.get(); - cartItemEntity.setSelectedQuantity(cartItem.getSelectedQuantity()); - cartItemJpaRepository.save(cartItemEntity); - return cartDataMapper.cartItemEntityToCartItem(cartItemJpaRepository.save(cartItemEntityOptional.get())); - } - - - @Override - public void removeCartItem(CartItem cartItem) { - cartItemJpaRepository.deleteById(keyConvertor(cartItem.getEntityId())); - } - - -} diff --git a/cart-service/cart-dataaccess/src/main/java/com/bit/lotte/fresh/cart/data/adapter/ProductRepositoryImpl.java b/cart-service/cart-dataaccess/src/main/java/com/bit/lotte/fresh/cart/data/adapter/ProductRepositoryImpl.java deleted file mode 100644 index 81746b3b..00000000 --- a/cart-service/cart-dataaccess/src/main/java/com/bit/lotte/fresh/cart/data/adapter/ProductRepositoryImpl.java +++ /dev/null @@ -1,43 +0,0 @@ -package com.bit.lotte.fresh.cart.data.adapter; - -import com.bit.lotte.fresh.cart.common.domain.valueobject.ProductId; -import com.bit.lotte.fresh.cart.domain.entity.Product; -import com.bit.lotte.fresh.cart.domain.excepton.CartDomainException; -import com.bit.lotte.fresh.cart.domain.valueobject.Province; -import com.bit.lotte.fresh.cart.service.repository.ProductRepository; -import com.bit.lotte.fresh.cart.data.entity.ProductEntity; -import com.bit.lotte.fresh.cart.data.mapper.ProductDataMapper; -import com.bit.lotte.fresh.cart.data.repository.ProductJpaRepository; -import java.util.Optional; -import lombok.RequiredArgsConstructor; -import org.springframework.stereotype.Repository; - -@RequiredArgsConstructor -@Repository -public class ProductRepositoryImpl implements ProductRepository { - - private final ProductJpaRepository productJpaRepository; - private final ProductDataMapper productDataMapper; - - @Override - public Product save(Product product) { - productJpaRepository.save(productDataMapper.productToProductEntity(product)); - return product; - } - - @Override - public Product getProduct(ProductId productId, Province province) { - Optional optionalProductEntity = productJpaRepository.findByProductIdAndProvince( - productId.getValue(), province); - return optionalProductEntity.map(productDataMapper::productEntityToProduct).orElse(null); - } - - @Override - public Product updateProductStock(Product product, long stock) { - product.updateStock(stock); - productJpaRepository.save(productDataMapper.productToProductEntity(product)); - return product; - } - - -} diff --git a/cart-service/cart-dataaccess/src/main/java/com/bit/lotte/fresh/cart/data/entity/CartEntity.java b/cart-service/cart-dataaccess/src/main/java/com/bit/lotte/fresh/cart/data/entity/CartEntity.java deleted file mode 100644 index 065ebc5f..00000000 --- a/cart-service/cart-dataaccess/src/main/java/com/bit/lotte/fresh/cart/data/entity/CartEntity.java +++ /dev/null @@ -1,40 +0,0 @@ -package com.bit.lotte.fresh.cart.data.entity; - -import com.bit.lotte.fresh.cart.domain.entity.CartItem; -import com.bit.lotte.fresh.cart.domain.entity.Product; -import java.security.AuthProvider; -import java.time.ZonedDateTime; -import java.util.ArrayList; -import java.util.List; -import javax.persistence.CascadeType; -import javax.persistence.Entity; -import javax.persistence.FetchType; -import javax.persistence.GeneratedValue; -import javax.persistence.GenerationType; -import javax.persistence.Id; -import javax.persistence.OneToMany; -import javax.validation.constraints.NotNull; -import lombok.AllArgsConstructor; -import lombok.Builder; -import lombok.Getter; -import lombok.NoArgsConstructor; -import lombok.RequiredArgsConstructor; -import lombok.Setter; - - -@Builder -@Getter -@Setter -@NoArgsConstructor -@AllArgsConstructor -@Entity -public class CartEntity { - - @Id - @NotNull - private Long cartUserId; - @OneToMany(fetch = FetchType.EAGER, mappedBy = "cartEntity") - @NotNull - private List cartItemEntityList = new ArrayList<>(); - -} diff --git a/cart-service/cart-dataaccess/src/main/java/com/bit/lotte/fresh/cart/data/entity/CartItemEntity.java b/cart-service/cart-dataaccess/src/main/java/com/bit/lotte/fresh/cart/data/entity/CartItemEntity.java deleted file mode 100644 index 00d769ab..00000000 --- a/cart-service/cart-dataaccess/src/main/java/com/bit/lotte/fresh/cart/data/entity/CartItemEntity.java +++ /dev/null @@ -1,43 +0,0 @@ -package com.bit.lotte.fresh.cart.data.entity; - -import com.bit.lotte.fresh.cart.data.valueobject.CartItemEntityKey; -import java.util.List; -import javax.persistence.EmbeddedId; -import javax.persistence.Entity; -import javax.persistence.JoinColumn; -import javax.persistence.ManyToOne; -import javax.persistence.MapsId; -import javax.persistence.OneToOne; -import javax.persistence.Table; -import lombok.AllArgsConstructor; -import lombok.Builder; -import lombok.Getter; -import lombok.NoArgsConstructor; -import lombok.Setter; -import org.hibernate.annotations.LazyToOne; - -@Builder -@Getter -@NoArgsConstructor -@AllArgsConstructor -@Entity -@Setter -@Table(name = "cart_item_entity") -public class CartItemEntity { - - @EmbeddedId - private CartItemEntityKey id; - - @MapsId("cartEntityId") - @ManyToOne - @JoinColumn(name = "cart_entity_cart_user_id") - private CartEntity cartEntity; - - @MapsId("productId") - @JoinColumn - @OneToOne(cascade = {javax.persistence.CascadeType.PERSIST, - javax.persistence.CascadeType.MERGE}) - private ProductEntity product; - private int selectedQuantity; - -} \ No newline at end of file diff --git a/cart-service/cart-dataaccess/src/main/java/com/bit/lotte/fresh/cart/data/entity/ProductEntity.java b/cart-service/cart-dataaccess/src/main/java/com/bit/lotte/fresh/cart/data/entity/ProductEntity.java deleted file mode 100644 index 974dd37f..00000000 --- a/cart-service/cart-dataaccess/src/main/java/com/bit/lotte/fresh/cart/data/entity/ProductEntity.java +++ /dev/null @@ -1,45 +0,0 @@ -package com.bit.lotte.fresh.cart.data.entity; - -import com.bit.lotte.fresh.cart.domain.valueobject.Province; -import javax.persistence.Column; -import javax.persistence.Entity; -import javax.persistence.FetchType; -import javax.persistence.GeneratedValue; -import javax.persistence.GenerationType; -import javax.persistence.Id; -import javax.persistence.JoinColumn; -import javax.persistence.ManyToOne; -import javax.persistence.OneToMany; -import javax.persistence.OneToOne; -import javax.validation.constraints.NotNull; -import lombok.AllArgsConstructor; -import lombok.Builder; -import lombok.Getter; -import lombok.NoArgsConstructor; -import lombok.RequiredArgsConstructor; - -@Builder -@Getter -@AllArgsConstructor -@NoArgsConstructor -@Entity -public class ProductEntity { - - @Id - @Column(name = "product_id") - private Long productId; - @NotNull - private String name; - @NotNull - private long price; - @NotNull - private long discountedPrice; - @NotNull - private String description; - @NotNull - private long stock; - @NotNull - Province province; - @OneToOne(fetch = FetchType.EAGER, mappedBy = "cartEntity") - private CartItemEntity cartItem; -} diff --git a/cart-service/cart-dataaccess/src/main/java/com/bit/lotte/fresh/cart/data/mapper/CartDataMapper.java b/cart-service/cart-dataaccess/src/main/java/com/bit/lotte/fresh/cart/data/mapper/CartDataMapper.java deleted file mode 100644 index 11fc9a33..00000000 --- a/cart-service/cart-dataaccess/src/main/java/com/bit/lotte/fresh/cart/data/mapper/CartDataMapper.java +++ /dev/null @@ -1,50 +0,0 @@ -package com.bit.lotte.fresh.cart.data.mapper; - -import com.bit.lotte.fresh.cart.common.domain.valueobject.CartItemCompKey; -import com.bit.lotte.fresh.cart.common.domain.valueobject.ProductId; -import com.bit.lotte.fresh.cart.common.domain.valueobject.UserCartId; -import com.bit.lotte.fresh.cart.data.entity.CartItemEntity; -import com.bit.lotte.fresh.cart.data.valueobject.CartItemEntityKey; -import com.bit.lotte.fresh.cart.domain.entity.Cart; -import com.bit.lotte.fresh.cart.data.entity.CartEntity; -import com.bit.lotte.fresh.cart.domain.entity.CartItem; -import com.bit.lotte.fresh.cart.domain.entity.Product; -import java.util.ArrayList; -import java.util.List; -import lombok.RequiredArgsConstructor; -import org.springframework.stereotype.Component; - -@RequiredArgsConstructor -@Component -public class CartDataMapper { - - private final ProductDataMapper productDataMapper; - - private Product getProductFromCartItem(CartItem cartItem) { - return cartItem.getProduct(); - } - - public Cart cartEntityToCart(CartEntity cartEntity) { - return Cart.builder().id(new UserCartId(cartEntity.getCartUserId())) - .cartItemList(cartEntityListToCartList(cartEntity.getCartItemEntityList())).build(); - } - - public List cartEntityListToCartList(List list){ - List cartItemList = new ArrayList<>(); - for(CartItemEntity entity : list){ - cartItemList.add(cartItemEntityToCartItem(entity)); - } - return cartItemList; - } - - - public CartItem cartItemEntityToCartItem(CartItemEntity savedCartItem) { - CartItemEntityKey entityCompKey= savedCartItem.getId(); - ProductId productId = new ProductId(entityCompKey.getProductId()); - UserCartId userCartId = new UserCartId(entityCompKey.getCartEntityId()); - return CartItem.builder().selectedQuantity(savedCartItem.getSelectedQuantity()) - .product(productDataMapper.productEntityToProduct(savedCartItem.getProduct())) - .id(new CartItemCompKey(productId,userCartId)).build(); - } - -} diff --git a/cart-service/cart-dataaccess/src/main/java/com/bit/lotte/fresh/cart/data/mapper/ProductDataMapper.java b/cart-service/cart-dataaccess/src/main/java/com/bit/lotte/fresh/cart/data/mapper/ProductDataMapper.java deleted file mode 100644 index 9f210256..00000000 --- a/cart-service/cart-dataaccess/src/main/java/com/bit/lotte/fresh/cart/data/mapper/ProductDataMapper.java +++ /dev/null @@ -1,46 +0,0 @@ -package com.bit.lotte.fresh.cart.data.mapper; - -import com.bit.lotte.fresh.cart.common.domain.valueobject.ProductId; -import com.bit.lotte.fresh.cart.domain.entity.Product; -import com.bit.lotte.fresh.cart.data.entity.ProductEntity; -import java.util.ArrayList; -import java.util.List; -import org.springframework.stereotype.Component; - -@Component -public class ProductDataMapper { - - public List getProductListFromProductEntityList(List entityList) { - List productList = new ArrayList<>(); - for (ProductEntity productEntity : entityList) { - productList.add(productEntityToProduct(productEntity)); - } - return productList; - } - - public ProductEntity productToProductEntity(Product product) { - return ProductEntity.builder().description(product.getDescription()).name( - product.getName()).stock(product.getProductStock()).province(product.getProvince()).discountedPrice(product.getDiscountedPrice()) - .price(product.getPrice()).productId(product.getId().getValue()) - - .build(); - } - - public Product productEntityToProduct(ProductEntity productEntity) { - return Product.builder().description(productEntity.getDescription()).name( - productEntity.getName()).productStock(productEntity.getStock()) - .price(productEntity.getPrice()).id(new ProductId(productEntity.getProductId())).discountedPrice(productEntity.getDiscountedPrice()) - .build(); - } - - public List productToProductEntity(List productList) { - List entityList = new ArrayList<>(); - for (Product p : productList) { - entityList.add( - ProductEntity.builder().name(p.getName()).price(p.getPrice()).province(p.getProvince()) - .description(p.getDescription()).productId(p.getEntityId().getValue()) - .stock(p.getProductStock()).build()); - } - return entityList; - } -} diff --git a/cart-service/cart-dataaccess/src/main/java/com/bit/lotte/fresh/cart/data/repository/CartItemJpaRepository.java b/cart-service/cart-dataaccess/src/main/java/com/bit/lotte/fresh/cart/data/repository/CartItemJpaRepository.java deleted file mode 100644 index bf21a29e..00000000 --- a/cart-service/cart-dataaccess/src/main/java/com/bit/lotte/fresh/cart/data/repository/CartItemJpaRepository.java +++ /dev/null @@ -1,13 +0,0 @@ -package com.bit.lotte.fresh.cart.data.repository; - -import com.bit.lotte.fresh.cart.data.entity.CartItemEntity; -import com.bit.lotte.fresh.cart.data.valueobject.CartItemEntityKey; -import com.bit.lotte.fresh.cart.domain.valueobject.Province; -import java.util.Optional; -import org.springframework.data.jpa.repository.JpaRepository; -import org.springframework.stereotype.Repository; - -@Repository -public interface CartItemJpaRepository extends JpaRepository { - Optional findByProductProvinceAndId(Province province, CartItemEntityKey id); -} diff --git a/cart-service/cart-dataaccess/src/main/java/com/bit/lotte/fresh/cart/data/repository/CartJpaRepository.java b/cart-service/cart-dataaccess/src/main/java/com/bit/lotte/fresh/cart/data/repository/CartJpaRepository.java deleted file mode 100644 index c4a698f7..00000000 --- a/cart-service/cart-dataaccess/src/main/java/com/bit/lotte/fresh/cart/data/repository/CartJpaRepository.java +++ /dev/null @@ -1,10 +0,0 @@ -package com.bit.lotte.fresh.cart.data.repository; - -import com.bit.lotte.fresh.cart.data.entity.CartEntity; -import org.springframework.data.jpa.repository.JpaRepository; -import org.springframework.stereotype.Repository; - -@Repository -public interface CartJpaRepository extends JpaRepository { - -} diff --git a/cart-service/cart-dataaccess/src/main/java/com/bit/lotte/fresh/cart/data/repository/ProductJpaRepository.java b/cart-service/cart-dataaccess/src/main/java/com/bit/lotte/fresh/cart/data/repository/ProductJpaRepository.java deleted file mode 100644 index 1cb867a7..00000000 --- a/cart-service/cart-dataaccess/src/main/java/com/bit/lotte/fresh/cart/data/repository/ProductJpaRepository.java +++ /dev/null @@ -1,13 +0,0 @@ -package com.bit.lotte.fresh.cart.data.repository; - -import com.bit.lotte.fresh.cart.data.entity.CartItemEntity; -import com.bit.lotte.fresh.cart.domain.valueobject.Province; -import com.bit.lotte.fresh.cart.data.entity.ProductEntity; -import java.util.Optional; -import org.springframework.data.jpa.repository.JpaRepository; -import org.springframework.stereotype.Repository; - -@Repository -public interface ProductJpaRepository extends JpaRepository { - public Optional findByProductIdAndProvince(Long productId, Province province); -} diff --git a/cart-service/cart-dataaccess/src/main/java/com/bit/lotte/fresh/cart/data/valueobject/CartItemEntityKey.java b/cart-service/cart-dataaccess/src/main/java/com/bit/lotte/fresh/cart/data/valueobject/CartItemEntityKey.java deleted file mode 100644 index 2f8a0cb7..00000000 --- a/cart-service/cart-dataaccess/src/main/java/com/bit/lotte/fresh/cart/data/valueobject/CartItemEntityKey.java +++ /dev/null @@ -1,18 +0,0 @@ -package com.bit.lotte.fresh.cart.data.valueobject; - -import java.io.Serializable; -import javax.persistence.Embeddable; -import lombok.AllArgsConstructor; -import lombok.Builder; -import lombok.Getter; -import lombok.NoArgsConstructor; - -@Builder -@AllArgsConstructor -@NoArgsConstructor -@Embeddable -@Getter -public class CartItemEntityKey implements Serializable { - private Long cartEntityId; - private Long productId; -} diff --git a/cart-service/cart-domain/build.gradle b/cart-service/cart-domain/build.gradle deleted file mode 100644 index 9e476279..00000000 --- a/cart-service/cart-domain/build.gradle +++ /dev/null @@ -1,19 +0,0 @@ -plugins { - id 'java' -} - -group 'org.example' -version '1.0-SNAPSHOT' - -repositories { - mavenCentral() -} - -dependencies { - testImplementation 'org.junit.jupiter:junit-jupiter-api:5.7.0' - testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.7.0' -} - -test { - useJUnitPlatform() -} \ No newline at end of file diff --git a/cart-service/cart-domain/cart-domain-application/build.gradle b/cart-service/cart-domain/cart-domain-application/build.gradle deleted file mode 100644 index 11f5f6c1..00000000 --- a/cart-service/cart-domain/cart-domain-application/build.gradle +++ /dev/null @@ -1,28 +0,0 @@ -plugins { - -} - -group 'com.bit.lotte.fresh.cart.domain.application' -version '1.0-SNAPSHOT' - -repositories { - mavenCentral() -} - -dependencies { - implementation 'io.lettuce:lettuce-core:6.1.6.RELEASE' - implementation libs.spring.redis - implementation(libs.java.validation) - implementation(libs.sl4j) - implementation project(':common:common-domain') - implementation project(':common:common-application') - implementation 'org.springframework.boot:spring-boot-starter-data-jpa' - implementation project(':cart-domain:cart-domain-core') - implementation 'org.springframework.boot:spring-boot-starter-web' - testImplementation 'org.junit.jupiter:junit-jupiter-api:5.7.0' - testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.7.0' -} - -test { - useJUnitPlatform() -} \ No newline at end of file diff --git a/cart-service/cart-domain/cart-domain-application/build/libs/cart-domain-application-1.0-SNAPSHOT-plain.jar b/cart-service/cart-domain/cart-domain-application/build/libs/cart-domain-application-1.0-SNAPSHOT-plain.jar deleted file mode 100644 index e69de29b..00000000 diff --git a/cart-service/cart-domain/cart-domain-application/build/tmp/compileJava/previous-compilation-data.bin b/cart-service/cart-domain/cart-domain-application/build/tmp/compileJava/previous-compilation-data.bin deleted file mode 100644 index e69de29b..00000000 diff --git a/cart-service/cart-domain/cart-domain-application/build/tmp/jar/MANIFEST.MF b/cart-service/cart-domain/cart-domain-application/build/tmp/jar/MANIFEST.MF deleted file mode 100644 index 58630c02..00000000 --- a/cart-service/cart-domain/cart-domain-application/build/tmp/jar/MANIFEST.MF +++ /dev/null @@ -1,2 +0,0 @@ -Manifest-Version: 1.0 - diff --git a/cart-service/cart-domain/cart-domain-application/src/main/java/com/bit/lotte/fresh/cart/service/CartApplicationServiceImpl.java b/cart-service/cart-domain/cart-domain-application/src/main/java/com/bit/lotte/fresh/cart/service/CartApplicationServiceImpl.java deleted file mode 100644 index e65b7e71..00000000 --- a/cart-service/cart-domain/cart-domain-application/src/main/java/com/bit/lotte/fresh/cart/service/CartApplicationServiceImpl.java +++ /dev/null @@ -1,77 +0,0 @@ -package com.bit.lotte.fresh.cart.service; - -import com.bit.lotte.fresh.cart.common.domain.valueobject.UserCartId; -import com.bit.lotte.fresh.cart.domain.entity.CartItem; -import com.bit.lotte.fresh.cart.domain.event.cart.AddCarItemCartDomainEvent; -import com.bit.lotte.fresh.cart.domain.event.cart.BuyCartItemDomainEvent; -import com.bit.lotte.fresh.cart.domain.event.cart.GetMyCartItemEvent; -import com.bit.lotte.fresh.cart.domain.event.cart.RemoveCartItemCartDomainEvent; -import com.bit.lotte.fresh.cart.domain.event.cart.UpdateSelectedQuantityCartItemCartDomainEvent; -import com.bit.lotte.fresh.cart.service.dto.command.AddProductInCartCommand; -import com.bit.lotte.fresh.cart.service.dto.command.CartItemIdCommand; -import com.bit.lotte.fresh.cart.service.dto.command.GetMyAllCartItemCommand; -import com.bit.lotte.fresh.cart.service.dto.command.UpdateCartSelectedQuantityCommand; -import com.bit.lotte.fresh.cart.service.dto.response.AddProductInCartResponse; -import com.bit.lotte.fresh.cart.service.dto.response.BuyProductInCartResponse; -import com.bit.lotte.fresh.cart.service.dto.response.GetMyAllCartItemListResponse; -import com.bit.lotte.fresh.cart.service.dto.response.RemoveCartProductResponse; -import com.bit.lotte.fresh.cart.service.dto.response.UpdateCartProductSelectedQuantityResponse; -import com.bit.lotte.fresh.cart.service.mapper.CartMapper; -import com.bit.lotte.fresh.cart.service.port.input.CartApplicationService; -import java.util.ArrayList; -import java.util.List; -import lombok.RequiredArgsConstructor; -import lombok.extern.slf4j.Slf4j; -import org.springframework.stereotype.Component; - -@Slf4j -@Component -@RequiredArgsConstructor -public class CartApplicationServiceImpl implements - CartApplicationService { - - private final CartCommandHandler commandHandler; - private final CartMapper cartMapper; - - @Override - public List getCartItemList(GetMyAllCartItemCommand command) { - List eventList = commandHandler.getMyAllCartItem(command); - List cartItems = new ArrayList<>(); - - for (GetMyCartItemEvent event : eventList) { - cartItems.add(event.getCartItem()); - } - return cartMapper.cartItemListToMyCartResponse(cartItems); - - } - - @Override - public AddProductInCartResponse addProductInCart(UserCartId userCartId,AddProductInCartCommand command) { - AddCarItemCartDomainEvent event = commandHandler.addCartItem(userCartId,command); - return cartMapper.AddCartToResponse(event); - } - - @Override - public BuyProductInCartResponse buyProductListInCart(CartItemIdCommand command) { - BuyCartItemDomainEvent eventList = commandHandler.buyProduct(command); - - return cartMapper.buyCartProductEventToResponse(eventList); - } - - @Override - public RemoveCartProductResponse removeCartProduct(CartItemIdCommand command) { - RemoveCartItemCartDomainEvent eventList = commandHandler.removeCartItem(command); - return cartMapper.removeCartEventToResponse(eventList); - - } - - @Override - public UpdateCartProductSelectedQuantityResponse updateCartProductSelectedQuantity( - UpdateCartSelectedQuantityCommand command) { - UpdateSelectedQuantityCartItemCartDomainEvent event = commandHandler.updateCartProductSelectedQuantity( - command.getCartItemIdCommand(),command.getIncreasedQuantity()); - - return cartMapper.selectedQuantityUpdateEventToResponse(event); - } - -} diff --git a/cart-service/cart-domain/cart-domain-application/src/main/java/com/bit/lotte/fresh/cart/service/CartCommandHandler.java b/cart-service/cart-domain/cart-domain-application/src/main/java/com/bit/lotte/fresh/cart/service/CartCommandHandler.java deleted file mode 100644 index cd18518e..00000000 --- a/cart-service/cart-domain/cart-domain-application/src/main/java/com/bit/lotte/fresh/cart/service/CartCommandHandler.java +++ /dev/null @@ -1,151 +0,0 @@ -package com.bit.lotte.fresh.cart.service; - -import com.bit.lotte.fresh.cart.common.domain.valueobject.CartItemCompKey; -import com.bit.lotte.fresh.cart.common.domain.valueobject.UserCartId; -import com.bit.lotte.fresh.cart.domain.CartDomainService; -import com.bit.lotte.fresh.cart.domain.CartDomainServiceImpl; -import com.bit.lotte.fresh.cart.domain.entity.Cart; -import com.bit.lotte.fresh.cart.domain.entity.CartItem; -import com.bit.lotte.fresh.cart.domain.entity.Product; -import com.bit.lotte.fresh.cart.domain.event.cart.AddCarItemCartDomainEvent; -import com.bit.lotte.fresh.cart.domain.event.cart.BuyCartItemDomainEvent; -import com.bit.lotte.fresh.cart.domain.event.cart.GetMyCartItemEvent; -import com.bit.lotte.fresh.cart.domain.event.cart.RemoveCartItemCartDomainEvent; -import com.bit.lotte.fresh.cart.domain.event.cart.UpdateSelectedQuantityCartItemCartDomainEvent; -import com.bit.lotte.fresh.cart.domain.excepton.CartDomainException; -import com.bit.lotte.fresh.cart.service.dto.command.AddProductInCartCommand; -import com.bit.lotte.fresh.cart.service.dto.command.CartItemIdCommand; -import com.bit.lotte.fresh.cart.service.dto.command.GetMyAllCartItemCommand; -import com.bit.lotte.fresh.cart.service.mapper.CartMapper; -import com.bit.lotte.fresh.cart.service.repository.CartRepository; -import com.bit.lotte.fresh.cart.service.util.RedisProductUtil; -import java.time.ZonedDateTime; -import java.util.ArrayList; -import java.util.List; -import javax.transaction.Transactional; -import lombok.RequiredArgsConstructor; -import org.springframework.stereotype.Component; - -@RequiredArgsConstructor -@Component -public class CartCommandHandler { - - - private final RedisProductUtil redisProductUtil; - private final CartDomainService cartDomainService = new CartDomainServiceImpl(); - private final CartRepository cartRepository; - private final CartMapper cartMapper; - - private Cart findCart(UserCartId cartId) { - return cartRepository.findCart(cartId); - } - - private CartItem findCartItem(CartItemIdCommand command) { - return cartRepository.findCartItem( - new CartItemCompKey(command.getProductId(), command.getUserCartId()), - command.getProvince()); - } - - private Cart cartInitHelper(UserCartId userCartId) { - Cart foundCart = findCart(userCartId); - if (foundCart == null) { - return Cart.builder().id(userCartId).cartItemList(null).build(); - } - return foundCart; - } - - private void cartItemExistChecker(CartItemIdCommand command) { - CartItem foundCartItem = findCartItem(command); - - if (foundCartItem == null) { - throw new CartDomainException("μ‘΄μž¬ν•˜μ§€ μ•ŠλŠ” 카트 μƒν’ˆμž…λ‹ˆλ‹€."); - } - } - - - @Transactional - public AddCarItemCartDomainEvent addCartItem(UserCartId userCartId, - AddProductInCartCommand command) { - Cart initCart = cartInitHelper(userCartId); - CartItem cartItem = cartMapper.getCartItemFromAddProductInCartCommand(userCartId,command); - AddCarItemCartDomainEvent event = cartDomainService.addProductInCart(initCart, cartItem); - CartItem savedCartItem = cartRepository.addCartItem(event.getCart().getEntityId(), - event.getCartItem()); - if (savedCartItem != null) { - return event; - } - throw new CartDomainException("μƒν’ˆμ„ μΆ”κ°€ν•  수 μ—†μŠ΅λ‹ˆλ‹€."); - } - - - @Transactional - public BuyCartItemDomainEvent buyProduct(CartItemIdCommand command) { - cartItemExistChecker(command); - Cart cart = findCart(command.getUserCartId()); - CartItem cartItem = findCartItem(command); - - - BuyCartItemDomainEvent event = cartDomainService.buyCartItem(cart, cartItem); - redisProductUtil.saveProduct(cartItem.getProduct()); - return event; - } - - @Transactional - public RemoveCartItemCartDomainEvent removeCartItem(CartItemIdCommand command) { - - cartItemExistChecker(command); - Cart cart = findCart(command.getUserCartId()); - CartItem cartItem = findCartItem(command); - - RemoveCartItemCartDomainEvent event = cartDomainService.removeCartItem(cart, cartItem); - - cartRepository.removeCartItem(event.getCartItem()); - - - return event; - } - - - @Transactional - public UpdateSelectedQuantityCartItemCartDomainEvent updateCartProductSelectedQuantity( - CartItemIdCommand command, int updatedQuantity) { - - cartItemExistChecker(command); - Cart cart = findCart(command.getUserCartId()); - CartItem cartItem = findCartItem(command); - - UpdateSelectedQuantityCartItemCartDomainEvent event = cartDomainService.updateSelectedProductQuantity( - cart, cartItem, updatedQuantity); - CartItem updatedCartItem = cartRepository.updateSelectedQuantity(event.getCartItem()); - if (updatedCartItem != null) { - return event; - } - throw new CartDomainException("μ„ νƒν•œ 개수만큼 μ—…λ°μ΄νŠΈλ₯Ό λ°˜μ˜ν•  수 μ—†μŠ΅λ‹ˆλ‹€."); - } - - public GetMyCartItemEvent getMyCartItem(GetMyAllCartItemCommand command, CartItem cartItem) { - Cart cart = findCart(command.getUserCartId()); - if (cart == null) { - throw new CartDomainException("쑴재 ν•˜μ§€ μ•ŠλŠ” 카트 μƒν’ˆμž…λ‹ˆλ‹€."); - } else { - return new GetMyCartItemEvent(cart, cartItem, ZonedDateTime.now()); - } - - } - - public List getMyAllCartItem(GetMyAllCartItemCommand command) { - - Cart cart = findCart(command.getUserCartId()); - if (cart == null) { - return null; - } else { - List eventList = new ArrayList<>(); - for (CartItem cartItem : cart.getCartItemList()) { - eventList.add(new GetMyCartItemEvent(cart, cartItem, ZonedDateTime.now())); - } - return eventList; - } - - - } -} diff --git a/cart-service/cart-domain/cart-domain-application/src/main/java/com/bit/lotte/fresh/cart/service/ProductApplicationServiceImpl.java b/cart-service/cart-domain/cart-domain-application/src/main/java/com/bit/lotte/fresh/cart/service/ProductApplicationServiceImpl.java deleted file mode 100644 index 35ecc177..00000000 --- a/cart-service/cart-domain/cart-domain-application/src/main/java/com/bit/lotte/fresh/cart/service/ProductApplicationServiceImpl.java +++ /dev/null @@ -1,21 +0,0 @@ -package com.bit.lotte.fresh.cart.service; - -import com.bit.lotte.fresh.cart.domain.event.product.ProductStockUpdatedDomainEvent; -import com.bit.lotte.fresh.cart.service.dto.command.UpdateCartProductStockCommand; -import com.bit.lotte.fresh.cart.service.dto.response.UpdateProductStockResponse; -import com.bit.lotte.fresh.cart.service.mapper.ProductMapper; -import com.bit.lotte.fresh.cart.service.port.input.ProductApplicationService; -import lombok.RequiredArgsConstructor; -import org.springframework.stereotype.Component; -@RequiredArgsConstructor -@Component -public class ProductApplicationServiceImpl implements ProductApplicationService { - - private final ProductMapper productMapper; - private final ProductCommandHandler commandHandler; - @Override - public UpdateProductStockResponse updateCartProductStock(UpdateCartProductStockCommand command) { - ProductStockUpdatedDomainEvent event = commandHandler.updateCartProductStock(command); - return productMapper.updateProductStockEventToResponse(event); - } -} diff --git a/cart-service/cart-domain/cart-domain-application/src/main/java/com/bit/lotte/fresh/cart/service/ProductCommandHandler.java b/cart-service/cart-domain/cart-domain-application/src/main/java/com/bit/lotte/fresh/cart/service/ProductCommandHandler.java deleted file mode 100644 index 9c6a6f32..00000000 --- a/cart-service/cart-domain/cart-domain-application/src/main/java/com/bit/lotte/fresh/cart/service/ProductCommandHandler.java +++ /dev/null @@ -1,41 +0,0 @@ -package com.bit.lotte.fresh.cart.service; - -import com.bit.lotte.fresh.cart.domain.ProductService; -import com.bit.lotte.fresh.cart.domain.ProductServiceImpl; -import com.bit.lotte.fresh.cart.domain.entity.Product; -import com.bit.lotte.fresh.cart.domain.event.product.ProductStockUpdatedDomainEvent; -import com.bit.lotte.fresh.cart.domain.excepton.CartDomainException; -import com.bit.lotte.fresh.cart.service.dto.command.UpdateCartProductStockCommand; -import com.bit.lotte.fresh.cart.service.repository.ProductRepository; -import javax.transaction.Transactional; -import lombok.RequiredArgsConstructor; -import org.springframework.stereotype.Component; - -@RequiredArgsConstructor -@Component -public class ProductCommandHandler { - - - private final ProductRepository productRepository; - private final ProductService productService = new ProductServiceImpl(); - - - - - - @Transactional - public ProductStockUpdatedDomainEvent updateCartProductStock( - UpdateCartProductStockCommand command) { - Product foundProduct = productRepository.getProduct(command.getProductId(), command.getProvince()); - ProductStockUpdatedDomainEvent event = - productService.updateStock(foundProduct, command.getUpdatedStock()); - Product updatedProduct = productRepository.updateProductStock(event.getProduct(), - command.getUpdatedStock()); - if (updatedProduct != null) { - return event; - } - throw new CartDomainException("재고λ₯Ό μ—…λ°μ΄νŠΈν•  수 μ—†μŠ΅λ‹ˆλ‹€."); - } - - -} diff --git a/cart-service/cart-domain/cart-domain-application/src/main/java/com/bit/lotte/fresh/cart/service/config/RedisConfiguration.java b/cart-service/cart-domain/cart-domain-application/src/main/java/com/bit/lotte/fresh/cart/service/config/RedisConfiguration.java deleted file mode 100644 index 0b82df3d..00000000 --- a/cart-service/cart-domain/cart-domain-application/src/main/java/com/bit/lotte/fresh/cart/service/config/RedisConfiguration.java +++ /dev/null @@ -1,50 +0,0 @@ -package com.bit.lotte.fresh.cart.service.config; -import com.bit.lotte.fresh.cart.domain.entity.Product; -import com.bit.lotte.fresh.cart.service.util.RedisProductUtil; -import lombok.extern.slf4j.Slf4j; -import org.springframework.beans.factory.annotation.Value; -import org.springframework.context.annotation.Bean; -import org.springframework.context.annotation.Configuration; -import org.springframework.data.redis.connection.RedisStandaloneConfiguration; -import org.springframework.data.redis.connection.lettuce.LettuceConnectionFactory; -import org.springframework.data.redis.core.RedisTemplate; -import org.springframework.data.redis.serializer.GenericJackson2JsonRedisSerializer; -import org.springframework.data.redis.serializer.RedisSerializer; -import org.springframework.data.redis.serializer.StringRedisSerializer; - -@Slf4j -@Configuration -public class RedisConfiguration { - - @Value("${spring.redis.host}") - private String host; - - @Value("${spring.redis.port}") - private int port; - - @Value("${spring.redis.password}") - private String password; - - @Bean - public LettuceConnectionFactory redisConnectionFactory() { - RedisStandaloneConfiguration redisStandaloneConfiguration = new RedisStandaloneConfiguration(); - redisStandaloneConfiguration.setHostName("15.164.64.20"); - redisStandaloneConfiguration.setPort(6379); - redisStandaloneConfiguration.setPassword("lotfresh1!"); - - return new LettuceConnectionFactory(redisStandaloneConfiguration); - } - - @Bean - public RedisTemplate redisTemplate() { - RedisTemplate redisTemplate = new RedisTemplate<>(); - redisTemplate.setKeySerializer(new StringRedisSerializer()); - redisTemplate.setDefaultSerializer(new StringRedisSerializer()); - redisTemplate.setConnectionFactory(redisConnectionFactory()); - return redisTemplate; - } - @Bean - RedisProductUtil redisProductUtil(){ - return new RedisProductUtil(redisTemplate()); - } -} \ No newline at end of file diff --git a/cart-service/cart-domain/cart-domain-application/src/main/java/com/bit/lotte/fresh/cart/service/dto/command/AddProductInCartCommand.java b/cart-service/cart-domain/cart-domain-application/src/main/java/com/bit/lotte/fresh/cart/service/dto/command/AddProductInCartCommand.java deleted file mode 100644 index e1cd2b21..00000000 --- a/cart-service/cart-domain/cart-domain-application/src/main/java/com/bit/lotte/fresh/cart/service/dto/command/AddProductInCartCommand.java +++ /dev/null @@ -1,50 +0,0 @@ -package com.bit.lotte.fresh.cart.service.dto.command; - -import com.bit.lotte.fresh.cart.common.domain.valueobject.ProductId; -import com.bit.lotte.fresh.cart.common.domain.valueobject.UserCartId; -import com.bit.lotte.fresh.cart.domain.entity.CartItem; -import com.bit.lotte.fresh.cart.domain.entity.Product; -import com.bit.lotte.fresh.cart.domain.valueobject.Province; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonProperty; -import javax.validation.constraints.NotNull; -import lombok.AllArgsConstructor; -import lombok.Getter; -import lombok.NoArgsConstructor; - -@NoArgsConstructor -@Getter -public class AddProductInCartCommand { - - @NotNull - ProductId productId; - @NotNull - long discountedPrice; - @NotNull - Province province; - @NotNull - long productStock; - @NotNull - long price; - @NotNull - String productName; - @NotNull - String productImageUrl; - @NotNull - private int selectedQuantity; - - @JsonCreator - public AddProductInCartCommand( - @JsonProperty("productId") ProductId productId, long discountedPrice, - Province province, long productStock, long price, String productName, - String productImageUrl, int selectedQuantity) { - this.productId = productId; - this.discountedPrice = discountedPrice; - this.province = province; - this.productStock = productStock; - this.price = price; - this.productName = productName; - this.productImageUrl = productImageUrl; - this.selectedQuantity = selectedQuantity; - } -} diff --git a/cart-service/cart-domain/cart-domain-application/src/main/java/com/bit/lotte/fresh/cart/service/dto/command/CartItemIdCommand.java b/cart-service/cart-domain/cart-domain-application/src/main/java/com/bit/lotte/fresh/cart/service/dto/command/CartItemIdCommand.java deleted file mode 100644 index 6eaf0cc0..00000000 --- a/cart-service/cart-domain/cart-domain-application/src/main/java/com/bit/lotte/fresh/cart/service/dto/command/CartItemIdCommand.java +++ /dev/null @@ -1,24 +0,0 @@ -package com.bit.lotte.fresh.cart.service.dto.command; - -import com.bit.lotte.fresh.cart.common.domain.valueobject.ProductId; -import com.bit.lotte.fresh.cart.common.domain.valueobject.UserCartId; -import com.bit.lotte.fresh.cart.domain.entity.CartItem; -import com.bit.lotte.fresh.cart.domain.valueobject.Province; -import javax.validation.constraints.NotNull; -import lombok.AllArgsConstructor; -import lombok.Getter; -import lombok.NoArgsConstructor; - -@AllArgsConstructor -@NoArgsConstructor -@Getter -public class CartItemIdCommand { - - @NotNull - UserCartId userCartId; - @NotNull - ProductId productId; - @NotNull - Province province; - -} diff --git a/cart-service/cart-domain/cart-domain-application/src/main/java/com/bit/lotte/fresh/cart/service/dto/command/GetMyAllCartItemCommand.java b/cart-service/cart-domain/cart-domain-application/src/main/java/com/bit/lotte/fresh/cart/service/dto/command/GetMyAllCartItemCommand.java deleted file mode 100644 index b72eb09a..00000000 --- a/cart-service/cart-domain/cart-domain-application/src/main/java/com/bit/lotte/fresh/cart/service/dto/command/GetMyAllCartItemCommand.java +++ /dev/null @@ -1,13 +0,0 @@ -package com.bit.lotte.fresh.cart.service.dto.command; - -import com.bit.lotte.fresh.cart.common.domain.valueobject.UserCartId; -import lombok.AllArgsConstructor; -import lombok.Getter; -import lombok.NoArgsConstructor; - -@AllArgsConstructor -@NoArgsConstructor -@Getter -public class GetMyAllCartItemCommand { - private UserCartId userCartId; -} diff --git a/cart-service/cart-domain/cart-domain-application/src/main/java/com/bit/lotte/fresh/cart/service/dto/command/UpdateCartProductStockCommand.java b/cart-service/cart-domain/cart-domain-application/src/main/java/com/bit/lotte/fresh/cart/service/dto/command/UpdateCartProductStockCommand.java deleted file mode 100644 index 97c5035e..00000000 --- a/cart-service/cart-domain/cart-domain-application/src/main/java/com/bit/lotte/fresh/cart/service/dto/command/UpdateCartProductStockCommand.java +++ /dev/null @@ -1,23 +0,0 @@ -package com.bit.lotte.fresh.cart.service.dto.command; - -import com.bit.lotte.fresh.cart.common.domain.valueobject.ProductId; -import com.bit.lotte.fresh.cart.common.domain.valueobject.UserCartId; -import com.bit.lotte.fresh.cart.domain.valueobject.Province; -import javax.validation.constraints.NotNull; -import lombok.AllArgsConstructor; -import lombok.Getter; -import lombok.NoArgsConstructor; - -@Getter -@AllArgsConstructor -@NoArgsConstructor -public class UpdateCartProductStockCommand { - - @NotNull - private ProductId productId; - @NotNull - private Province province; - @NotNull - private long updatedStock; - -} diff --git a/cart-service/cart-domain/cart-domain-application/src/main/java/com/bit/lotte/fresh/cart/service/dto/command/UpdateCartSelectedQuantityCommand.java b/cart-service/cart-domain/cart-domain-application/src/main/java/com/bit/lotte/fresh/cart/service/dto/command/UpdateCartSelectedQuantityCommand.java deleted file mode 100644 index d9e38710..00000000 --- a/cart-service/cart-domain/cart-domain-application/src/main/java/com/bit/lotte/fresh/cart/service/dto/command/UpdateCartSelectedQuantityCommand.java +++ /dev/null @@ -1,21 +0,0 @@ -package com.bit.lotte.fresh.cart.service.dto.command; - -import com.bit.lotte.fresh.cart.common.domain.valueobject.ProductId; -import com.bit.lotte.fresh.cart.common.domain.valueobject.UserCartId; -import com.bit.lotte.fresh.cart.domain.entity.CartItem; -import com.bit.lotte.fresh.cart.domain.valueobject.Province; -import javax.validation.constraints.NotNull; -import lombok.AllArgsConstructor; -import lombok.Getter; - -@AllArgsConstructor -@Getter -public class UpdateCartSelectedQuantityCommand { - - @NotNull - private CartItemIdCommand cartItemIdCommand; - @NotNull - private int increasedQuantity; - - -} diff --git a/cart-service/cart-domain/cart-domain-application/src/main/java/com/bit/lotte/fresh/cart/service/dto/response/AddProductInCartResponse.java b/cart-service/cart-domain/cart-domain-application/src/main/java/com/bit/lotte/fresh/cart/service/dto/response/AddProductInCartResponse.java deleted file mode 100644 index ae639b9e..00000000 --- a/cart-service/cart-domain/cart-domain-application/src/main/java/com/bit/lotte/fresh/cart/service/dto/response/AddProductInCartResponse.java +++ /dev/null @@ -1,35 +0,0 @@ -package com.bit.lotte.fresh.cart.service.dto.response; - -import com.bit.lotte.fresh.cart.common.domain.valueobject.ProductId; -import com.bit.lotte.fresh.cart.domain.entity.Cart; -import com.bit.lotte.fresh.cart.domain.entity.CartItem; -import com.bit.lotte.fresh.cart.domain.valueobject.Province; -import lombok.Getter; -import lombok.NoArgsConstructor; -import lombok.RequiredArgsConstructor; - -@Getter -@NoArgsConstructor -public class AddProductInCartResponse { - - ProductId productId; - Province province; - String productName; - private String message; - - public AddProductInCartResponse( - ProductId productId, Province province, String productName) { - this.productId = productId; - this.province = province; - this.productName = productName; - setInitMessage(); - } - - private void setInitMessage() { - StringBuilder sb = new StringBuilder(); - sb.append(productName); - sb.append("κ°€ μΆ”κ°€λ˜μ—ˆμŠ΅λ‹ˆλ‹€."); - message = sb.toString(); - } - -} diff --git a/cart-service/cart-domain/cart-domain-application/src/main/java/com/bit/lotte/fresh/cart/service/dto/response/BuyProductInCartResponse.java b/cart-service/cart-domain/cart-domain-application/src/main/java/com/bit/lotte/fresh/cart/service/dto/response/BuyProductInCartResponse.java deleted file mode 100644 index bec2dcba..00000000 --- a/cart-service/cart-domain/cart-domain-application/src/main/java/com/bit/lotte/fresh/cart/service/dto/response/BuyProductInCartResponse.java +++ /dev/null @@ -1,42 +0,0 @@ -package com.bit.lotte.fresh.cart.service.dto.response; - -import com.bit.lotte.fresh.cart.common.domain.valueobject.ProductId; -import com.bit.lotte.fresh.cart.domain.valueobject.Province; -import java.util.List; -import javax.validation.constraints.NotNull; -import lombok.AllArgsConstructor; -import lombok.Getter; -import lombok.NoArgsConstructor; - -@AllArgsConstructor -@Getter -@NoArgsConstructor -public class BuyProductInCartResponse { - - @NotNull - private ProductId productId; - private Province province; - private String productName; - private int selectedQuantity; - private String message; - - public BuyProductInCartResponse( - ProductId productId, Province province, String productName, int selectedQuantity) { - this.productId = productId; - this.province = province; - this.productName = productName; - this.selectedQuantity = selectedQuantity; - setInitMessage(); - } - - private void setInitMessage() { - StringBuilder sb = new StringBuilder(); - sb.append(productName); - sb.append("λ₯Ό "); - sb.append(selectedQuantity); - sb.append("만큼 κ΅¬λ§€ν•©λ‹ˆλ‹€."); - message = sb.toString(); - } - - -} diff --git a/cart-service/cart-domain/cart-domain-application/src/main/java/com/bit/lotte/fresh/cart/service/dto/response/CartItemInfoResponse.java b/cart-service/cart-domain/cart-domain-application/src/main/java/com/bit/lotte/fresh/cart/service/dto/response/CartItemInfoResponse.java deleted file mode 100644 index 2140d516..00000000 --- a/cart-service/cart-domain/cart-domain-application/src/main/java/com/bit/lotte/fresh/cart/service/dto/response/CartItemInfoResponse.java +++ /dev/null @@ -1,28 +0,0 @@ -package com.bit.lotte.fresh.cart.service.dto.response; - -import com.bit.lotte.fresh.cart.common.domain.valueobject.ProductId; -import com.bit.lotte.fresh.cart.common.domain.valueobject.UserCartId; -import com.bit.lotte.fresh.cart.domain.entity.CartItem; -import com.bit.lotte.fresh.cart.domain.valueobject.Province; -import lombok.AllArgsConstructor; -import lombok.Getter; -import lombok.NoArgsConstructor; - -@NoArgsConstructor -@AllArgsConstructor -@Getter -public class CartItemInfoResponse { - - private UserCartId cartId; - private CartItem cartItem; - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("μœ μ € 아이디: "); - sb.append(cartId); - sb.append("카트 μ œν’ˆ: "); - sb.append(cartItem); - return sb.toString(); - } -} diff --git a/cart-service/cart-domain/cart-domain-application/src/main/java/com/bit/lotte/fresh/cart/service/dto/response/GetMyAllCartItemListResponse.java b/cart-service/cart-domain/cart-domain-application/src/main/java/com/bit/lotte/fresh/cart/service/dto/response/GetMyAllCartItemListResponse.java deleted file mode 100644 index 27e4cc5e..00000000 --- a/cart-service/cart-domain/cart-domain-application/src/main/java/com/bit/lotte/fresh/cart/service/dto/response/GetMyAllCartItemListResponse.java +++ /dev/null @@ -1,30 +0,0 @@ -package com.bit.lotte.fresh.cart.service.dto.response; - -import com.bit.lotte.fresh.cart.domain.entity.CartItem; -import com.bit.lotte.fresh.cart.domain.valueobject.Province; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonUnwrapped; -import java.util.List; -import javax.validation.constraints.NotNull; -import lombok.AllArgsConstructor; -import lombok.Builder; -import lombok.Getter; -import lombok.NoArgsConstructor; -import org.springframework.web.bind.annotation.GetMapping; - - -@AllArgsConstructor -@NoArgsConstructor -@Getter -@Builder -public class GetMyAllCartItemListResponse { - private int selectedQuantity; - private Long productId; - private long discountedPrice; - private long price; - private Province province; - private long productStock; - private String name; - private String productImageUrl; -} diff --git a/cart-service/cart-domain/cart-domain-application/src/main/java/com/bit/lotte/fresh/cart/service/dto/response/ProductInfoResponse.java b/cart-service/cart-domain/cart-domain-application/src/main/java/com/bit/lotte/fresh/cart/service/dto/response/ProductInfoResponse.java deleted file mode 100644 index f65b4e9e..00000000 --- a/cart-service/cart-domain/cart-domain-application/src/main/java/com/bit/lotte/fresh/cart/service/dto/response/ProductInfoResponse.java +++ /dev/null @@ -1,22 +0,0 @@ -package com.bit.lotte.fresh.cart.service.dto.response; - -import com.bit.lotte.fresh.cart.common.domain.valueobject.ProductId; -import javax.validation.constraints.NotNull; -import lombok.AllArgsConstructor; -import lombok.NoArgsConstructor; - -@NoArgsConstructor -@AllArgsConstructor -public class ProductInfoResponse { - - @NotNull - private ProductId productId; - @NotNull - private Long stock; - @NotNull - private String name; - @NotNull - private Long price; - - -} diff --git a/cart-service/cart-domain/cart-domain-application/src/main/java/com/bit/lotte/fresh/cart/service/dto/response/RemoveCartProductResponse.java b/cart-service/cart-domain/cart-domain-application/src/main/java/com/bit/lotte/fresh/cart/service/dto/response/RemoveCartProductResponse.java deleted file mode 100644 index ddda1701..00000000 --- a/cart-service/cart-domain/cart-domain-application/src/main/java/com/bit/lotte/fresh/cart/service/dto/response/RemoveCartProductResponse.java +++ /dev/null @@ -1,40 +0,0 @@ -package com.bit.lotte.fresh.cart.service.dto.response; - -import com.bit.lotte.fresh.cart.common.domain.valueobject.ProductId; -import com.bit.lotte.fresh.cart.domain.valueobject.Province; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonProperty; -import lombok.Getter; -import lombok.NoArgsConstructor; - - -@NoArgsConstructor -@Getter -public class RemoveCartProductResponse { - - private ProductId productId; - private Province province; - private String productName; - private String message; - - - @JsonCreator - public RemoveCartProductResponse( - @JsonProperty("productId") ProductId productId, - Province province, - String productName) { - this.productId = productId; - this.province = province; - this.productName = productName; - setInitMessage(); - } - - private void setInitMessage() { - StringBuilder sb = new StringBuilder(); - sb.append(province); - sb.append("의"); - sb.append(productName); - sb.append("κ°€ μ‚­μ œλ©λ‹ˆλ‹€."); - message = sb.toString(); - } -} diff --git a/cart-service/cart-domain/cart-domain-application/src/main/java/com/bit/lotte/fresh/cart/service/dto/response/UpdateCartProductSelectedQuantityResponse.java b/cart-service/cart-domain/cart-domain-application/src/main/java/com/bit/lotte/fresh/cart/service/dto/response/UpdateCartProductSelectedQuantityResponse.java deleted file mode 100644 index 65864493..00000000 --- a/cart-service/cart-domain/cart-domain-application/src/main/java/com/bit/lotte/fresh/cart/service/dto/response/UpdateCartProductSelectedQuantityResponse.java +++ /dev/null @@ -1,37 +0,0 @@ -package com.bit.lotte.fresh.cart.service.dto.response; - -import com.bit.lotte.fresh.cart.domain.valueobject.Province; -import lombok.AllArgsConstructor; -import lombok.Getter; -import lombok.NoArgsConstructor; - -@NoArgsConstructor -@AllArgsConstructor -@Getter -public class UpdateCartProductSelectedQuantityResponse -{ - - private Province province; - private String productName; - private int updatedSelectedQuantityNumber; - private String message; - - public UpdateCartProductSelectedQuantityResponse( - Province province, String productName, int updatedSelectedQuantityNumber) { - this.province = province; - this.productName = productName; - this.updatedSelectedQuantityNumber = updatedSelectedQuantityNumber; - setInitMessage(); - } - - private void setInitMessage() { - StringBuilder sb = new StringBuilder(); - sb.append(province); - sb.append("의 "); - sb.append(productName); - sb.append("κ°€ "); - sb.append(updatedSelectedQuantityNumber); - sb.append("둜 μ—…λ°μ΄νŠΈ λ©λ‹ˆλ‹€."); - message = sb.toString(); - } -} diff --git a/cart-service/cart-domain/cart-domain-application/src/main/java/com/bit/lotte/fresh/cart/service/dto/response/UpdateProductStockResponse.java b/cart-service/cart-domain/cart-domain-application/src/main/java/com/bit/lotte/fresh/cart/service/dto/response/UpdateProductStockResponse.java deleted file mode 100644 index 2012d5cf..00000000 --- a/cart-service/cart-domain/cart-domain-application/src/main/java/com/bit/lotte/fresh/cart/service/dto/response/UpdateProductStockResponse.java +++ /dev/null @@ -1,36 +0,0 @@ -package com.bit.lotte.fresh.cart.service.dto.response; - -import com.bit.lotte.fresh.cart.common.domain.valueobject.ProductId; -import com.bit.lotte.fresh.cart.domain.valueobject.Province; -import lombok.AllArgsConstructor; -import lombok.Getter; -import lombok.NoArgsConstructor; - -@NoArgsConstructor -@AllArgsConstructor -@Getter -public class UpdateProductStockResponse { - - private ProductId productId; - private long updatedProductStockNumber; - private Province province; - private String message; - - public UpdateProductStockResponse( - ProductId productId, long updatedProductStockNumber, - Province province) { - this.productId = productId; - this.updatedProductStockNumber = updatedProductStockNumber; - this.province = province; - setInitMessage(); - } - - private void setInitMessage() { - StringBuilder sb = new StringBuilder(); - sb.append(productId); - sb.append("의 μž¬κ³ κ°€"); - sb.append(updatedProductStockNumber); - sb.append("둜 μ—…λ°μ΄νŠΈ λ©λ‹ˆλ‹€."); - message = sb.toString(); - } -} diff --git a/cart-service/cart-domain/cart-domain-application/src/main/java/com/bit/lotte/fresh/cart/service/mapper/CartMapper.java b/cart-service/cart-domain/cart-domain-application/src/main/java/com/bit/lotte/fresh/cart/service/mapper/CartMapper.java deleted file mode 100644 index d3d0bf8d..00000000 --- a/cart-service/cart-domain/cart-domain-application/src/main/java/com/bit/lotte/fresh/cart/service/mapper/CartMapper.java +++ /dev/null @@ -1,87 +0,0 @@ -package com.bit.lotte.fresh.cart.service.mapper; - -import com.bit.lotte.fresh.cart.common.domain.valueobject.CartItemCompKey; -import com.bit.lotte.fresh.cart.common.domain.valueobject.ProductId; -import com.bit.lotte.fresh.cart.common.domain.valueobject.UserCartId; -import com.bit.lotte.fresh.cart.domain.entity.CartItem; -import com.bit.lotte.fresh.cart.domain.entity.Product; -import com.bit.lotte.fresh.cart.domain.event.cart.AddCarItemCartDomainEvent; -import com.bit.lotte.fresh.cart.domain.event.cart.BuyCartItemDomainEvent; -import com.bit.lotte.fresh.cart.domain.event.cart.RemoveCartItemCartDomainEvent; -import com.bit.lotte.fresh.cart.domain.event.cart.UpdateSelectedQuantityCartItemCartDomainEvent; -import com.bit.lotte.fresh.cart.domain.valueobject.Province; -import com.bit.lotte.fresh.cart.service.dto.command.AddProductInCartCommand; -import com.bit.lotte.fresh.cart.service.dto.command.CartItemIdCommand; -import com.bit.lotte.fresh.cart.service.dto.response.AddProductInCartResponse; -import com.bit.lotte.fresh.cart.service.dto.response.BuyProductInCartResponse; -import com.bit.lotte.fresh.cart.service.dto.response.CartItemInfoResponse; -import com.bit.lotte.fresh.cart.service.dto.response.GetMyAllCartItemListResponse; -import com.bit.lotte.fresh.cart.service.dto.response.RemoveCartProductResponse; -import com.bit.lotte.fresh.cart.service.dto.response.UpdateCartProductSelectedQuantityResponse; -import java.util.ArrayList; -import java.util.List; -import org.springframework.stereotype.Component; - -@Component -public class CartMapper { - - public AddProductInCartResponse AddCartToResponse(AddCarItemCartDomainEvent event) { - Product product = event.getCartItem().getProduct(); - return new AddProductInCartResponse(product.getEntityId(), product.getProvince(), - product.getName()); - } - - public CartItemIdCommand cartItemIdCommandCreator(UserCartId cartId, Province province, - ProductId productId, int selectedQuantity) { - return new CartItemIdCommand(cartId, productId, province); - } - - - public BuyProductInCartResponse buyCartProductEventToResponse( - BuyCartItemDomainEvent event) { - int selectedQuantity = event.getCartItem().getSelectedQuantity(); - Product product = event.getCartItem().getProduct(); - return new BuyProductInCartResponse(product.getEntityId(), product.getProvince(), - product.getName(), selectedQuantity); - } - - - public RemoveCartProductResponse removeCartEventToResponse( - RemoveCartItemCartDomainEvent event) { - Product product = event.getCartItem().getProduct(); - return new RemoveCartProductResponse(product.getEntityId(), product.getProvince(), - product.getName()); - } - - - public UpdateCartProductSelectedQuantityResponse selectedQuantityUpdateEventToResponse( - UpdateSelectedQuantityCartItemCartDomainEvent event) { - int updatedSelectedQuantity = event.getUpdatedSelectedQuantity(); - Product product = event.getCartItem().getProduct(); - return new UpdateCartProductSelectedQuantityResponse(product.getProvince(), product.getName(), - updatedSelectedQuantity); - } - - //μ—¬κΈ°μ„œ λΆ€ν„° μˆ˜μ • - public List cartItemListToMyCartResponse(List cartItems) { - List list = new ArrayList<>(); - for (CartItem cartItem : cartItems) { - Product product = cartItem.getProduct(); - list.add( - GetMyAllCartItemListResponse.builder().name(product.getName()).price(product.getPrice()) - .province(product.getProvince()).discountedPrice(product.getDiscountedPrice()) - .productId(product.getEntityId().getValue()).build()); - } - return list; - } - - public CartItem getCartItemFromAddProductInCartCommand(UserCartId userCartId, AddProductInCartCommand command) { - return CartItem.builder().product( - Product.builder().productStock(command.getProductStock()) - .description(command.getProductImageUrl()).discountedPrice(command.getDiscountedPrice()) - .productStock(command.getProductStock()).id(command.getProductId()).build()) - .id(new CartItemCompKey( - command.getProductId(), userCartId)).selectedQuantity(command.getSelectedQuantity()) - .build(); - } -} diff --git a/cart-service/cart-domain/cart-domain-application/src/main/java/com/bit/lotte/fresh/cart/service/mapper/ProductMapper.java b/cart-service/cart-domain/cart-domain-application/src/main/java/com/bit/lotte/fresh/cart/service/mapper/ProductMapper.java deleted file mode 100644 index 3def229a..00000000 --- a/cart-service/cart-domain/cart-domain-application/src/main/java/com/bit/lotte/fresh/cart/service/mapper/ProductMapper.java +++ /dev/null @@ -1,26 +0,0 @@ -package com.bit.lotte.fresh.cart.service.mapper; -import com.bit.lotte.fresh.cart.domain.entity.Product; -import com.bit.lotte.fresh.cart.domain.event.product.ProductStockUpdatedDomainEvent; -import com.bit.lotte.fresh.cart.service.dto.command.UpdateCartProductStockCommand; -import com.bit.lotte.fresh.cart.service.dto.response.UpdateProductStockResponse; -import org.springframework.stereotype.Component; - -@Component -public class ProductMapper { - - public UpdateProductStockResponse updateProductStockEventToResponse( - ProductStockUpdatedDomainEvent event) { - return new UpdateProductStockResponse(event.getProduct().getEntityId(), - event.getProduct().getProductStock(), event.getProduct().getProvince()); - } - - - public UpdateCartProductStockCommand productStockUpdateEventToCommand( - ProductStockUpdatedDomainEvent event) { - Product updatedStockProduct = event.getProduct(); - return new UpdateCartProductStockCommand( - updatedStockProduct.getEntityId(), updatedStockProduct.getProvince(), - updatedStockProduct.getProductStock()); - - } -} diff --git a/cart-service/cart-domain/cart-domain-application/src/main/java/com/bit/lotte/fresh/cart/service/port/input/CartApplicationService.java b/cart-service/cart-domain/cart-domain-application/src/main/java/com/bit/lotte/fresh/cart/service/port/input/CartApplicationService.java deleted file mode 100644 index 891c0758..00000000 --- a/cart-service/cart-domain/cart-domain-application/src/main/java/com/bit/lotte/fresh/cart/service/port/input/CartApplicationService.java +++ /dev/null @@ -1,24 +0,0 @@ -package com.bit.lotte.fresh.cart.service.port.input; - -import com.bit.lotte.fresh.cart.common.domain.valueobject.UserCartId; -import com.bit.lotte.fresh.cart.service.dto.command.AddProductInCartCommand; -import com.bit.lotte.fresh.cart.service.dto.command.CartItemIdCommand; -import com.bit.lotte.fresh.cart.service.dto.command.GetMyAllCartItemCommand; -import com.bit.lotte.fresh.cart.service.dto.command.UpdateCartSelectedQuantityCommand; -import com.bit.lotte.fresh.cart.service.dto.response.AddProductInCartResponse; -import com.bit.lotte.fresh.cart.service.dto.response.BuyProductInCartResponse; -import com.bit.lotte.fresh.cart.service.dto.response.GetMyAllCartItemListResponse; -import com.bit.lotte.fresh.cart.service.dto.response.RemoveCartProductResponse; -import com.bit.lotte.fresh.cart.service.dto.response.UpdateCartProductSelectedQuantityResponse; -import java.util.List; - - -public interface CartApplicationService { - - List getCartItemList(GetMyAllCartItemCommand command); - AddProductInCartResponse addProductInCart(UserCartId userCartId, AddProductInCartCommand command); - BuyProductInCartResponse buyProductListInCart(CartItemIdCommand command); - RemoveCartProductResponse removeCartProduct(CartItemIdCommand command); - UpdateCartProductSelectedQuantityResponse updateCartProductSelectedQuantity( - UpdateCartSelectedQuantityCommand command); -} diff --git a/cart-service/cart-domain/cart-domain-application/src/main/java/com/bit/lotte/fresh/cart/service/port/input/ProductApplicationService.java b/cart-service/cart-domain/cart-domain-application/src/main/java/com/bit/lotte/fresh/cart/service/port/input/ProductApplicationService.java deleted file mode 100644 index 5426a186..00000000 --- a/cart-service/cart-domain/cart-domain-application/src/main/java/com/bit/lotte/fresh/cart/service/port/input/ProductApplicationService.java +++ /dev/null @@ -1,9 +0,0 @@ -package com.bit.lotte.fresh.cart.service.port.input; - -import com.bit.lotte.fresh.cart.service.dto.command.UpdateCartProductStockCommand; -import com.bit.lotte.fresh.cart.service.dto.response.UpdateProductStockResponse; - -public interface ProductApplicationService { - UpdateProductStockResponse updateCartProductStock(UpdateCartProductStockCommand command); - -} diff --git a/cart-service/cart-domain/cart-domain-application/src/main/java/com/bit/lotte/fresh/cart/service/port/input/message/UpdateProductStockListener.java b/cart-service/cart-domain/cart-domain-application/src/main/java/com/bit/lotte/fresh/cart/service/port/input/message/UpdateProductStockListener.java deleted file mode 100644 index f97fd728..00000000 --- a/cart-service/cart-domain/cart-domain-application/src/main/java/com/bit/lotte/fresh/cart/service/port/input/message/UpdateProductStockListener.java +++ /dev/null @@ -1,9 +0,0 @@ -package com.bit.lotte.fresh.cart.service.port.input.message; - -import com.bit.lotte.fresh.cart.domain.event.product.ProductStockUpdatedDomainEvent; -import com.bit.lotte.fresh.cart.service.dto.response.UpdateProductStockResponse; - -public interface UpdateProductStockListener { - void updateStock(ProductStockUpdatedDomainEvent event); - -} diff --git a/cart-service/cart-domain/cart-domain-application/src/main/java/com/bit/lotte/fresh/cart/service/port/output/BuyCartItemPublisher.java b/cart-service/cart-domain/cart-domain-application/src/main/java/com/bit/lotte/fresh/cart/service/port/output/BuyCartItemPublisher.java deleted file mode 100644 index b5413ab5..00000000 --- a/cart-service/cart-domain/cart-domain-application/src/main/java/com/bit/lotte/fresh/cart/service/port/output/BuyCartItemPublisher.java +++ /dev/null @@ -1,7 +0,0 @@ -package com.bit.lotte.fresh.cart.service.port.output; - -import com.bit.lotte.fresh.cart.domain.event.cart.BuyCartItemDomainEvent; - -public interface BuyCartItemPublisher { - public void publish(BuyCartItemDomainEvent buyCartItemDomainEvent); -} diff --git a/cart-service/cart-domain/cart-domain-application/src/main/java/com/bit/lotte/fresh/cart/service/repository/CartRepository.java b/cart-service/cart-domain/cart-domain-application/src/main/java/com/bit/lotte/fresh/cart/service/repository/CartRepository.java deleted file mode 100644 index 2bd88637..00000000 --- a/cart-service/cart-domain/cart-domain-application/src/main/java/com/bit/lotte/fresh/cart/service/repository/CartRepository.java +++ /dev/null @@ -1,29 +0,0 @@ -package com.bit.lotte.fresh.cart.service.repository; - -import com.bit.lotte.fresh.cart.common.domain.valueobject.CartItemCompKey; -import com.bit.lotte.fresh.cart.common.domain.valueobject.ProductId; -import com.bit.lotte.fresh.cart.common.domain.valueobject.UserCartId; -import com.bit.lotte.fresh.cart.domain.entity.Cart; -import com.bit.lotte.fresh.cart.domain.entity.CartItem; -import com.bit.lotte.fresh.cart.domain.entity.Product; -import com.bit.lotte.fresh.cart.domain.valueobject.Province; -import java.util.Optional; -import org.springframework.stereotype.Repository; - -@Repository -public interface CartRepository { - - Cart findCart(UserCartId id); - - CartItem addCartItem(UserCartId userCartId ,CartItem cartItem); - - CartItem findCartItem(CartItemCompKey cartItemCompKey, Province province); - - CartItem updateSelectedQuantity(CartItem cartItem); - - - void removeCartItem(CartItem cartItem); - - - -} diff --git a/cart-service/cart-domain/cart-domain-application/src/main/java/com/bit/lotte/fresh/cart/service/repository/ProductRepository.java b/cart-service/cart-domain/cart-domain-application/src/main/java/com/bit/lotte/fresh/cart/service/repository/ProductRepository.java deleted file mode 100644 index 41de5733..00000000 --- a/cart-service/cart-domain/cart-domain-application/src/main/java/com/bit/lotte/fresh/cart/service/repository/ProductRepository.java +++ /dev/null @@ -1,14 +0,0 @@ -package com.bit.lotte.fresh.cart.service.repository; - -import com.bit.lotte.fresh.cart.common.domain.valueobject.ProductId; -import com.bit.lotte.fresh.cart.domain.entity.Product; -import com.bit.lotte.fresh.cart.domain.valueobject.Province; -import org.springframework.stereotype.Repository; - -@Repository -public interface ProductRepository { - - public Product save(Product product); - public Product getProduct(ProductId productId, Province province); - public Product updateProductStock(Product product, long stock); -} diff --git a/cart-service/cart-domain/cart-domain-application/src/main/java/com/bit/lotte/fresh/cart/service/util/RedisProductUtil.java b/cart-service/cart-domain/cart-domain-application/src/main/java/com/bit/lotte/fresh/cart/service/util/RedisProductUtil.java deleted file mode 100644 index 3cd67af8..00000000 --- a/cart-service/cart-domain/cart-domain-application/src/main/java/com/bit/lotte/fresh/cart/service/util/RedisProductUtil.java +++ /dev/null @@ -1,21 +0,0 @@ -package com.bit.lotte.fresh.cart.service.util; - -import com.bit.lotte.fresh.cart.domain.entity.Product; -import lombok.AllArgsConstructor; - -import lombok.extern.slf4j.Slf4j; -import org.springframework.data.redis.core.RedisTemplate; -import org.springframework.stereotype.Component; - -@Slf4j -@AllArgsConstructor -public class RedisProductUtil { - - private final RedisTemplate redisTemplate; - - public void saveProduct(Product product) { - log.info("redis product:{} ",product); - redisTemplate.opsForValue().set("cart_" + product.getId(), product); - } - -} diff --git a/cart-service/cart-domain/cart-domain-core/build.gradle b/cart-service/cart-domain/cart-domain-core/build.gradle deleted file mode 100644 index efeab216..00000000 --- a/cart-service/cart-domain/cart-domain-core/build.gradle +++ /dev/null @@ -1,21 +0,0 @@ -plugins { - id 'java' -} - -group 'org.example' -version '1.0-SNAPSHOT' - -repositories { - mavenCentral() -} - -dependencies { - implementation project(':common:common-domain') - implementation project(':common:common-application') - testImplementation 'org.junit.jupiter:junit-jupiter-api:5.7.0' - testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.7.0' -} - -test { - useJUnitPlatform() -} \ No newline at end of file diff --git a/cart-service/cart-domain/cart-domain-core/build/libs/cart-domain-core-1.0-SNAPSHOT-plain.jar b/cart-service/cart-domain/cart-domain-core/build/libs/cart-domain-core-1.0-SNAPSHOT-plain.jar deleted file mode 100644 index e69de29b..00000000 diff --git a/cart-service/cart-domain/cart-domain-core/build/tmp/compileJava/previous-compilation-data.bin b/cart-service/cart-domain/cart-domain-core/build/tmp/compileJava/previous-compilation-data.bin deleted file mode 100644 index e69de29b..00000000 diff --git a/cart-service/cart-domain/cart-domain-core/build/tmp/jar/MANIFEST.MF b/cart-service/cart-domain/cart-domain-core/build/tmp/jar/MANIFEST.MF deleted file mode 100644 index 58630c02..00000000 --- a/cart-service/cart-domain/cart-domain-core/build/tmp/jar/MANIFEST.MF +++ /dev/null @@ -1,2 +0,0 @@ -Manifest-Version: 1.0 - diff --git a/cart-service/cart-domain/cart-domain-core/src/main/java/com/bit/lotte/fresh/cart/domain/CartDomainService.java b/cart-service/cart-domain/cart-domain-core/src/main/java/com/bit/lotte/fresh/cart/domain/CartDomainService.java deleted file mode 100644 index d0c8eca2..00000000 --- a/cart-service/cart-domain/cart-domain-core/src/main/java/com/bit/lotte/fresh/cart/domain/CartDomainService.java +++ /dev/null @@ -1,23 +0,0 @@ -package com.bit.lotte.fresh.cart.domain; - -import com.bit.lotte.fresh.cart.domain.entity.Cart; -import com.bit.lotte.fresh.cart.domain.entity.CartItem; -import com.bit.lotte.fresh.cart.domain.entity.Product; -import com.bit.lotte.fresh.cart.domain.event.cart.AddCarItemCartDomainEvent; -import com.bit.lotte.fresh.cart.domain.event.cart.BuyCartItemDomainEvent; -import com.bit.lotte.fresh.cart.domain.event.cart.RemoveCartItemCartDomainEvent; -import com.bit.lotte.fresh.cart.domain.event.cart.UpdateSelectedQuantityCartItemCartDomainEvent; -import com.bit.lotte.fresh.cart.domain.event.product.ProductStockUpdatedDomainEvent; - -public interface CartDomainService { - - AddCarItemCartDomainEvent addProductInCart(Cart cart, CartItem cartItem); - - BuyCartItemDomainEvent buyCartItem(Cart cart,CartItem cartItem); - - RemoveCartItemCartDomainEvent removeCartItem(Cart cart,CartItem cartItem); - - UpdateSelectedQuantityCartItemCartDomainEvent updateSelectedProductQuantity(Cart cart, CartItem cartItem, int increasedSelectedQuantity); - - -} diff --git a/cart-service/cart-domain/cart-domain-core/src/main/java/com/bit/lotte/fresh/cart/domain/CartDomainServiceImpl.java b/cart-service/cart-domain/cart-domain-core/src/main/java/com/bit/lotte/fresh/cart/domain/CartDomainServiceImpl.java deleted file mode 100644 index d7c1721f..00000000 --- a/cart-service/cart-domain/cart-domain-core/src/main/java/com/bit/lotte/fresh/cart/domain/CartDomainServiceImpl.java +++ /dev/null @@ -1,40 +0,0 @@ -package com.bit.lotte.fresh.cart.domain; - -import com.bit.lotte.fresh.cart.domain.entity.Cart; -import com.bit.lotte.fresh.cart.domain.entity.CartItem; -import com.bit.lotte.fresh.cart.domain.entity.Product; -import com.bit.lotte.fresh.cart.domain.event.cart.AddCarItemCartDomainEvent; -import com.bit.lotte.fresh.cart.domain.event.cart.BuyCartItemDomainEvent; -import com.bit.lotte.fresh.cart.domain.event.cart.RemoveCartItemCartDomainEvent; -import com.bit.lotte.fresh.cart.domain.event.cart.UpdateSelectedQuantityCartItemCartDomainEvent; -import java.time.ZonedDateTime; - -public class CartDomainServiceImpl implements - CartDomainService { - - @Override - public AddCarItemCartDomainEvent addProductInCart(Cart cart, CartItem cartItem) { - cart.addCartItem(cartItem); - return new AddCarItemCartDomainEvent(cart, cartItem, ZonedDateTime.now()); - } - - @Override - public BuyCartItemDomainEvent buyCartItem(Cart cart, CartItem cartItem) { - cart.removeCartItem(cartItem); - return new BuyCartItemDomainEvent(cart, cartItem, ZonedDateTime.now()); - } - - @Override - public RemoveCartItemCartDomainEvent removeCartItem(Cart cart, CartItem cartItem) { - cart.removeCartItem(cartItem); - return new RemoveCartItemCartDomainEvent(cart, cartItem, ZonedDateTime.now()); - } - - - @Override - public UpdateSelectedQuantityCartItemCartDomainEvent updateSelectedProductQuantity(Cart cart, - CartItem cartItem, int updatedSelectedQuantity) { - cart.updateSelectedQuantity(cartItem,updatedSelectedQuantity); - return new UpdateSelectedQuantityCartItemCartDomainEvent(cart,cartItem,ZonedDateTime.now()); - } -} diff --git a/cart-service/cart-domain/cart-domain-core/src/main/java/com/bit/lotte/fresh/cart/domain/ProductService.java b/cart-service/cart-domain/cart-domain-core/src/main/java/com/bit/lotte/fresh/cart/domain/ProductService.java deleted file mode 100644 index 1c9ae7f1..00000000 --- a/cart-service/cart-domain/cart-domain-core/src/main/java/com/bit/lotte/fresh/cart/domain/ProductService.java +++ /dev/null @@ -1,8 +0,0 @@ -package com.bit.lotte.fresh.cart.domain; - -import com.bit.lotte.fresh.cart.domain.entity.Product; -import com.bit.lotte.fresh.cart.domain.event.product.ProductStockUpdatedDomainEvent; - -public interface ProductService { -ProductStockUpdatedDomainEvent updateStock(Product product,long updatedStock); -} diff --git a/cart-service/cart-domain/cart-domain-core/src/main/java/com/bit/lotte/fresh/cart/domain/ProductServiceImpl.java b/cart-service/cart-domain/cart-domain-core/src/main/java/com/bit/lotte/fresh/cart/domain/ProductServiceImpl.java deleted file mode 100644 index 4ac21534..00000000 --- a/cart-service/cart-domain/cart-domain-core/src/main/java/com/bit/lotte/fresh/cart/domain/ProductServiceImpl.java +++ /dev/null @@ -1,14 +0,0 @@ -package com.bit.lotte.fresh.cart.domain; - -import com.bit.lotte.fresh.cart.domain.entity.Product; -import com.bit.lotte.fresh.cart.domain.event.product.ProductStockUpdatedDomainEvent; -import java.time.ZonedDateTime; - -public class ProductServiceImpl implements ProductService { - - @Override - public ProductStockUpdatedDomainEvent updateStock(Product product, long updatedStock) { - product.updateStock(updatedStock); - return new ProductStockUpdatedDomainEvent(product, ZonedDateTime.now()); - } -} diff --git a/cart-service/cart-domain/cart-domain-core/src/main/java/com/bit/lotte/fresh/cart/domain/entity/Cart.java b/cart-service/cart-domain/cart-domain-core/src/main/java/com/bit/lotte/fresh/cart/domain/entity/Cart.java deleted file mode 100644 index c78874ac..00000000 --- a/cart-service/cart-domain/cart-domain-core/src/main/java/com/bit/lotte/fresh/cart/domain/entity/Cart.java +++ /dev/null @@ -1,80 +0,0 @@ -package com.bit.lotte.fresh.cart.domain.entity; - -import com.bit.lotte.fresh.cart.common.domain.entity.AggregateRoot; - -import com.bit.lotte.fresh.cart.common.domain.valueobject.UserCartId; -import com.bit.lotte.fresh.cart.domain.excepton.CartDomainException; -import java.util.ArrayList; -import java.util.List; -import lombok.AllArgsConstructor; -import lombok.Builder; -import lombok.Data; -import lombok.NoArgsConstructor; -import lombok.experimental.SuperBuilder; - -/** - * Product의 stock의 μ—…λ°μ΄νŠΈλŠ” ν•΄λ‹Ή Aggregatea Rootμ—μ„œ 닀루지 μ•ŠλŠ”λ‹€. μž¬ν’ˆμ˜ 재고의 동기화λ₯Ό μœ„ν•œ entityμ΄λ―€λ‘œ ν•΄λ‹Ή Aggregate Rootμ—μ„œ - * 닀루지 μ•ŠλŠ”λ‹€. - */ -@Data -@SuperBuilder -public class Cart extends AggregateRoot { - - private List cartItemList; - - public Cart( - AggregateRootBuilder b) { - super(b); - } - - private CartItem getCartItem(CartItem cartItem) { - for (CartItem item : cartItemList) { - if (item.equals(cartItem)) { - return item; - } - } - throw new CartDomainException("μΉ΄νŠΈμ— μ‘΄μž¬ν•˜μ§€ μ•ŠλŠ” μƒν’ˆμž…λ‹ˆλ‹€."); - } - - public void updateSelectedQuantity(CartItem cartItem, int updatedQuantity) { - cartItem.updateTheSelectedQuantity(updatedQuantity); - } - private boolean isItemAlreadyExist(CartItem cartItem) { - return cartItemList.contains(cartItem); - } - - public void addCartItem(CartItem cartItem) { - Product product = cartItem.getProduct(); - product.initProduct(product); - if (cartItemList==null) { - cartItemList= new ArrayList<>(); - addNewCartItem(cartItem); - } - if (isItemAlreadyExist(cartItem)) { - addCartItemAlreadyExist(cartItem); - } else { - addNewCartItem(cartItem); - - } - } - private void addCartItemAlreadyExist(CartItem cartItem) { - cartItem.updateTheSelectedQuantity(cartItem.getSelectedQuantity() + cartItem.getSelectedQuantity()); - } - - private void addNewCartItem(CartItem cartItem) { - cartItem.initCartItem(cartItem.getProduct(),cartItem.getSelectedQuantity()); - cartItemList.add(cartItem); - } - - public void removeCartItem(CartItem cartItem) { - cartItem.removeCartItem(cartItem.getProduct().getEntityId()); - cartItemList.remove(cartItem); - } - - - public void buyCartItem(CartItem cartItem) { - removeCartItem(cartItem); - } -} - - diff --git a/cart-service/cart-domain/cart-domain-core/src/main/java/com/bit/lotte/fresh/cart/domain/entity/CartItem.java b/cart-service/cart-domain/cart-domain-core/src/main/java/com/bit/lotte/fresh/cart/domain/entity/CartItem.java deleted file mode 100644 index b35e310b..00000000 --- a/cart-service/cart-domain/cart-domain-core/src/main/java/com/bit/lotte/fresh/cart/domain/entity/CartItem.java +++ /dev/null @@ -1,55 +0,0 @@ -package com.bit.lotte.fresh.cart.domain.entity; - -import com.bit.lotte.fresh.cart.common.domain.entity.BaseEntity; -import com.bit.lotte.fresh.cart.common.domain.valueobject.CartItemCompKey; -import com.bit.lotte.fresh.cart.common.domain.valueobject.ProductId; -import com.bit.lotte.fresh.cart.common.domain.valueobject.UserCartId; -import com.bit.lotte.fresh.cart.domain.excepton.CartDomainException; -import com.bit.lotte.fresh.cart.domain.valueobject.Province; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.annotation.JsonUnwrapped; -import lombok.AllArgsConstructor; -import lombok.Data; -import lombok.NoArgsConstructor; -import lombok.experimental.SuperBuilder; - -@Data -@NoArgsConstructor -@SuperBuilder -public class CartItem extends BaseEntity { - - private int selectedQuantity; - private Product product; - - public CartItem(CartItemCompKey cartItemCompKey) { - super(cartItemCompKey); - } - - - public void removeCartItem(ProductId productId) { - if (!product.getEntityId().equals(productId)) { - throw new CartDomainException("μΉ΄νŠΈμ— μ‘΄μž¬ν•˜μ§€ μ•ŠλŠ” μƒν’ˆμž…λ‹ˆλ‹€."); - } - } - - public void initCartItem(Product product, int selectedQuantity) { - product.initProduct(product); - product.isStockEnough(selectedQuantity); - validateSelectedQuantityOver0(selectedQuantity); - } - - public void validateSelectedQuantityOver0(int selectedQuantity) { - if (selectedQuantity <= 0) { - throw new CartDomainException("1개 이상을 μΆ”κ°€ν•΄μ£Όμ„Έμš”."); - } - } - - public void updateTheSelectedQuantity(int updatedSelectedQuantity) { - if (product.getProductStock() < updatedSelectedQuantity) { - throw new CartDomainException("μž¬κ³ κ°€ μΆ©λΆ„ν•˜μ§€ μ•ŠμŠ΅λ‹ˆλ‹€ ν˜„μž¬ μž¬κ³ λŠ” :" + product.getProductStock()); - } - this.selectedQuantity = updatedSelectedQuantity; - } - -} diff --git a/cart-service/cart-domain/cart-domain-core/src/main/java/com/bit/lotte/fresh/cart/domain/entity/Product.java b/cart-service/cart-domain/cart-domain-core/src/main/java/com/bit/lotte/fresh/cart/domain/entity/Product.java deleted file mode 100644 index 8fdd9fb5..00000000 --- a/cart-service/cart-domain/cart-domain-core/src/main/java/com/bit/lotte/fresh/cart/domain/entity/Product.java +++ /dev/null @@ -1,108 +0,0 @@ -package com.bit.lotte.fresh.cart.domain.entity; - -import com.bit.lotte.fresh.cart.common.domain.entity.AggregateRoot; -import com.bit.lotte.fresh.cart.common.domain.valueobject.ProductId; -import com.bit.lotte.fresh.cart.domain.excepton.CartDomainException; -import com.bit.lotte.fresh.cart.domain.valueobject.Province; -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonProperty; -import lombok.AllArgsConstructor; -import lombok.Data; -import lombok.Getter; -import lombok.NoArgsConstructor; -import lombok.RequiredArgsConstructor; -import lombok.Setter; -import lombok.ToString; -import lombok.experimental.SuperBuilder; - - -@ToString -@Setter -@Getter -@AllArgsConstructor -@SuperBuilder -public class Product extends AggregateRoot { - - - public Product() { - super(); - } - - long discountedPrice; - Province province; - long productStock; - long price; - String name; - String description; - - - public Product( - AggregateRootBuilder b) { - super(b); - } - - public Product productIdentifier(Province province, ProductId productId) { - if (province.equals(this.province) && productId.equals(getEntityId())) { - return this; - } - throw new CartDomainException("μ‘΄μž¬ν•˜λŠ” μ œν’ˆμ΄ μ—†μŠ΅λ‹ˆλ‹€."); - } - - public void isStockEnough(int requestQuantity) { - if (requestQuantity > productStock) { - throw new CartDomainException("μž¬κ³ κ°€ λΆ€μ‘±ν•©λ‹ˆλ‹€."); - } - - } - - public void initProduct(Product product) { - validateProduct(product); - } - - public Product updateStock(long updatedStock) { - this.productStock = updatedStock; - return this; - } - - public void validateProduct(Product product) { - validateDescription(product); - validateName(product); - validatePrice(product); - } - - - private void validateName(Product product) { - if (product.name == null) { - throw new CartDomainException("μƒν’ˆμ˜ 이름이 μ—†μŠ΅λ‹ˆλ‹€."); - } - } - - private void validateDescription(Product product) { - if (product.description == null) { - throw new CartDomainException("μƒν’ˆμ˜ 사진 정보가 μ—†μŠ΅λ‹ˆλ‹€."); - } - } - - private void validatePrice(Product product) { - if (product.getPrice() <= 0) { - throw new CartDomainException("μƒν’ˆμ˜ 가격은 0보닀 μ»€μ•Όν•©λ‹ˆλ‹€."); - } - } - - @Override - public String toString() { - return "Product{" + - "id=" + this.getEntityId().getValue() + - ", originalPrice=" + productStock + - ", discountedPrice=" + discountedPrice + - ", productName='" + name + '\'' + - ", productStock='" + productStock + '\'' + - ", productThumbnail='" + description + '\'' + - '}'; - } - - -} - - - diff --git a/cart-service/cart-domain/cart-domain-core/src/main/java/com/bit/lotte/fresh/cart/domain/event/cart/AddCarItemCartDomainEvent.java b/cart-service/cart-domain/cart-domain-core/src/main/java/com/bit/lotte/fresh/cart/domain/event/cart/AddCarItemCartDomainEvent.java deleted file mode 100644 index 379762c6..00000000 --- a/cart-service/cart-domain/cart-domain-core/src/main/java/com/bit/lotte/fresh/cart/domain/event/cart/AddCarItemCartDomainEvent.java +++ /dev/null @@ -1,15 +0,0 @@ -package com.bit.lotte.fresh.cart.domain.event.cart; - -import com.bit.lotte.fresh.cart.domain.entity.Cart; -import com.bit.lotte.fresh.cart.domain.entity.CartItem; -import com.bit.lotte.fresh.cart.domain.entity.Product; -import java.time.ZonedDateTime; -import lombok.AllArgsConstructor; - -public class AddCarItemCartDomainEvent extends - CartDomainEvent { - - public AddCarItemCartDomainEvent(Cart cart, CartItem cartItem, ZonedDateTime createdTime) { - super(cart, cartItem, createdTime); - } -} diff --git a/cart-service/cart-domain/cart-domain-core/src/main/java/com/bit/lotte/fresh/cart/domain/event/cart/BuyCartItemDomainEvent.java b/cart-service/cart-domain/cart-domain-core/src/main/java/com/bit/lotte/fresh/cart/domain/event/cart/BuyCartItemDomainEvent.java deleted file mode 100644 index bb7d55ed..00000000 --- a/cart-service/cart-domain/cart-domain-core/src/main/java/com/bit/lotte/fresh/cart/domain/event/cart/BuyCartItemDomainEvent.java +++ /dev/null @@ -1,15 +0,0 @@ -package com.bit.lotte.fresh.cart.domain.event.cart; - -import com.bit.lotte.fresh.cart.domain.entity.Cart; -import com.bit.lotte.fresh.cart.domain.entity.CartItem; -import com.bit.lotte.fresh.cart.domain.entity.Product; -import java.time.ZonedDateTime; - -public class BuyCartItemDomainEvent extends - CartDomainEvent { - - public BuyCartItemDomainEvent(Cart cart, CartItem cartItem, - ZonedDateTime createdTime) { - super(cart, cartItem, createdTime); - } -} diff --git a/cart-service/cart-domain/cart-domain-core/src/main/java/com/bit/lotte/fresh/cart/domain/event/cart/CartDomainEvent.java b/cart-service/cart-domain/cart-domain-core/src/main/java/com/bit/lotte/fresh/cart/domain/event/cart/CartDomainEvent.java deleted file mode 100644 index 482c7d1b..00000000 --- a/cart-service/cart-domain/cart-domain-core/src/main/java/com/bit/lotte/fresh/cart/domain/event/cart/CartDomainEvent.java +++ /dev/null @@ -1,19 +0,0 @@ -package com.bit.lotte.fresh.cart.domain.event.cart; - -import com.bit.lotte.fresh.cart.common.domain.event.DomainEvent; -import com.bit.lotte.fresh.cart.domain.entity.Cart; -import com.bit.lotte.fresh.cart.domain.entity.CartItem; -import com.bit.lotte.fresh.cart.domain.entity.Product; -import java.time.ZonedDateTime; -import lombok.Getter; -import lombok.RequiredArgsConstructor; - -@Getter -@RequiredArgsConstructor -abstract class CartDomainEvent implements DomainEvent { - - private final Cart cart; - private final CartItem cartItem; - private final ZonedDateTime createdTime; - -} diff --git a/cart-service/cart-domain/cart-domain-core/src/main/java/com/bit/lotte/fresh/cart/domain/event/cart/GetMyCartItemEvent.java b/cart-service/cart-domain/cart-domain-core/src/main/java/com/bit/lotte/fresh/cart/domain/event/cart/GetMyCartItemEvent.java deleted file mode 100644 index aa5bac40..00000000 --- a/cart-service/cart-domain/cart-domain-core/src/main/java/com/bit/lotte/fresh/cart/domain/event/cart/GetMyCartItemEvent.java +++ /dev/null @@ -1,15 +0,0 @@ -package com.bit.lotte.fresh.cart.domain.event.cart; - -import com.bit.lotte.fresh.cart.domain.entity.Cart; -import com.bit.lotte.fresh.cart.domain.entity.CartItem; -import java.time.ZonedDateTime; -import lombok.Getter; -import lombok.NoArgsConstructor; -@Getter -public class GetMyCartItemEvent extends CartDomainEvent{ - - public GetMyCartItemEvent(Cart cart, - CartItem cartItem, ZonedDateTime createdTime) { - super(cart, cartItem, createdTime); - } -} diff --git a/cart-service/cart-domain/cart-domain-core/src/main/java/com/bit/lotte/fresh/cart/domain/event/cart/RemoveCartItemCartDomainEvent.java b/cart-service/cart-domain/cart-domain-core/src/main/java/com/bit/lotte/fresh/cart/domain/event/cart/RemoveCartItemCartDomainEvent.java deleted file mode 100644 index fdbe9e95..00000000 --- a/cart-service/cart-domain/cart-domain-core/src/main/java/com/bit/lotte/fresh/cart/domain/event/cart/RemoveCartItemCartDomainEvent.java +++ /dev/null @@ -1,17 +0,0 @@ -package com.bit.lotte.fresh.cart.domain.event.cart; - -import com.bit.lotte.fresh.cart.domain.entity.Cart; -import com.bit.lotte.fresh.cart.domain.entity.CartItem; -import com.bit.lotte.fresh.cart.domain.entity.Product; -import java.time.ZonedDateTime; - -public class RemoveCartItemCartDomainEvent extends - CartDomainEvent { - - - public RemoveCartItemCartDomainEvent(Cart cart, - CartItem cartItem, - ZonedDateTime createdTime) { - super(cart, cartItem, createdTime); - } -} diff --git a/cart-service/cart-domain/cart-domain-core/src/main/java/com/bit/lotte/fresh/cart/domain/event/cart/UpdateSelectedQuantityCartItemCartDomainEvent.java b/cart-service/cart-domain/cart-domain-core/src/main/java/com/bit/lotte/fresh/cart/domain/event/cart/UpdateSelectedQuantityCartItemCartDomainEvent.java deleted file mode 100644 index 4be4436e..00000000 --- a/cart-service/cart-domain/cart-domain-core/src/main/java/com/bit/lotte/fresh/cart/domain/event/cart/UpdateSelectedQuantityCartItemCartDomainEvent.java +++ /dev/null @@ -1,21 +0,0 @@ -package com.bit.lotte.fresh.cart.domain.event.cart; - -import com.bit.lotte.fresh.cart.domain.entity.Cart; -import com.bit.lotte.fresh.cart.domain.entity.CartItem; -import com.bit.lotte.fresh.cart.domain.entity.Product; -import java.time.ZonedDateTime; -import lombok.Getter; - -@Getter -public class UpdateSelectedQuantityCartItemCartDomainEvent extends - CartDomainEvent { - - private int updatedSelectedQuantity; - - - public UpdateSelectedQuantityCartItemCartDomainEvent(Cart cart, - CartItem cartItem, - ZonedDateTime createdTime) { - super(cart, cartItem, createdTime); - } -} diff --git a/cart-service/cart-domain/cart-domain-core/src/main/java/com/bit/lotte/fresh/cart/domain/event/product/ProductDomainEvent.java b/cart-service/cart-domain/cart-domain-core/src/main/java/com/bit/lotte/fresh/cart/domain/event/product/ProductDomainEvent.java deleted file mode 100644 index 9b9b65c7..00000000 --- a/cart-service/cart-domain/cart-domain-core/src/main/java/com/bit/lotte/fresh/cart/domain/event/product/ProductDomainEvent.java +++ /dev/null @@ -1,14 +0,0 @@ -package com.bit.lotte.fresh.cart.domain.event.product; - -import com.bit.lotte.fresh.cart.common.domain.event.DomainEvent; -import com.bit.lotte.fresh.cart.domain.entity.Product; -import java.time.ZonedDateTime; -import lombok.Getter; -import lombok.RequiredArgsConstructor; - -@Getter -@RequiredArgsConstructor -abstract class ProductDomainEvent implements DomainEvent { - private final Product product; - private final ZonedDateTime createdTime; -} diff --git a/cart-service/cart-domain/cart-domain-core/src/main/java/com/bit/lotte/fresh/cart/domain/event/product/ProductStockUpdatedDomainEvent.java b/cart-service/cart-domain/cart-domain-core/src/main/java/com/bit/lotte/fresh/cart/domain/event/product/ProductStockUpdatedDomainEvent.java deleted file mode 100644 index 7ca28ad7..00000000 --- a/cart-service/cart-domain/cart-domain-core/src/main/java/com/bit/lotte/fresh/cart/domain/event/product/ProductStockUpdatedDomainEvent.java +++ /dev/null @@ -1,16 +0,0 @@ -package com.bit.lotte.fresh.cart.domain.event.product; - -import com.bit.lotte.fresh.cart.domain.entity.Product; -import com.bit.lotte.fresh.cart.domain.valueobject.Province; -import java.time.ZonedDateTime; -import lombok.Getter; - -@Getter -public class ProductStockUpdatedDomainEvent extends - ProductDomainEvent { - - - public ProductStockUpdatedDomainEvent(Product product, ZonedDateTime createdTime) { - super(product, createdTime); - } -} diff --git a/cart-service/cart-domain/cart-domain-core/src/main/java/com/bit/lotte/fresh/cart/domain/excepton/CartDomainException.java b/cart-service/cart-domain/cart-domain-core/src/main/java/com/bit/lotte/fresh/cart/domain/excepton/CartDomainException.java deleted file mode 100644 index 94e01f16..00000000 --- a/cart-service/cart-domain/cart-domain-core/src/main/java/com/bit/lotte/fresh/cart/domain/excepton/CartDomainException.java +++ /dev/null @@ -1,10 +0,0 @@ -package com.bit.lotte.fresh.cart.domain.excepton; - -import com.bit.lotte.fresh.cart.common.domain.exception.DomainException; - -public class CartDomainException extends DomainException { - - public CartDomainException(String message) { - super(message); - } -} diff --git a/cart-service/cart-domain/cart-domain-core/src/main/java/com/bit/lotte/fresh/cart/domain/valueobject/Province.java b/cart-service/cart-domain/cart-domain-core/src/main/java/com/bit/lotte/fresh/cart/domain/valueobject/Province.java deleted file mode 100644 index 29f08fb9..00000000 --- a/cart-service/cart-domain/cart-domain-core/src/main/java/com/bit/lotte/fresh/cart/domain/valueobject/Province.java +++ /dev/null @@ -1,14 +0,0 @@ -package com.bit.lotte.fresh.cart.domain.valueobject; - -public enum Province { - Seoul, - Gyeonggi, - Gangwon, - Chungcheongbuk, - Chungcheongnam, - Jeollabuk, - Jeollanam, - Gyeongsangbuk, - Gyeongsangnam, - Jeju -} diff --git a/cart-service/cart-message/build.gradle b/cart-service/cart-message/build.gradle deleted file mode 100644 index 74a3dcfc..00000000 --- a/cart-service/cart-message/build.gradle +++ /dev/null @@ -1,24 +0,0 @@ -plugins { - id 'java' -} - -group 'org.example' -version '1.0-SNAPSHOT' - -repositories { - mavenCentral() -} - -dependencies { - implementation project(':common:common-domain') - implementation project(':common:common-application') - implementation project(':cart-domain:cart-domain-core') - implementation project(':cart-domain:cart-domain-application') - implementation 'org.springframework.cloud:spring-cloud-starter-openfeign' - testImplementation 'org.junit.jupiter:junit-jupiter-api:5.7.0' - testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.7.0' -} - -test { - useJUnitPlatform() -} \ No newline at end of file diff --git a/cart-service/cart-message/build/libs/cart-message-1.0-SNAPSHOT-plain.jar b/cart-service/cart-message/build/libs/cart-message-1.0-SNAPSHOT-plain.jar deleted file mode 100644 index e69de29b..00000000 diff --git a/cart-service/cart-message/build/tmp/compileJava/previous-compilation-data.bin b/cart-service/cart-message/build/tmp/compileJava/previous-compilation-data.bin deleted file mode 100644 index e69de29b..00000000 diff --git a/cart-service/cart-message/build/tmp/jar/MANIFEST.MF b/cart-service/cart-message/build/tmp/jar/MANIFEST.MF deleted file mode 100644 index 58630c02..00000000 --- a/cart-service/cart-message/build/tmp/jar/MANIFEST.MF +++ /dev/null @@ -1,2 +0,0 @@ -Manifest-Version: 1.0 - diff --git a/cart-service/cart-message/src/main/java/com/bit/lotte/fresh/cart/message/input/ProductStockUpdatedListenerImpl.java b/cart-service/cart-message/src/main/java/com/bit/lotte/fresh/cart/message/input/ProductStockUpdatedListenerImpl.java deleted file mode 100644 index 3b97f298..00000000 --- a/cart-service/cart-message/src/main/java/com/bit/lotte/fresh/cart/message/input/ProductStockUpdatedListenerImpl.java +++ /dev/null @@ -1,24 +0,0 @@ -package com.bit.lotte.fresh.cart.message.input; - -import com.bit.lotte.fresh.cart.domain.event.product.ProductStockUpdatedDomainEvent; -import com.bit.lotte.fresh.cart.service.dto.command.UpdateCartProductStockCommand; -import com.bit.lotte.fresh.cart.service.mapper.ProductMapper; -import com.bit.lotte.fresh.cart.service.port.input.ProductApplicationService; -import com.bit.lotte.fresh.cart.service.port.input.message.UpdateProductStockListener; -import lombok.RequiredArgsConstructor; -import org.springframework.stereotype.Component; - -@RequiredArgsConstructor -@Component -public class ProductStockUpdatedListenerImpl implements UpdateProductStockListener { - - private final ProductMapper productMapper; - private final ProductApplicationService productService; - - - @Override - public void updateStock(ProductStockUpdatedDomainEvent event) { - UpdateCartProductStockCommand command = productMapper.productStockUpdateEventToCommand(event); - productService.updateCartProductStock(command); - } -} diff --git a/cart-service/cart-service b/cart-service/cart-service new file mode 160000 index 00000000..451a02b2 --- /dev/null +++ b/cart-service/cart-service @@ -0,0 +1 @@ +Subproject commit 451a02b2cdd1bddad88e448b32020f800a1822e2 diff --git a/cart-service/common/build.gradle b/cart-service/common/build.gradle deleted file mode 100644 index a3fbd066..00000000 --- a/cart-service/common/build.gradle +++ /dev/null @@ -1,20 +0,0 @@ -plugins { - id 'java' -} - -group 'com.bit.lotte.fresh.cart.common' -version '1.0-SNAPSHOT' - -repositories { - mavenCentral() -} - -dependencies { - - testImplementation 'org.junit.jupiter:junit-jupiter-api:5.7.0' - testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.7.0' -} - -test { - useJUnitPlatform() -} \ No newline at end of file diff --git a/cart-service/common/common-application/build.gradle b/cart-service/common/common-application/build.gradle deleted file mode 100644 index cc4817b9..00000000 --- a/cart-service/common/common-application/build.gradle +++ /dev/null @@ -1,21 +0,0 @@ -plugins { - id 'java' -} - -group 'com.bit.lotte.fresh.cart.common.application' -version '1.0-SNAPSHOT' - -repositories { - mavenCentral() -} - -dependencies { - implementation 'org.springframework.boot:spring-boot-starter-web' - implementation libs.java.validation - testImplementation 'org.junit.jupiter:junit-jupiter-api:5.7.0' - testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.7.0' -} - -test { - useJUnitPlatform() -} \ No newline at end of file diff --git a/cart-service/common/common-application/build/libs/common-application-1.0-SNAPSHOT-plain.jar b/cart-service/common/common-application/build/libs/common-application-1.0-SNAPSHOT-plain.jar deleted file mode 100644 index e69de29b..00000000 diff --git a/cart-service/common/common-application/build/tmp/compileJava/previous-compilation-data.bin b/cart-service/common/common-application/build/tmp/compileJava/previous-compilation-data.bin deleted file mode 100644 index e69de29b..00000000 diff --git a/cart-service/common/common-application/build/tmp/jar/MANIFEST.MF b/cart-service/common/common-application/build/tmp/jar/MANIFEST.MF deleted file mode 100644 index 58630c02..00000000 --- a/cart-service/common/common-application/build/tmp/jar/MANIFEST.MF +++ /dev/null @@ -1,2 +0,0 @@ -Manifest-Version: 1.0 - diff --git a/cart-service/common/common-application/src/main/java/com/bit/lotte/fresh/cart/common/application/handler/ErrorDTO.java b/cart-service/common/common-application/src/main/java/com/bit/lotte/fresh/cart/common/application/handler/ErrorDTO.java deleted file mode 100644 index 4b00fe35..00000000 --- a/cart-service/common/common-application/src/main/java/com/bit/lotte/fresh/cart/common/application/handler/ErrorDTO.java +++ /dev/null @@ -1,15 +0,0 @@ -package com.bit.lotte.fresh.cart.common.application.handler; - -import lombok.AllArgsConstructor; -import lombok.Builder; -import lombok.Data; -import org.springframework.http.HttpStatus; - -@Data -@Builder -@AllArgsConstructor -public class ErrorDTO { - private final String code; - private final HttpStatus status; - private final String message; -} diff --git a/cart-service/common/common-application/src/main/java/com/bit/lotte/fresh/cart/common/application/handler/GlobalExceptionHandler.java b/cart-service/common/common-application/src/main/java/com/bit/lotte/fresh/cart/common/application/handler/GlobalExceptionHandler.java deleted file mode 100644 index c6f05582..00000000 --- a/cart-service/common/common-application/src/main/java/com/bit/lotte/fresh/cart/common/application/handler/GlobalExceptionHandler.java +++ /dev/null @@ -1,60 +0,0 @@ -package com.bit.lotte.fresh.cart.common.application.handler; - -import java.util.stream.Collectors; -import javax.validation.ConstraintViolation; -import javax.validation.ConstraintViolationException; -import javax.validation.ValidationException; -import lombok.extern.slf4j.Slf4j; -import org.springframework.http.HttpStatus; -import org.springframework.web.bind.annotation.ExceptionHandler; -import org.springframework.web.bind.annotation.ResponseBody; -import org.springframework.web.bind.annotation.ResponseStatus; -import org.springframework.web.bind.annotation.RestControllerAdvice; - -@Slf4j -@RestControllerAdvice -public class GlobalExceptionHandler { - - @ExceptionHandler(IllegalArgumentException.class) - @ResponseStatus(HttpStatus.BAD_REQUEST) - @ResponseBody - public ErrorDTO handleIllegalArgumentException( - IllegalArgumentException illegalArgumentException) { - String exceptionMessage = illegalArgumentException.getMessage(); - return ErrorDTO.builder() - .code(HttpStatus.BAD_REQUEST.getReasonPhrase()) - .status(HttpStatus.valueOf(400)) - .message(exceptionMessage) - .build(); - } - - @ExceptionHandler(value = {ValidationException.class}) - @ResponseStatus(HttpStatus.BAD_REQUEST) - public ErrorDTO handleException(ValidationException validationException) { - ErrorDTO errorDTO; - if (validationException instanceof ConstraintViolationException) { - String violations = extractViolationsFromException( - (ConstraintViolationException) validationException); - errorDTO = ErrorDTO.builder() - .code(HttpStatus.BAD_REQUEST.getReasonPhrase()) - .message(violations).status((HttpStatus.valueOf(400))) - .build(); - } else { - String exceptionMessage = validationException.getMessage(); - errorDTO = ErrorDTO.builder() - .code(HttpStatus.BAD_REQUEST.getReasonPhrase()) - .message(exceptionMessage) - .build(); - } - return errorDTO; - } - - - private String extractViolationsFromException(ConstraintViolationException validationException) { - return validationException.getConstraintViolations() - .stream() - .map(ConstraintViolation::getMessage) - .collect(Collectors.joining("--")); - } - -} diff --git a/cart-service/common/common-domain/build.gradle b/cart-service/common/common-domain/build.gradle deleted file mode 100644 index 9644ca0f..00000000 --- a/cart-service/common/common-domain/build.gradle +++ /dev/null @@ -1,20 +0,0 @@ -plugins { - id 'java' -} - -group 'com.bit.lotte.fresh.cart.common.domain' -version '1.0-SNAPSHOT' - -repositories { - mavenCentral() -} - -dependencies { - implementation(libs.java.validation) - testImplementation 'org.junit.jupiter:junit-jupiter-api:5.7.0' - testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.7.0' -} - -test { - useJUnitPlatform() -} \ No newline at end of file diff --git a/cart-service/common/common-domain/build/libs/common-domain-1.0-SNAPSHOT-plain.jar b/cart-service/common/common-domain/build/libs/common-domain-1.0-SNAPSHOT-plain.jar deleted file mode 100644 index e69de29b..00000000 diff --git a/cart-service/common/common-domain/build/tmp/compileJava/previous-compilation-data.bin b/cart-service/common/common-domain/build/tmp/compileJava/previous-compilation-data.bin deleted file mode 100644 index e69de29b..00000000 diff --git a/cart-service/common/common-domain/build/tmp/jar/MANIFEST.MF b/cart-service/common/common-domain/build/tmp/jar/MANIFEST.MF deleted file mode 100644 index 58630c02..00000000 --- a/cart-service/common/common-domain/build/tmp/jar/MANIFEST.MF +++ /dev/null @@ -1,2 +0,0 @@ -Manifest-Version: 1.0 - diff --git a/cart-service/common/common-domain/src/main/java/com/bit/lotte/fresh/cart/common/domain/entity/AggregateRoot.java b/cart-service/common/common-domain/src/main/java/com/bit/lotte/fresh/cart/common/domain/entity/AggregateRoot.java deleted file mode 100644 index 2e5bee5c..00000000 --- a/cart-service/common/common-domain/src/main/java/com/bit/lotte/fresh/cart/common/domain/entity/AggregateRoot.java +++ /dev/null @@ -1,23 +0,0 @@ -package com.bit.lotte.fresh.cart.common.domain.entity; - -import lombok.NoArgsConstructor; -import lombok.experimental.SuperBuilder; -import lombok.extern.slf4j.Slf4j; - -@Slf4j -@SuperBuilder -public abstract class AggregateRoot extends BaseEntity { - - public AggregateRoot(ID id) { - super(id); - log.info(id.toString()); - } - - public AggregateRoot() { - } - - public AggregateRoot( - BaseEntityBuilder b) { - super(b); - } -} diff --git a/cart-service/common/common-domain/src/main/java/com/bit/lotte/fresh/cart/common/domain/entity/BaseEntity.java b/cart-service/common/common-domain/src/main/java/com/bit/lotte/fresh/cart/common/domain/entity/BaseEntity.java deleted file mode 100644 index f2b62eeb..00000000 --- a/cart-service/common/common-domain/src/main/java/com/bit/lotte/fresh/cart/common/domain/entity/BaseEntity.java +++ /dev/null @@ -1,36 +0,0 @@ -package com.bit.lotte.fresh.cart.common.domain.entity; - -import java.util.Objects; -import lombok.AllArgsConstructor; -import lombok.Getter; -import lombok.NoArgsConstructor; -import lombok.experimental.SuperBuilder; -@SuperBuilder -@Getter -@AllArgsConstructor -@NoArgsConstructor -public abstract class BaseEntity { - - private ID id; - - public ID getEntityId() { - return id; - } - - public void setEntityId(ID id) { - this.id = id; - } - - @Override - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - BaseEntity that = (BaseEntity) o; - return id.equals(that.id); - } - - @Override - public int hashCode() { - return Objects.hash(id); - } -} diff --git a/cart-service/common/common-domain/src/main/java/com/bit/lotte/fresh/cart/common/domain/event/DomainEvent.java b/cart-service/common/common-domain/src/main/java/com/bit/lotte/fresh/cart/common/domain/event/DomainEvent.java deleted file mode 100644 index cf199bd4..00000000 --- a/cart-service/common/common-domain/src/main/java/com/bit/lotte/fresh/cart/common/domain/event/DomainEvent.java +++ /dev/null @@ -1,4 +0,0 @@ -package com.bit.lotte.fresh.cart.common.domain.event; - -public interface DomainEvent { -} diff --git a/cart-service/common/common-domain/src/main/java/com/bit/lotte/fresh/cart/common/domain/event/publisher/DomainEventPublisher.java b/cart-service/common/common-domain/src/main/java/com/bit/lotte/fresh/cart/common/domain/event/publisher/DomainEventPublisher.java deleted file mode 100644 index 3342724a..00000000 --- a/cart-service/common/common-domain/src/main/java/com/bit/lotte/fresh/cart/common/domain/event/publisher/DomainEventPublisher.java +++ /dev/null @@ -1,8 +0,0 @@ -package com.bit.lotte.fresh.cart.common.domain.event.publisher; - -import com.bit.lotte.fresh.cart.common.domain.event.DomainEvent; - -public interface DomainEventPublisher> { - - void publish(T domainEvent); -} diff --git a/cart-service/common/common-domain/src/main/java/com/bit/lotte/fresh/cart/common/domain/exception/DomainException.java b/cart-service/common/common-domain/src/main/java/com/bit/lotte/fresh/cart/common/domain/exception/DomainException.java deleted file mode 100644 index 041b3c08..00000000 --- a/cart-service/common/common-domain/src/main/java/com/bit/lotte/fresh/cart/common/domain/exception/DomainException.java +++ /dev/null @@ -1,12 +0,0 @@ -package com.bit.lotte.fresh.cart.common.domain.exception; - -public class DomainException extends RuntimeException { - - public DomainException(String message) { - super(message); - } - - public DomainException(String message, Throwable cause) { - super(message, cause); - } -} diff --git a/cart-service/common/common-domain/src/main/java/com/bit/lotte/fresh/cart/common/domain/instant/AuthHeaderName.java b/cart-service/common/common-domain/src/main/java/com/bit/lotte/fresh/cart/common/domain/instant/AuthHeaderName.java deleted file mode 100644 index 7a3296a9..00000000 --- a/cart-service/common/common-domain/src/main/java/com/bit/lotte/fresh/cart/common/domain/instant/AuthHeaderName.java +++ /dev/null @@ -1,6 +0,0 @@ -package com.bit.lotte.fresh.cart.common.domain.instant; - -public class AuthHeaderName { - - public static String REQUEST_ID_HEADER ="UserId"; -} diff --git a/cart-service/common/common-domain/src/main/java/com/bit/lotte/fresh/cart/common/domain/instant/DomainConstants.java b/cart-service/common/common-domain/src/main/java/com/bit/lotte/fresh/cart/common/domain/instant/DomainConstants.java deleted file mode 100644 index 835cfb28..00000000 --- a/cart-service/common/common-domain/src/main/java/com/bit/lotte/fresh/cart/common/domain/instant/DomainConstants.java +++ /dev/null @@ -1,9 +0,0 @@ -package com.bit.lotte.fresh.cart.common.domain.instant; - -public class DomainConstants { - - private DomainConstants() { - } - - public static final String UTC = "UTC"; -} diff --git a/cart-service/common/common-domain/src/main/java/com/bit/lotte/fresh/cart/common/domain/valueobject/BaseId.java b/cart-service/common/common-domain/src/main/java/com/bit/lotte/fresh/cart/common/domain/valueobject/BaseId.java deleted file mode 100644 index 001f02ab..00000000 --- a/cart-service/common/common-domain/src/main/java/com/bit/lotte/fresh/cart/common/domain/valueobject/BaseId.java +++ /dev/null @@ -1,33 +0,0 @@ -package com.bit.lotte.fresh.cart.common.domain.valueobject; - -import java.util.Objects; -import lombok.AllArgsConstructor; -import lombok.Getter; -import lombok.NoArgsConstructor; - -@NoArgsConstructor -@Getter -public abstract class BaseId { - private T value; - - protected BaseId(T value) { - this.value = value; - } - - public T getValue() { - return value; - } - - @Override - public boolean equals(Object o) { - if (this == o) return true; - if (o == null || getClass() != o.getClass()) return false; - BaseId baseId = (BaseId) o; - return value.equals(baseId.value); - } - - @Override - public int hashCode() { - return Objects.hash(value); - } -} diff --git a/cart-service/common/common-domain/src/main/java/com/bit/lotte/fresh/cart/common/domain/valueobject/CartItemCompKey.java b/cart-service/common/common-domain/src/main/java/com/bit/lotte/fresh/cart/common/domain/valueobject/CartItemCompKey.java deleted file mode 100644 index e62677c3..00000000 --- a/cart-service/common/common-domain/src/main/java/com/bit/lotte/fresh/cart/common/domain/valueobject/CartItemCompKey.java +++ /dev/null @@ -1,23 +0,0 @@ -package com.bit.lotte.fresh.cart.common.domain.valueobject; - - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonIgnore; -import lombok.Getter; -import lombok.NoArgsConstructor; - -@Getter -@NoArgsConstructor -public class CartItemCompKey { - - private ProductId productId; - private UserCartId userCartId; - - - @JsonCreator - public CartItemCompKey( - ProductId productId, UserCartId userCartId) { - this.productId = productId; - this.userCartId = userCartId; - } -} diff --git a/cart-service/common/common-domain/src/main/java/com/bit/lotte/fresh/cart/common/domain/valueobject/ProductId.java b/cart-service/common/common-domain/src/main/java/com/bit/lotte/fresh/cart/common/domain/valueobject/ProductId.java deleted file mode 100644 index 1c69bdc3..00000000 --- a/cart-service/common/common-domain/src/main/java/com/bit/lotte/fresh/cart/common/domain/valueobject/ProductId.java +++ /dev/null @@ -1,14 +0,0 @@ -package com.bit.lotte.fresh.cart.common.domain.valueobject; - - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonProperty; - -public class ProductId extends BaseId { - @JsonCreator - public ProductId(@JsonProperty("productId")Long value) { - super(value); - } - - -} diff --git a/cart-service/common/common-domain/src/main/java/com/bit/lotte/fresh/cart/common/domain/valueobject/UserCartId.java b/cart-service/common/common-domain/src/main/java/com/bit/lotte/fresh/cart/common/domain/valueobject/UserCartId.java deleted file mode 100644 index b9902a69..00000000 --- a/cart-service/common/common-domain/src/main/java/com/bit/lotte/fresh/cart/common/domain/valueobject/UserCartId.java +++ /dev/null @@ -1,14 +0,0 @@ -package com.bit.lotte.fresh.cart.common.domain.valueobject; - - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonProperty; - -public class UserCartId extends BaseId{ - @JsonCreator - public UserCartId(@JsonProperty("userId") Long value) { - super(value); - } - - -} diff --git a/cart-service/gradle/libs.versions.toml b/cart-service/gradle/libs.versions.toml deleted file mode 100644 index d21315a9..00000000 --- a/cart-service/gradle/libs.versions.toml +++ /dev/null @@ -1,24 +0,0 @@ - -[libraries] -spring-web = { module = "org.springframework:spring-web"} -spring-boot = { module = "org.springframework.boot:spring-boot-starter-web"} -spring-kafka = { module = "org.springframework.kafka:spring-kafka"} -cloud-ver = { module = "'org.springframework.cloud:spring-cloud-dependencies'", version = "2021.0.3"} -spring-fegin = { module = "org.springframework.cloud:spring-cloud-starter-openfeign"} -spring-test = { module = "org.springframework.boot:spring-boot-starter-test" } -spring-security = { module = "org.springframework.boot:spring-boot-starter-security" } -spring-feign = { module = "org.springframework.cloud:spring-cloud-starter-openfeign" } -java-validation = { module = "javax.validation:validation-api", version = "2.0.1.Final" } -jpa = { module = "org.springframework.boot:spring-boot-starter-data-jpa" } -hibernate = { module = "org.hibernate:hibernate-core", version = "6.2.5.Final" } -lombok = { module = "org.projectlombok:lombok", version = "1.18.30" } -sl4j = { module = "org.slf4j:slf4j-api", version = "1.7.30" } -h2 = { module = "com.h2database:h2", version = "2.1.214" } -mysql = { module = "mysql:mysql-connector-java", version = "8.0.13" } -json = { module = "com.fasterxml.jackson.core:jackson-annotations", version = "2.15.2" } -jwt ={module ="io.jsonwebtoken:jjwt",version ="0.9.1"} -spring-oauth = { module = "org.springframework.security:spring-security-oauth2-client" } -spring-redis = { module = "org.springframework.data:spring-data-redis" } -redis-client = { module = "redis.clients:jedis", version ="3.10.0"} -apache-avro = { module = "org.apache.avro:avro", version = "1.8.2" } - diff --git a/cart-service/gradle/wrapper/gradle-wrapper.jar b/cart-service/gradle/wrapper/gradle-wrapper.jar deleted file mode 100644 index e69de29b..00000000 diff --git a/cart-service/gradle/wrapper/gradle-wrapper.properties b/cart-service/gradle/wrapper/gradle-wrapper.properties deleted file mode 100644 index 69a97150..00000000 --- a/cart-service/gradle/wrapper/gradle-wrapper.properties +++ /dev/null @@ -1,5 +0,0 @@ -distributionBase=GRADLE_USER_HOME -distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-7.1-bin.zip -zipStoreBase=GRADLE_USER_HOME -zipStorePath=wrapper/dists diff --git a/cart-service/gradlew b/cart-service/gradlew deleted file mode 100644 index 744e882e..00000000 --- a/cart-service/gradlew +++ /dev/null @@ -1,185 +0,0 @@ -#!/usr/bin/env sh - -# -# Copyright 2015 the original author or authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -############################################################################## -## -## Gradle start up script for UN*X -## -############################################################################## - -# Attempt to set APP_HOME -# Resolve links: $0 may be a link -PRG="$0" -# Need this for relative symlinks. -while [ -h "$PRG" ] ; do - ls=`ls -ld "$PRG"` - link=`expr "$ls" : '.*-> \(.*\)$'` - if expr "$link" : '/.*' > /dev/null; then - PRG="$link" - else - PRG=`dirname "$PRG"`"/$link" - fi -done -SAVED="`pwd`" -cd "`dirname \"$PRG\"`/" >/dev/null -APP_HOME="`pwd -P`" -cd "$SAVED" >/dev/null - -APP_NAME="Gradle" -APP_BASE_NAME=`basename "$0"` - -# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. -DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' - -# Use the maximum available, or set MAX_FD != -1 to use that value. -MAX_FD="maximum" - -warn () { - echo "$*" -} - -die () { - echo - echo "$*" - echo - exit 1 -} - -# OS specific support (must be 'true' or 'false'). -cygwin=false -msys=false -darwin=false -nonstop=false -case "`uname`" in - CYGWIN* ) - cygwin=true - ;; - Darwin* ) - darwin=true - ;; - MSYS* | MINGW* ) - msys=true - ;; - NONSTOP* ) - nonstop=true - ;; -esac - -CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar - - -# Determine the Java command to use to start the JVM. -if [ -n "$JAVA_HOME" ] ; then - if [ -x "$JAVA_HOME/jre/sh/java" ] ; then - # IBM's JDK on AIX uses strange locations for the executables - JAVACMD="$JAVA_HOME/jre/sh/java" - else - JAVACMD="$JAVA_HOME/bin/java" - fi - if [ ! -x "$JAVACMD" ] ; then - die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME - -Please set the JAVA_HOME variable in your environment to match the -location of your Java installation." - fi -else - JAVACMD="java" - which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. - -Please set the JAVA_HOME variable in your environment to match the -location of your Java installation." -fi - -# Increase the maximum file descriptors if we can. -if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then - MAX_FD_LIMIT=`ulimit -H -n` - if [ $? -eq 0 ] ; then - if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then - MAX_FD="$MAX_FD_LIMIT" - fi - ulimit -n $MAX_FD - if [ $? -ne 0 ] ; then - warn "Could not set maximum file descriptor limit: $MAX_FD" - fi - else - warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT" - fi -fi - -# For Darwin, add options to specify how the application appears in the dock -if $darwin; then - GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\"" -fi - -# For Cygwin or MSYS, switch paths to Windows format before running java -if [ "$cygwin" = "true" -o "$msys" = "true" ] ; then - APP_HOME=`cygpath --path --mixed "$APP_HOME"` - CLASSPATH=`cygpath --path --mixed "$CLASSPATH"` - - JAVACMD=`cygpath --unix "$JAVACMD"` - - # We build the pattern for arguments to be converted via cygpath - ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null` - SEP="" - for dir in $ROOTDIRSRAW ; do - ROOTDIRS="$ROOTDIRS$SEP$dir" - SEP="|" - done - OURCYGPATTERN="(^($ROOTDIRS))" - # Add a user-defined pattern to the cygpath arguments - if [ "$GRADLE_CYGPATTERN" != "" ] ; then - OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)" - fi - # Now convert the arguments - kludge to limit ourselves to /bin/sh - i=0 - for arg in "$@" ; do - CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -` - CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option - - if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition - eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"` - else - eval `echo args$i`="\"$arg\"" - fi - i=`expr $i + 1` - done - case $i in - 0) set -- ;; - 1) set -- "$args0" ;; - 2) set -- "$args0" "$args1" ;; - 3) set -- "$args0" "$args1" "$args2" ;; - 4) set -- "$args0" "$args1" "$args2" "$args3" ;; - 5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;; - 6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;; - 7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;; - 8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;; - 9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;; - esac -fi - -# Escape application args -save () { - for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done - echo " " -} -APP_ARGS=`save "$@"` - -# Collect all arguments for the java command, following the shell quoting and substitution rules -eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS" - -exec "$JAVACMD" "$@" diff --git a/cart-service/gradlew.bat b/cart-service/gradlew.bat deleted file mode 100644 index ac1b06f9..00000000 --- a/cart-service/gradlew.bat +++ /dev/null @@ -1,89 +0,0 @@ -@rem -@rem Copyright 2015 the original author or authors. -@rem -@rem Licensed under the Apache License, Version 2.0 (the "License"); -@rem you may not use this file except in compliance with the License. -@rem You may obtain a copy of the License at -@rem -@rem https://www.apache.org/licenses/LICENSE-2.0 -@rem -@rem Unless required by applicable law or agreed to in writing, software -@rem distributed under the License is distributed on an "AS IS" BASIS, -@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -@rem See the License for the specific language governing permissions and -@rem limitations under the License. -@rem - -@if "%DEBUG%" == "" @echo off -@rem ########################################################################## -@rem -@rem Gradle startup script for Windows -@rem -@rem ########################################################################## - -@rem Set local scope for the variables with windows NT shell -if "%OS%"=="Windows_NT" setlocal - -set DIRNAME=%~dp0 -if "%DIRNAME%" == "" set DIRNAME=. -set APP_BASE_NAME=%~n0 -set APP_HOME=%DIRNAME% - -@rem Resolve any "." and ".." in APP_HOME to make it shorter. -for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi - -@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. -set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m" - -@rem Find java.exe -if defined JAVA_HOME goto findJavaFromJavaHome - -set JAVA_EXE=java.exe -%JAVA_EXE% -version >NUL 2>&1 -if "%ERRORLEVEL%" == "0" goto execute - -echo. -echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. - -goto fail - -:findJavaFromJavaHome -set JAVA_HOME=%JAVA_HOME:"=% -set JAVA_EXE=%JAVA_HOME%/bin/java.exe - -if exist "%JAVA_EXE%" goto execute - -echo. -echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. - -goto fail - -:execute -@rem Setup the command line - -set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar - - -@rem Execute Gradle -"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %* - -:end -@rem End local scope for the variables with windows NT shell -if "%ERRORLEVEL%"=="0" goto mainEnd - -:fail -rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of -rem the _cmd.exe /c_ return code! -if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 -exit /b 1 - -:mainEnd -if "%OS%"=="Windows_NT" endlocal - -:omega diff --git a/cart-service/settings.gradle b/cart-service/settings.gradle deleted file mode 100644 index eca0d4a1..00000000 --- a/cart-service/settings.gradle +++ /dev/null @@ -1,27 +0,0 @@ - -enableFeaturePreview("VERSION_CATALOGS") -dependencyResolutionManagement { - versionCatalogs { - libs { - '../gradle/libs.versions.toml' - } - } -} - -rootProject.name = 'cart-service' -include 'cart-application' -include 'cart-domain' -include 'cart-domain:cart-domain-core' -findProject(':cart-domain:cart-domain-core')?.name = 'cart-domain-core' -include 'cart-domain:cart-domain-application' -findProject(':cart-domain:cart-domain-application')?.name = 'cart-domain-application' -include 'cart-dataaccess' -include 'cart-message' -include 'cart-container' -include 'common' -include 'common:common-domain' -findProject(':common:common-domain')?.name = 'common-domain' -include 'common:common-application' -findProject(':common:common-application')?.name = 'common-application' - -