Skip to content

Commit 6dc4b94

Browse files
committedDec 19, 2019
Add project report for e-commerce website
1 parent f67442f commit 6dc4b94

31 files changed

+6172
-0
lines changed
 

‎IDB/Code/HomeController.java

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
@Controller
2+
public class HomeController {
3+
4+
@Resource
5+
private ItemRepository itemRepository;
6+
7+
@GetMapping(value = "/")
8+
public ModelAndView hello() {
9+
ModelAndView modelAndView = new ModelAndView();
10+
modelAndView.addObject("items", itemRepository.findAll());
11+
modelAndView.setViewName("productListingPage");
12+
return modelAndView;
13+
}
14+
15+
@GetMapping("/privacyPolicy")
16+
public ModelAndView getPrivacyPolicy() {
17+
return new ModelAndView("privacyPolicy");
18+
}
19+
}

‎IDB/Code/Item.java

+38
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
@Data
2+
@Entity
3+
@Table(name = "items")
4+
public class Item {
5+
6+
@Id
7+
@GeneratedValue(strategy = GenerationType.IDENTITY)
8+
@Column(name = "item_id")
9+
private long id;
10+
11+
@Column(name = "code")
12+
@NotEmpty(message = "*Code cannot be empty")
13+
private String code;
14+
15+
@Column(name = "name")
16+
@NotEmpty(message = "*Name cannot be empty")
17+
private String name;
18+
19+
@Column(name = "description_pl")
20+
private String descriptionPl;
21+
22+
@Column(name = "description_en")
23+
private String descriptionEn;
24+
25+
@Column(name = "amount")
26+
private int amount;
27+
28+
@Column(name = "price")
29+
@NotNull(message = "*Price cannot be empty")
30+
private BigDecimal price;
31+
32+
@ManyToOne
33+
@JoinColumn(name = "category_id")
34+
private Category category;
35+
36+
@OneToMany(mappedBy = "productId")
37+
private List <Image> images;
38+
}

‎IDB/Code/ProductController.java

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
@Controller
2+
@RequestMapping("/product")
3+
public class ProductController {
4+
5+
@Resource
6+
private ItemService itemService;
7+
8+
@GetMapping(params = {"id"})
9+
public ModelAndView showProduct(@RequestParam(value = "id") long itemId) {
10+
ModelAndView modelAndView = new ModelAndView();
11+
Item item = itemService.findItemById(itemId);
12+
modelAndView.addObject("product", item);
13+
modelAndView.setViewName("productDisplayPage");
14+
return modelAndView;
15+
}
16+
}

‎IDB/Code/cookiesModal.html

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
<div id="cookies" class="cookie-alert alert collapsed" xmlns:th="http://www.thymeleaf.org">
2+
<p th:utext="#{footer.modal.cookies}"></p><br />
3+
<a class="close" th:text="#{footer.modal.cookies.ok}"></a>
4+
</div>

‎IDB/Pics/404.png

38 KB
Loading

‎IDB/Pics/adminPanel1.png

52.5 KB
Loading

‎IDB/Pics/adminPanel2.png

47.3 KB
Loading

‎IDB/Pics/adminPanel3.png

77 KB
Loading

‎IDB/Pics/cart2.png

82.2 KB
Loading

‎IDB/Pics/cart3.png

215 KB
Loading

‎IDB/Pics/classDiagram.png

90.7 KB
Loading

‎IDB/Pics/cookies.png

1.05 MB
Loading

‎IDB/Pics/intellij1.png

30.2 KB
Loading

‎IDB/Pics/login.png

44.4 KB
Loading

‎IDB/Pics/mainPage.png

269 KB
Loading

‎IDB/Pics/mobileMainPage.png

219 KB
Loading

‎IDB/Pics/mvc.png

30.7 KB
Loading

‎IDB/Pics/mysql1.png

33 KB
Loading

‎IDB/Pics/privacy.png

436 KB
Loading

‎IDB/Pics/product1.png

653 KB
Loading

‎IDB/Pics/product2.png

224 KB
Loading

‎IDB/Pics/registration.png

