Skip to content

full commit - #1

Open
lukaszbos wants to merge 1 commit into
empty-branchfrom
review
Open

lukaszbos wants to merge 1 commit into
empty-branchfrom
review

Conversation

@lukaszbos

Copy link
Copy Markdown
Owner

No description provided.

@@ -0,0 +1,28 @@
<component name="ProjectCodeStyleConfiguration">

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ten plik i reszta z .idea do gitignore

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok

Comment thread derby.log
@@ -0,0 +1,13 @@
----------------------------------------------------------------

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do .gitignore

Comment thread pom.xml
Comment on lines +23 to +31
<dependency>
<groupId>com.h2database</groupId>
<artifactId>h2</artifactId>
</dependency>
<dependency>
<groupId>org.apache.derby</groupId>
<artifactId>derby</artifactId>
<scope>runtime</scope>
</dependency>

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

usuń zbędne

Comment thread pom.xml
Comment on lines +53 to +57
<dependency>
<groupId>org.springframework.hateoas</groupId>
<artifactId>spring-hateoas</artifactId>
<version>0.25.1.RELEASE</version>
</dependency>

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

korzystasz?

@AllArgsConstructor
@NoArgsConstructor
@Entity
@Table(name = "BILL")

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A po co taka nazwa tabeli?

Bill bill = billMapper.toModel(billDTO);
bill.setBillId(billId);
bill.setParking(getParkingById(billDTO.getParking().getParkingId()));
bill.setClient(getClientById(billDTO.getClient().getClientId()));

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

użycie buildera mogłoby tu troszkę lepiej wyglądać, ale to preferencja

return clientMapper.toDTO(addedClient);
}

private void checkIfClientExist(ClientDTO clientDTO) {

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nazwa trochę myli, bo sprawdzasz czy istnieje email a nie klient

return clientMapper.toDTO(addedClient);
}

private boolean isThisClientOnRepo(UUID clientId) {

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nazwa mogłaby być krótsza, np. clientExists()

BigDecimal nextHoursCharge;

long periodOnParkingInMillis = calculateTimeSpent(parkingDate);
System.out.println("time spend przed zaokrogleniem " + periodOnParkingInMillis);

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

logger zamiast system.out

import static org.junit.jupiter.api.Assertions.*;

class ClientTest {

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

pusta klasa

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants