feature/customer_orders #77

Manually merged
Ghost merged 2 commits from feature/customer_orders into master 2020-06-18 01:16:38 +02:00
Collaborator

Ich übernehme Review

Ich übernehme Review
Seil0 added the
review
label 2020-06-16 19:20:33 +02:00
CodeSteak was assigned by Seil0 2020-06-16 19:20:35 +02:00
CodeSteak reviewed 2020-06-16 19:35:02 +02:00
@ -0,0 +14,4 @@
import java.util.*;
@Service
public class RestServiceForDelivery {
Author
Collaborator

Name vlcht etwas zu ausführlich, aber OK :D

Name vlcht etwas zu ausführlich, aber OK :D
@ -0,0 +22,4 @@
public String getDeliveryID(CustomerOrder customerOrder) throws ResourceAccessException
{
String url = "http://[::1]:8082/newDelivery";
Author
Collaborator

Besser hier Klassen-Konstate mit http://[::1]:8082

Besser hier Klassen-Konstate mit http://[::1]:8082
@ -0,0 +68,4 @@
{
return response.getBody();
} else {
return new DeliveryData("DHL-Server ist gerade nicht erreichbar","--:--:----");
Author
Collaborator

Server ist in diesem Fall aber erreichbar.
Error Handling über Strings sollte hier nicht passieren, sondern erst in Templates

Server ist in diesem Fall aber erreichbar. Error Handling über Strings sollte hier nicht passieren, sondern erst in Templates
@ -0,0 +73,4 @@
}
catch (ResourceAccessException e)
{
return new DeliveryData("DHL-Server gerade nicht erreichbar","--:--:----");
Author
Collaborator

Same

Same
@ -3,9 +3,12 @@ package org.hso.ecommerce.app;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.domain.EntityScan;
import org.springframework.context.ConfigurableApplicationContext;
Author
Collaborator

Imports wurden hinzygefügt, aber die Klasse nicht verändert?

Imports wurden hinzygefügt, aber die Klasse nicht verändert?
@ -51,1 +58,3 @@
model.addAttribute("orders", orders);
List<CustomerOrder> orders = customerOrderRepository.getAllOrders();
Map<CustomerOrder, DeliveryData> customerOrderDeliveryDataMap = orders.stream().collect
Author
Collaborator

Formatierung komisch

Formatierung komisch
@ -0,0 +1,75 @@
package org.hso.ecommerce.uiModel;
Author
Collaborator

packetnamen sollten klein sein

packetnamen sollten klein sein
@ -0,0 +28,4 @@
isDelivered = status.equals("Lieferung erfolgreich");
}
public static DeliveryData getDeliveryDataFromCustomerOrder(CustomerOrder customerOrder, CustomerOrderRepository customerOrderRepository, RestServiceForDelivery restServiceForDelivery)
Author
Collaborator

Logic sollte in Action oder Controller stattfinden. UiModels sollten einfache Datenklassen sein

Logic sollte in Action oder Controller stattfinden. UiModels sollten einfache Datenklassen sein
@ -0,0 +31,4 @@
public static DeliveryData getDeliveryDataFromCustomerOrder(CustomerOrder customerOrder, CustomerOrderRepository customerOrderRepository, RestServiceForDelivery restServiceForDelivery)
{
if(customerOrder.trackingId == null)
return new DeliveryData("Bestellung wurde elektronisch angekündigt","");
Author
Collaborator

Strings im Idealfall eher im Template. Hier besser mit ENUMs oder booleans etc. arbeiten

Strings im Idealfall eher im Template. Hier besser mit ENUMs oder booleans etc. arbeiten
@ -16,3 +16,3 @@
<nav></nav>
<div>
<h1>Bestellung 1010</h1>
<h1 th:text="|Bestellung ${order.id}|"></h1>
Author
Collaborator

Wozu die "|" ?

Wozu die "|" ?
First-time contributor

Das hat Hannes so gemacht, es ging darum das man so Text reinschreiben kann wenn ich mich richtig erinnere.

Das hat Hannes so gemacht, es ging darum das man so Text reinschreiben kann wenn ich mich richtig erinnere.
Author
Collaborator

Ahh okay

Ahh okay
Author
Collaborator

Also entweder ist ein schließendes "|" zu viel oder überall anders fehlts

Also entweder ist ein schließendes "|" zu viel oder überall anders fehlts
CodeSteak reviewed 2020-06-16 20:29:31 +02:00
@ -7,3 +8,4 @@
import java.util.Optional;
import static jdk.nashorn.internal.runtime.regexp.joni.Syntax.Java;
Author
Collaborator

Bitte Imports checken

Bitte Imports checken
CodeSteak reviewed 2020-06-17 17:27:22 +02:00
@ -26,3 +26,3 @@
<div class="content-width">
<div>
<h2 id="20202701"> Bestellung vom 27.01.2020 </h2>
<h2 th:text="| Bestellung vom ${order.created.toString().substring(0,10)}"></h2>
Author
Collaborator

Schließendes "|" fehlt.

Schließendes "|" fehlt.
Author
Collaborator

Nur Formatiert, passt.

Nur Formatiert, passt.
CodeSteak reviewed 2020-06-17 17:27:51 +02:00
@ -24,2 +24,2 @@
<div th:each="order: ${orders}">
<h2 id="20202701" th:text="|Bestellung vom ${order.formatCreated()}" />
<div th:each="order: ${orderDeliveryDataMap}">
<h2 id="20202701" th:text="|Bestellung vom ${order.getKey().formatCreated()}" />
Author
Collaborator

Schließendes "|" fehlt

Schließendes "|" fehlt
Author
Collaborator

Nur Formatiert, passt.

Nur Formatiert, passt.
Ghost closed this pull request 2020-06-18 01:16:38 +02:00
This repo is archived. You cannot comment on pull requests.
No description provided.