55.7 KB
Loading

‎IDB/Pics/serwer.png

129 KB
Loading

‎IDB/activityDiagram1.tex

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
\begin{tikzpicture}
2+
\umlstateinitial[name=begin]
3+
\node[singlestate] at (4,0) (getName){Podaj dane użytkownika};
4+
\node[singlestate] at (4,-2) (search){Sprawdź, czy istnieje użytkownik o podanym adresie email};
5+
\umlstatedecision[x=4,y=-4,name=decision]
6+
\node[singlestate] at (0,-4) (notFound){Dodaj użytkownika do bazy};
7+
\node[singlestate] at (8,-4) (found){Wyświetl błąd};
8+
\umlstateexit[x=0,y=-5.5,name=success]
9+
10+
\umltrans{begin}{getName}
11+
\umltrans{getName}{search}
12+
\umltrans{search}{decision}
13+
\umltrans{decision}{found}
14+
\umltrans{decision}{notFound}
15+
\umltrans{notFound}{success}
16+
\umlHVHtrans[arm1=3cm]{found}{getName}
17+
\end{tikzpicture}

‎IDB/activityDiagram2.tex

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
\begin{tikzpicture}
2+
\umlstateinitial[name=begin]
3+
\node[singlestate] at (4,0) (getName){Podaj nazwę towaru};
4+
\node[singlestate] at (4,-2) (search){Wyszukaj towar w bazie};
5+
\umlstatedecision[x=4,y=-4,name=decision]
6+
\node[singlestate] at (0,-4) (found){Wyświetl listę produktów};
7+
\node[singlestate] at (8,-4) (notFound){Wyświetl komunikat o braku towaru};
8+
\umlstateexit[x=0,y=-5.5,name=exit1]
9+
\umlstateexit[x=8,y=-5.5,name=exit2]
10+
11+
\umltrans{begin}{getName}
12+
\umltrans{getName}{search}
13+
\umltrans{search}{decision}
14+
\umltrans{decision}{found}
15+
\umltrans{decision}{notFound}
16+
\umltrans{found}{exit1}
17+
\umltrans{notFound}{exit2}
18+
\end{tikzpicture}

‎IDB/activityDiagram3.tex

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
\begin{tikzpicture}
2+
\umlstateinitial[name=begin]
3+
\node[singlestate] at (4,0) (getId){Pobierz identyfikator produktu};
4+
\node[singlestate] at (4,-2) (getUser){Pobierz identyfikator klienta};
5+
\node[singlestate] at (4,-4) (checkAmount){Sprawdź, czy dany przedmiot jest w magazynie};
6+
\umlstatedecision[x=4,y=-7,name=check]
7+
\node[singlestate] at (0,-7) (success){Do koszyka klienta dodaj przedmiot};
8+
\node[singlestate] at (8,-7) (error){Wyświetl komunikat o braku towaru};
9+
\node[singlestate] at (0,-9) (removeFromStock){Zmniejsz ilość produktu w magazynie};
10+
\node[singlestate] at (0,-11) (countValue){Przelicz wartość koszyka};
11+
\umlstateexit[x=0,y=-12.5,name=exit1]
12+
\umlstateexit[x=8,y=-8.5,name=exit2]
13+
14+
\umltrans{begin}{getId}
15+
\umltrans{getId}{getUser}
16+
\umltrans{getUser}{checkAmount}
17+
\umltrans{checkAmount}{check}
18+
\umltrans[arg=Jest, pos=0.5]{check}{success}
19+
\umltrans[arg=Brak, pos=0.3]{check}{error}
20+
\umltrans{success}{removeFromStock}
21+
\umltrans{removeFromStock}{countValue}
22+
\umltrans{countValue}{exit1}
23+
\umltrans{error}{exit2}
24+
25+
\end{tikzpicture}

‎IDB/gantt.tex

