-
-
Notifications
You must be signed in to change notification settings - Fork 110
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Product update product entity #50
Changes from 10 commits
4e79612
45dd997
76ace1a
3f62895
7133cd8
8eddd30
4613e8f
afad3a8
fd3a54d
0c25fe3
50fe026
d0da2f3
60ed25b
01999ce
e06eba6
c11426a
0c17db0
f998ca9
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd"> | ||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd"> | ||
|
||
<modelVersion>4.0.0</modelVersion> | ||
|
||
|
@@ -231,6 +231,18 @@ | |
<groupId>org.springframework.boot</groupId> | ||
<artifactId>spring-boot-starter-data-jpa</artifactId> | ||
</dependency> | ||
|
||
<!-- DataBase dependencies--> | ||
<dependency> | ||
<groupId>org.postgresql</groupId> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. зачем нам эта зависимость? |
||
<artifactId>postgresql</artifactId> | ||
<version>42.5.4</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.liquibase</groupId> | ||
<artifactId>liquibase-core</artifactId> | ||
<version>4.23.0</version> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. версии всегда прячь в |
||
</dependency> | ||
</dependencies> | ||
<build> | ||
<plugins> | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,7 +2,6 @@ | |
|
||
import com.zufar.onlinestore.product.dto.ProductInfoDto; | ||
import com.zufar.onlinestore.product.entity.ProductInfo; | ||
import lombok.AllArgsConstructor; | ||
import org.springframework.stereotype.Component; | ||
|
||
@Component | ||
|
@@ -11,17 +10,19 @@ public class ProductInfoDtoConverter { | |
public ProductInfoDto convertToDto(final ProductInfo entity) { | ||
return ProductInfoDto.builder() | ||
.id(entity.getId()) | ||
.category(entity.getCategory()) | ||
.description(entity.getDescription()) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ты либо используй гетеры |
||
.name(entity.getName()) | ||
.price(entity.getPrice()) | ||
.currency(entity.getCurrency()) | ||
.build(); | ||
} | ||
|
||
public ProductInfo convertToEntity(final ProductInfoDto dto) { | ||
return ProductInfo.builder() | ||
.category(dto.getCategory()) | ||
.name(dto.getName()) | ||
.price(dto.getPrice()) | ||
.description(dto.description()) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ты либо используй гетеры |
||
.name(dto.name()) | ||
.price(dto.price()) | ||
.currency(dto.currency()) | ||
.build(); | ||
} | ||
} |
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Зачем ты удалил класс для цены? |
This file was deleted.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Пожалуйста, не забывай про пробелы