+47
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
\begin{turn}{90}
2+
\begin{ganttchart}[
3+
% today=53,
4+
% today rule/.style= {thick},
5+
x unit=0.25cm,
6+
y unit title=0.7cm,
7+
y unit chart=0.7cm,
8+
progress label text={},
9+
bar height=0.7,
10+
group label font=\bfseries,
11+
milestone label font=\tiny\itshape,
12+
title height=1,
13+
bar/.style={draw=black, fill=gray!50},
14+
bar incomplete/.style={draw=black, fill=white},
15+
vgrid, hgrid]{1}{56}
16+
\gantttitle{2019}{56} \\
17+
% \gantttitle{2018}{24} \\
18+
\gantttitle{Październik}{17}
19+
\gantttitle{Listopad}{30}2
20+
\gantttitle{Grudzień}{9} \\
21+
% \gantttitle{January}{4}
22+
% \gantttitle{February}{4}
23+
% \gantttitle{March}{4}
24+
% \gantttitle{April}{4}
25+
% \gantttitle{May}{4}
26+
% \gantttitle{June}{4} \\
27+
\ganttgroup{Projektowanie}{1}{21} \\
28+
\ganttbar[progress=100]{Cel i zakres}{1}{14} \\
29+
\ganttbar[progress=100]{Analiza SWOT}{8}{21} \\
30+
\ganttbar[progress=100]{Diagramy UML}{12}{21} \\
31+
\ganttbar[progress=100]{Kosztorys}{15}{21} \\
32+
\ganttgroup{Implementacja}{15}{50} \\
33+
\ganttbar[progress=100]{Stworzenie projektu}{15}{21} \\
34+
\ganttbar[progress=100]{Stworzenie bazy danych}{15}{28} \\
35+
\ganttbar[progress=100]{Połączenie z bazą}{22}{28} \\
36+
\ganttbar[progress=100]{Stworzenie kontrolerów}{22}{50} \\
37+
\ganttbar[progress=100]{Stworzenie front-endu}{29}{50} \\
38+
\ganttgroup{Wdrożenie}{51}{56} \\
39+
\ganttbar[progress=100]{Prezentacja projektu}{51}{56} \\
40+
% \ganttbar[progress=0]{}{29}{29} % <-- empty label
41+
% \ganttmilestone{Task 11}{35}
42+
43+
% \ganttlink{elem6}{elem9}
44+
% \ganttlink{elem6}{elem8}
45+
\end{ganttchart}
46+
\end{turn}
47+
% \caption{Harmonogram zadań}

‎IDB/main.tex

+512
Large diffs are not rendered by default.

‎IDB/references.bib

+64
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
@misc{maven,
2+
author = {The Apache Software Foundation},
3+
title = {Apache Maven},
4+
year = 2019,
5+
url = {https://maven.apache.org/},
6+
howpublished = {\url{https://maven.apache.org/}},
7+
note = {Odwiedzona: 2019-11-30}
8+
}
9+
@misc{openjdk-13,
10+
author = {Oracle Corporation},
11+
title = {JDK 13},
12+
year = 2019,
13+
url = {https://openjdk.java.net/projects/jdk/13/},
14+
howpublished = {\url{https://openjdk.java.net/projects/jdk/13/}},
15+
note = {Odwiedzona: 2019-12-08}
16+
}
17+
@misc{intellij-idea,
18+
author = {JetBrains s.r.o.},
19+
title = {IntelliJ IDEA},
20+
year = 2019,
21+
url = {https://www.jetbrains.com/idea/},
22+
howpublished = {\url{https://www.jetbrains.com/idea/}},
23+
note = {Odwiedzona: 2019-11-30}
24+
}
25+
@misc{hibernate,
26+
author = {Red Hat},
27+
title = {Hibernate},
28+
year = 2019,
29+
url = {https://hibernate.org/},
30+
howpublished = {\url{https://hibernate.org/}},
31+
note = {Odwiedzona: 2019-12-09}
32+
}
33+
@misc{thymeleaf,
34+
author = {The Thymeleaf Team},
35+
title = {Thymeleaf},
36+
year = 2019,
37+
url = {https://www.thymeleaf.org/},
38+
howpublished = {\url{https://www.thymeleaf.org/}},
39+
note = {Odwiedzona: 2019-12-09}
40+
}
41+
@misc{materialize,
42+
author = {Materialize},
43+
title = {Materialize},
44+
year = 2019,
45+
url = {https://materializecss.com/},
46+
howpublished = {\url{https://materializecss.com/}},
47+
note = {Odwiedzona: 2019-12-09}
48+
}
49+
@misc{mvc-tutorial,
50+
author = {javatpoint},
51+
title = {Spring MVC Tutorial},
52+
year = 2019,
53+
url = {https://www.javatpoint.com/spring-mvc-tutorial},
54+
howpublished = {\url{https://www.javatpoint.com/spring-mvc-tutorial}},
55+
note = {Odwiedzona: 2019-12-09}
56+
}
57+
@misc{heroku,
58+
author = {Wikipedia Foundation},
59+
title = {Heroku},
60+
year = 2019,
61+
url = {https://pl.wikipedia.org/wiki/Heroku},
62+
howpublished = {\url{https://pl.wikipedia.org/wiki/Heroku}},
63+
note = {Odwiedzona: 2019-12-09}
64+
}

‎IDB/tikz-uml.sty

+5,376
Large diffs are not rendered by default.

‎IDB/useCaseDiagram.tex

+36
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
\begin{tikzpicture}
2+
\begin{umlsystem}[x=4.5, fill=gray!10]{Sklep internetowy}
3+
\umlusecase[x=2, y=10, fill=cyan!30, width=3cm]{Zalogowanie się na konto}
4+
\umlusecase[y=8, fill=cyan!30, width=3cm]{Utworzenie konta}
5+
\umlusecase[y=6, fill=cyan!30, width=3cm]{Dodanie towaru do koszyka}
6+
\umlusecase[y=4, fill=cyan!30, width=3cm]{Usunięcie towaru z koszyka}
7+
\umlusecase[y=2, fill=cyan!30, width=3cm]{Wyświetlanie koszyka}
8+
9+
\umlusecase[x=5, y=8, fill=cyan!30, width=3cm]{Wyświetlanie listy produktów}
10+
\umlusecase[x=5, y=6, fill=cyan!30, width=3cm]{Dodawanie produktów do bazy}
11+
\umlusecase[x=5, y=4, fill=cyan!30, width=3cm]{Usuwanie produktów z bazy}
12+
\umlusecase[x=5, y=2, fill=cyan!30, width=3cm]{Wyświetlanie listy kategorii}
13+
\umlusecase[x=5, y=0, fill=cyan!30, width=3cm]{Dodawanie kategorii do bazy}
14+
\umlusecase[x=5, y=-2, fill=cyan!30, width=3cm]{Usuwanie kategorii z bazy}
15+
\umlusecase[x=5, y=-4, fill=cyan!30, width=3cm]{Wyświetlanie zarejestrowanych użytkowników}
16+
\umlusecase[x=5, y=-6.5, fill=cyan!30, width=3cm]{Wyświetlanie złożonych zamówień}
17+
\umlusecase[x=5, y=-9, fill=cyan!30, width=3cm]{Wyświetlanie stworzonych koszyków}
18+
\end{umlsystem}
19+
\umlactor[y=6]{Klient}
20+
\umlactor[x=14, y=0]{Admin}
21+
\umlassoc{Klient}{usecase-1}
22+
\umlassoc{Klient}{usecase-2}
23+
\umlassoc{Klient}{usecase-3}
24+
\umlassoc{Klient}{usecase-4}
25+
\umlassoc{Klient}{usecase-5}
26+
\umlassoc{Admin}{usecase-1}
27+
\umlassoc{Admin}{usecase-6}
28+
\umlassoc{Admin}{usecase-7}
29+
\umlassoc{Admin}{usecase-8}
30+
\umlassoc{Admin}{usecase-9}
31+
\umlassoc{Admin}{usecase-10}
32+
\umlassoc{Admin}{usecase-11}
33+
\umlassoc{Admin}{usecase-12}
34+
\umlassoc{Admin}{usecase-13}
35+
\umlassoc{Admin}{usecase-14}
36+
\end{tikzpicture}

0 commit comments

Comments
 (0)
Please sign in to comment.