From 157556ebae54e9072b8563b1325d4d3a4042b5d0 Mon Sep 17 00:00:00 2001 From: David Date: Tue, 24 Aug 2021 17:28:08 +0200 Subject: [PATCH 001/208] feat(service): add UserDeletionService --- .../service/user/UserDeletionService.java | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 src/main/java/com/openclassrooms/moneytransfersystem/service/user/UserDeletionService.java diff --git a/src/main/java/com/openclassrooms/moneytransfersystem/service/user/UserDeletionService.java b/src/main/java/com/openclassrooms/moneytransfersystem/service/user/UserDeletionService.java new file mode 100644 index 0000000..61816fe --- /dev/null +++ b/src/main/java/com/openclassrooms/moneytransfersystem/service/user/UserDeletionService.java @@ -0,0 +1,9 @@ +package com.openclassrooms.moneytransfersystem.service.user; + +import org.springframework.stereotype.Service; + +@Service +public class UserDeletionService { + + +} From 58ea7f54395bf827d08995424ce53d5b529de64b Mon Sep 17 00:00:00 2001 From: David Date: Tue, 24 Aug 2021 17:29:09 +0200 Subject: [PATCH 002/208] feat(service): update UserDeletionService --- .../service/user/UserDeletionService.java | 22 +++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/src/main/java/com/openclassrooms/moneytransfersystem/service/user/UserDeletionService.java b/src/main/java/com/openclassrooms/moneytransfersystem/service/user/UserDeletionService.java index 61816fe..fe4120c 100644 --- a/src/main/java/com/openclassrooms/moneytransfersystem/service/user/UserDeletionService.java +++ b/src/main/java/com/openclassrooms/moneytransfersystem/service/user/UserDeletionService.java @@ -1,9 +1,31 @@ package com.openclassrooms.moneytransfersystem.service.user; +import com.openclassrooms.moneytransfersystem.dao.UserRepository; +import com.openclassrooms.moneytransfersystem.model.User; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; @Service public class UserDeletionService { + @Autowired + private UserRepository userRepository; + Logger logger = LoggerFactory.getLogger(UserDeletionService.class); + + public void deleteUserById(Long id) { + + if(userRepository.existsById(id)) { + logger.debug("Delete " + User.class.getName() + " by id: " + id); + userRepository.deleteById(id); + } + } + + public void deleteUsers() { + + logger.debug("Delete all " + User.class.getName()); + userRepository.deleteAll(); + } } From 0e82a8827d1c6ca6ca03b26c2552c4056375e228 Mon Sep 17 00:00:00 2001 From: David Date: Tue, 24 Aug 2021 17:30:26 +0200 Subject: [PATCH 003/208] feat(controller): update UserController --- .../controller/UserController.java | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/src/main/java/com/openclassrooms/moneytransfersystem/controller/UserController.java b/src/main/java/com/openclassrooms/moneytransfersystem/controller/UserController.java index 174ea05..b82cf01 100644 --- a/src/main/java/com/openclassrooms/moneytransfersystem/controller/UserController.java +++ b/src/main/java/com/openclassrooms/moneytransfersystem/controller/UserController.java @@ -2,6 +2,7 @@ import com.openclassrooms.moneytransfersystem.model.User; import com.openclassrooms.moneytransfersystem.service.user.UserCreationService; +import com.openclassrooms.moneytransfersystem.service.user.UserDeletionService; import com.openclassrooms.moneytransfersystem.service.user.UserReadService; import com.openclassrooms.moneytransfersystem.service.user.UserUpdateService; import org.springframework.beans.factory.annotation.Autowired; @@ -21,6 +22,9 @@ public class UserController { @Autowired private UserUpdateService userUpdateService; + @Autowired + private UserDeletionService userDeletionService; + @PostMapping("/createUser") public User createUser(@RequestBody User user) { @@ -56,4 +60,16 @@ public User updateUser(@RequestBody User user) { return userUpdateService.updateUser(user); } + + @DeleteMapping("/users/{id}") + public void deleteUser(@PathVariable Long id) { + + userDeletionService.deleteUserById(id); + } + + @DeleteMapping("/users") + public void deleteUsers() { + + userDeletionService.deleteUsers(); + } } From f9cc9752d0e53296ea69d72f35a77919ba2a5be7 Mon Sep 17 00:00:00 2001 From: David Date: Tue, 24 Aug 2021 17:42:57 +0200 Subject: [PATCH 004/208] build(data): remove Link object --- .../moneytransfersystem/model/Link.java | 28 ------------------- .../moneytransfersystem/model/User.java | 19 ------------- 2 files changed, 47 deletions(-) delete mode 100644 src/main/java/com/openclassrooms/moneytransfersystem/model/Link.java diff --git a/src/main/java/com/openclassrooms/moneytransfersystem/model/Link.java b/src/main/java/com/openclassrooms/moneytransfersystem/model/Link.java deleted file mode 100644 index 500afcd..0000000 --- a/src/main/java/com/openclassrooms/moneytransfersystem/model/Link.java +++ /dev/null @@ -1,28 +0,0 @@ -package com.openclassrooms.moneytransfersystem.model; - -import lombok.Data; - -import javax.persistence.*; -import java.util.Collection; - -@Data -@Entity -@Table(name = "link") -public class Link { - - @Id - @GeneratedValue(strategy = GenerationType.IDENTITY) - @Column(name = "link_id") - private Long id; - - @Column(nullable = false) - private String bankAccount; - @Column(nullable = false) - private String swiftCode; - - /*@OneToOne(mappedBy = "link") - private UsersLinks usersLinks;*/ - - @ManyToMany(mappedBy = "links") - private Collection users; -} diff --git a/src/main/java/com/openclassrooms/moneytransfersystem/model/User.java b/src/main/java/com/openclassrooms/moneytransfersystem/model/User.java index 9efa388..a387c9e 100644 --- a/src/main/java/com/openclassrooms/moneytransfersystem/model/User.java +++ b/src/main/java/com/openclassrooms/moneytransfersystem/model/User.java @@ -34,25 +34,6 @@ public class User { @Column(nullable = false) float balance; - /*@OneToOne(mappedBy = "user") - private UsersDetails usersDetails;*/ - - /*@ManyToMany(cascade = CascadeType.ALL) - @JoinTable( - name = "users_details", - joinColumns = @JoinColumn(name = "user_id"), - inverseJoinColumns = @JoinColumn(name = "detail_id") - ) - private Collection details;*/ - - @ManyToMany(cascade = CascadeType.ALL) - @JoinTable( - name = "users_links", - joinColumns = @JoinColumn(name = "user_id"), - inverseJoinColumns = @JoinColumn(name = "link_id") - ) - private Collection links; - @ManyToMany(cascade = CascadeType.ALL) @JoinTable( name = "friendship", From 999fce66a4e52c0e86330546a2f0d0510f678012 Mon Sep 17 00:00:00 2001 From: David Date: Tue, 24 Aug 2021 17:48:02 +0200 Subject: [PATCH 005/208] build(data): disable resource data initialization --- src/main/resources/application.properties | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/resources/application.properties b/src/main/resources/application.properties index 8d5ee14..9ab123b 100644 --- a/src/main/resources/application.properties +++ b/src/main/resources/application.properties @@ -3,7 +3,8 @@ server.port=7900 # ======================== Data Source ======================== # Initialize the database using data.sql script -spring.sql.init.mode=always +#spring.sql.init.mode=always +spring.sql.init.mode=never spring.datasource.url = jdbc:mysql://localhost:3306/moneytransfersystem?createDatabaseIfNotExist=true spring.datasource.username = root spring.datasource.password = rootroot From 34be1876ec4d88621f502304b6a4ec58737cf5c0 Mon Sep 17 00:00:00 2001 From: David Date: Tue, 24 Aug 2021 17:51:07 +0200 Subject: [PATCH 006/208] build(data): add database dump --- src/main/resources/data.sql | Bin 0 -> 10262 bytes 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 src/main/resources/data.sql diff --git a/src/main/resources/data.sql b/src/main/resources/data.sql new file mode 100644 index 0000000000000000000000000000000000000000..ab38d90708beed8579f722275c7e602484f15409 GIT binary patch literal 10262 zcmeHNYfl?T6rHcF)c>%RkO(aVn^$QnOC&(3#WNVU315t{oj_}hg@J_r__pWF>}6(W zch>6%RVpFN-to@Nea)S7?>zqbdqFLzNbRc!Ra5WO9?ETXr>;~VrLroim-t;qIZ|8d zQVrCty20}t|JPB+`X#lh=JEfdx<*~3en)*zt*I51U#Kr=x278U|D5_xeG7gIkIzW` zie9Ap3az^+w^S3)i})@18s1H`X@YMPtvkB)725Pre$X;CQ64~s4rCbM9cgx;hj5HE zU-JGhK9*}uOLVV)BW0cgSctNJldvKC@VlsfP~XFPC2jvQ^slLHb%N)HI>ZQV!J3<} z+iP`~R9!51~8lz~=$vppDF1k)v4av=plt6@ED*WK<5obzf^6VdmVz2iM_u=i2{6_H_H( zQKgim)KI5d_U+hi>Gx^L#9v&>>3$V8tA2$1CCniH&O(nY8R>hRzoMg+u?~w?ffRKu zC;gE2-F+P6a6K_1Tw8%OqssCYR-)fj)s7zVU6en>vm+^0k(QLNNV~A4#LMjYYOu9| z(LKccm2vgoQUd=SN9+K-8t}3@{FtTRP~MA2!1($pXda_3G@fP1l`k225J_aNiX8U6 z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&YvHdi4s%D=&lm<6P2Us8iOwO~&oSH1mXM8-k=!4laU!~1tyu1p(Fw(s zu(XUZp;|X$`8&L!KD5%P6nUD!a}k~`n2afH4_B7Z&Zo@l>=C48Wq)^B^GTkL**Ki9 zL3kh3w~6TDzn3wdu1+gMbrSnn{$X9Dt>_^C-M+(jtBF~|*389^I`x+z(qu?j&~zvTh^Tdj;uQch{QpB1zdj&6cxj z_jFxu%J_9IRZG#o?~p{gMtsI+?%lXI3xrFN_Qg265h=_s+$x)kzi%y=QRM!R=vcJR zT_9mObKiS)5r p=Zyn%2G6@@5!MkUe9O51R>BRX1(a9twv3(cS17IHm%GKJ`7ewq$vgl6 literal 0 HcmV?d00001 From 822d54a1aeca3fbae645566f4e7fc4f26fe661af Mon Sep 17 00:00:00 2001 From: David Date: Tue, 24 Aug 2021 17:54:04 +0200 Subject: [PATCH 007/208] docs: update data model --- docs/data-model/2-data.png | Bin 62144 -> 24800 bytes 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/docs/data-model/2-data.png b/docs/data-model/2-data.png index 75df0c45ab515c538ef216198db9ccb1eadccd83..8210dd46318ce2367d1d19ea24d5911e1f7212e2 100644 GIT binary patch literal 24800 zcmbrm1yo$?mMvUB5!{pD?oROF8r%skK>`Gq!d-%d;0}S{1b24`!JQ&F1b26Rn{#gW zySMvx|8I=H7;G4o)ZU-3x#pUaFl9w4G-Lu~5D0`OBQ2o{0>P95-_?k)z&kkG%i+L} z7shf@5}>E&ugunhI1q>oBqJfJ?)GiJ)f=MrJLTw!sGqy;1m%Ub0V)h`KRubxOB}L< zK3$X{>HM%QmtE6Rm$K%=fmjaLH=4T;ueg+C*gz*-{SwpMi^0@acV?*$X(gYgc2N6g zRB@!~WJ-eh8Wb=`SQCGcBf*%k&Agb69eI0q)tgu!6}9wnHnwD|TB{_-`*PNNu&T}H za?rhvh#ZUw7InmvY~uGLLyR?3M!*91JO965Pgl!#FFZUwJ*8};=y?^xZc|_oDMBSm z=vbEATvA%e=v9z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jo4ygHZPL*pBjH7f~hhC$JIrnf$iy6~i+?&~X1 zje+rvpNo?#-aE2m6EuyFSUL80yxmz{p56JHI{n*=@5aL{sHc8e-LLe1hyPLwUx1Wo zeL>znOh6gzI%Zmze2etsXxRr?L+N#y9%-&$=7`#Zu7yZLc>Z0Ve@ThG-PJVJr=9VCb{2|1C)TeOo%N#crE@|BP*-qMs-*X>fh?J9ioJ zXT13#H%wfk`6G21FC0wiRxVgE5trYwoH6abRLP)yB@+Fus^Z&`p=sakbNlvoC8^znV*KpK`G%G5AE8K8;SsUdF~63cEzJzUi!N Date: Tue, 24 Aug 2021 18:00:12 +0200 Subject: [PATCH 008/208] build(model): update User --- .../moneytransfersystem/model/User.java | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) diff --git a/src/main/java/com/openclassrooms/moneytransfersystem/model/User.java b/src/main/java/com/openclassrooms/moneytransfersystem/model/User.java index a387c9e..ab27d9a 100644 --- a/src/main/java/com/openclassrooms/moneytransfersystem/model/User.java +++ b/src/main/java/com/openclassrooms/moneytransfersystem/model/User.java @@ -17,7 +17,7 @@ public class User { @Id - @GeneratedValue + @GeneratedValue(strategy = GenerationType.IDENTITY) @Column(name = "user_id") Long id; @@ -26,14 +26,15 @@ public class User { @Column(nullable = false) String password; @Column(nullable = false) - boolean active; - @Column(nullable = false) String firstName; @Column(nullable = false) String lastName; @Column(nullable = false) float balance; + @OneToMany(mappedBy = "user") + private Collection transfers; + @ManyToMany(cascade = CascadeType.ALL) @JoinTable( name = "friendship", @@ -41,12 +42,4 @@ public class User { inverseJoinColumns = @JoinColumn(name = "recipient") ) private Collection friendships; - - @ManyToMany(cascade = CascadeType.ALL) - @JoinTable( - name = "users_transfers", - joinColumns = @JoinColumn(name = "made_by"), - inverseJoinColumns = @JoinColumn(name = "transfer_id") - ) - private Collection transfers; } From b0406e2b62325a014980a22b19bf712324f63a8f Mon Sep 17 00:00:00 2001 From: David Date: Tue, 24 Aug 2021 18:02:09 +0200 Subject: [PATCH 009/208] build(model): update Transfer --- .../moneytransfersystem/model/Transfer.java | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/src/main/java/com/openclassrooms/moneytransfersystem/model/Transfer.java b/src/main/java/com/openclassrooms/moneytransfersystem/model/Transfer.java index fa86669..eb208e8 100644 --- a/src/main/java/com/openclassrooms/moneytransfersystem/model/Transfer.java +++ b/src/main/java/com/openclassrooms/moneytransfersystem/model/Transfer.java @@ -4,7 +4,6 @@ import javax.persistence.*; import java.time.LocalDateTime; -import java.util.Collection; @Data @Entity @@ -18,13 +17,22 @@ public class Transfer { @Column(nullable = false) private LocalDateTime date; + @Column(nullable = true) + private TransferType type; @Column(nullable = false) private Long recipient; @Column(nullable = false) - private float amount; + private double amount; @Column(nullable = false) - private float tax; + private double tax; + @Column(nullable = true) + private String description; - @ManyToMany(mappedBy = "transfers") - private Collection users; + @ManyToOne(cascade = CascadeType.ALL) + @JoinTable( + name = "users_transfers", + joinColumns = @JoinColumn(name = "user_id"), + inverseJoinColumns = @JoinColumn(name = "transfer_id") + ) + private User user; } From a1ff07bbd4ab5964d9d5a9272d50ca5fd9008789 Mon Sep 17 00:00:00 2001 From: David Date: Tue, 24 Aug 2021 18:03:09 +0200 Subject: [PATCH 010/208] build(model): add TransferType --- .../moneytransfersystem/model/TransferType.java | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 src/main/java/com/openclassrooms/moneytransfersystem/model/TransferType.java diff --git a/src/main/java/com/openclassrooms/moneytransfersystem/model/TransferType.java b/src/main/java/com/openclassrooms/moneytransfersystem/model/TransferType.java new file mode 100644 index 0000000..7ca77d9 --- /dev/null +++ b/src/main/java/com/openclassrooms/moneytransfersystem/model/TransferType.java @@ -0,0 +1,6 @@ +package com.openclassrooms.moneytransfersystem.model; + +public enum TransferType { + INGOING, + OUTGOING +} From abaf37a99f4c0488d5df2196257966f1a87a17f2 Mon Sep 17 00:00:00 2001 From: David Date: Tue, 24 Aug 2021 18:11:39 +0200 Subject: [PATCH 011/208] feat(security): add CustomUserDetails --- .../configuration/CustomUserDetails.java | 6 +++ .../configuration/SpringSecurityConfig.java | 52 +++++++++++++------ 2 files changed, 42 insertions(+), 16 deletions(-) create mode 100644 src/main/java/com/openclassrooms/moneytransfersystem/configuration/CustomUserDetails.java diff --git a/src/main/java/com/openclassrooms/moneytransfersystem/configuration/CustomUserDetails.java b/src/main/java/com/openclassrooms/moneytransfersystem/configuration/CustomUserDetails.java new file mode 100644 index 0000000..496706b --- /dev/null +++ b/src/main/java/com/openclassrooms/moneytransfersystem/configuration/CustomUserDetails.java @@ -0,0 +1,6 @@ +package com.openclassrooms.moneytransfersystem.configuration; + +public class CustomUserDetails { + + +} diff --git a/src/main/java/com/openclassrooms/moneytransfersystem/configuration/SpringSecurityConfig.java b/src/main/java/com/openclassrooms/moneytransfersystem/configuration/SpringSecurityConfig.java index 9a63092..cfc0e81 100644 --- a/src/main/java/com/openclassrooms/moneytransfersystem/configuration/SpringSecurityConfig.java +++ b/src/main/java/com/openclassrooms/moneytransfersystem/configuration/SpringSecurityConfig.java @@ -1,40 +1,60 @@ package com.openclassrooms.moneytransfersystem.configuration; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; +import org.springframework.security.authentication.dao.DaoAuthenticationProvider; import org.springframework.security.config.annotation.authentication.builders.AuthenticationManagerBuilder; import org.springframework.security.config.annotation.web.builders.HttpSecurity; import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity; import org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter; import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder; -import org.springframework.security.crypto.password.PasswordEncoder; + +import javax.sql.DataSource; @Configuration @EnableWebSecurity public class SpringSecurityConfig extends WebSecurityConfigurerAdapter { - @Override - protected void configure(AuthenticationManagerBuilder auth) throws Exception { + @Autowired + private DataSource dataSource; + + @Bean + public BCryptPasswordEncoder passwordEncoder() { + + return new BCryptPasswordEncoder(); + } + + @Bean + public DaoAuthenticationProvider authenticationProvider() { - auth.inMemoryAuthentication() - .withUser("robertdupont@someHost.com") - .password(passwordEncoder().encode("jamesbond")) - .roles("CLIENT"); + DaoAuthenticationProvider authProvider = new DaoAuthenticationProvider(); + authProvider.setUserDetailsService(userDetailsService()); + authProvider.setPasswordEncoder(passwordEncoder()); + + return authProvider; } @Override - public void configure(HttpSecurity http) throws Exception { + protected void configure(AuthenticationManagerBuilder auth) throws Exception { - http.authorizeRequests() - .antMatchers("/compte").hasRole("CLIENT") - .anyRequest().authenticated() - .and() - .formLogin(); + auth.authenticationProvider(authenticationProvider()); } - @Bean - public PasswordEncoder passwordEncoder() { + @Override + protected void configure(HttpSecurity http) throws Exception { - return new BCryptPasswordEncoder(); + http.httpBasic() + .and() + .authorizeRequests() + .anyRequest().permitAll() + .and() + .formLogin() + .usernameParameter("email") + .permitAll() + .and() + .logout().logoutSuccessUrl("/").permitAll() + .and() + .csrf().disable(); // Enabling Postman POST requests } } From cdc92f6094d60ecf22d97b92d76c61adc5c5df01 Mon Sep 17 00:00:00 2001 From: David Date: Tue, 24 Aug 2021 18:12:29 +0200 Subject: [PATCH 012/208] feat(security): update CustomUserDetails --- .../configuration/CustomUserDetails.java | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/openclassrooms/moneytransfersystem/configuration/CustomUserDetails.java b/src/main/java/com/openclassrooms/moneytransfersystem/configuration/CustomUserDetails.java index 496706b..4b984fe 100644 --- a/src/main/java/com/openclassrooms/moneytransfersystem/configuration/CustomUserDetails.java +++ b/src/main/java/com/openclassrooms/moneytransfersystem/configuration/CustomUserDetails.java @@ -1,6 +1,17 @@ package com.openclassrooms.moneytransfersystem.configuration; -public class CustomUserDetails { +import com.openclassrooms.moneytransfersystem.model.User; +import org.springframework.security.core.GrantedAuthority; +import org.springframework.security.core.userdetails.UserDetails; - +import java.util.Collection; + +public class CustomUserDetails implements UserDetails { + + private User user; + + public CustomUserDetails(User user) { + + this.user = user; + } } From bbeaf02a18183850067ef156add4add51436ba11 Mon Sep 17 00:00:00 2001 From: David Date: Tue, 24 Aug 2021 18:13:08 +0200 Subject: [PATCH 013/208] feat(security): update CustomUserDetails --- .../configuration/CustomUserDetails.java | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/src/main/java/com/openclassrooms/moneytransfersystem/configuration/CustomUserDetails.java b/src/main/java/com/openclassrooms/moneytransfersystem/configuration/CustomUserDetails.java index 4b984fe..3c32631 100644 --- a/src/main/java/com/openclassrooms/moneytransfersystem/configuration/CustomUserDetails.java +++ b/src/main/java/com/openclassrooms/moneytransfersystem/configuration/CustomUserDetails.java @@ -14,4 +14,22 @@ public CustomUserDetails(User user) { this.user = user; } + + @Override + public Collection getAuthorities() { + + return null; + } + + @Override + public String getPassword() { + + return user.getPassword(); + } + + @Override + public String getUsername() { + + return user.getEmail(); + } } From 0dfe2f5f552f5eb6d6409ab93f18d505b5f0e44c Mon Sep 17 00:00:00 2001 From: David Date: Tue, 24 Aug 2021 18:13:19 +0200 Subject: [PATCH 014/208] feat(security): update CustomUserDetails --- .../configuration/CustomUserDetails.java | 23 +++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/src/main/java/com/openclassrooms/moneytransfersystem/configuration/CustomUserDetails.java b/src/main/java/com/openclassrooms/moneytransfersystem/configuration/CustomUserDetails.java index 3c32631..e745fac 100644 --- a/src/main/java/com/openclassrooms/moneytransfersystem/configuration/CustomUserDetails.java +++ b/src/main/java/com/openclassrooms/moneytransfersystem/configuration/CustomUserDetails.java @@ -32,4 +32,27 @@ public String getUsername() { return user.getEmail(); } + + @Override + public boolean isAccountNonExpired() { + + return true; + } + + @Override + public boolean isCredentialsNonExpired() { + + return true; + } + + @Override + public boolean isAccountNonLocked() { + return true; + } + + @Override + public boolean isEnabled() { + + return true; + } } From f50eb8e7698375e5eb69b2903342892e2a2cd927 Mon Sep 17 00:00:00 2001 From: David Date: Tue, 24 Aug 2021 18:14:06 +0200 Subject: [PATCH 015/208] feat(security): add CustomUserDetailsService --- .../configuration/CustomUserDetailsService.java | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 src/main/java/com/openclassrooms/moneytransfersystem/configuration/CustomUserDetailsService.java diff --git a/src/main/java/com/openclassrooms/moneytransfersystem/configuration/CustomUserDetailsService.java b/src/main/java/com/openclassrooms/moneytransfersystem/configuration/CustomUserDetailsService.java new file mode 100644 index 0000000..0002ac8 --- /dev/null +++ b/src/main/java/com/openclassrooms/moneytransfersystem/configuration/CustomUserDetailsService.java @@ -0,0 +1,6 @@ +package com.openclassrooms.moneytransfersystem.configuration; + +public class CustomUserDetailsService { + + +} From c481deb2eb75ce7852921149cc608a796249521d Mon Sep 17 00:00:00 2001 From: David Date: Tue, 24 Aug 2021 18:14:31 +0200 Subject: [PATCH 016/208] feat(security): update CustomUserDetailsService --- .../CustomUserDetailsService.java | 21 ++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/openclassrooms/moneytransfersystem/configuration/CustomUserDetailsService.java b/src/main/java/com/openclassrooms/moneytransfersystem/configuration/CustomUserDetailsService.java index 0002ac8..2225f06 100644 --- a/src/main/java/com/openclassrooms/moneytransfersystem/configuration/CustomUserDetailsService.java +++ b/src/main/java/com/openclassrooms/moneytransfersystem/configuration/CustomUserDetailsService.java @@ -1,6 +1,25 @@ package com.openclassrooms.moneytransfersystem.configuration; -public class CustomUserDetailsService { +import com.openclassrooms.moneytransfersystem.dao.UserRepository; +import com.openclassrooms.moneytransfersystem.model.User; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.security.core.userdetails.UserDetails; +import org.springframework.security.core.userdetails.UserDetailsService; +import org.springframework.security.core.userdetails.UsernameNotFoundException; +public class CustomUserDetailsService implements UserDetailsService { + @Autowired + private UserRepository userRepository; + + @Override + public UserDetails loadUserByUsername(String username) throws UsernameNotFoundException { + + User user = userRepository.findByEmail(username); + if (user == null) { + throw new UsernameNotFoundException("User not found"); + } + + return new CustomUserDetails(user); + } } From 603e75100d1b91504362fb3900b415f636c0f197 Mon Sep 17 00:00:00 2001 From: David Date: Tue, 24 Aug 2021 18:15:17 +0200 Subject: [PATCH 017/208] feat(security): update SpringSecurityConfig --- .../configuration/SpringSecurityConfig.java | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/main/java/com/openclassrooms/moneytransfersystem/configuration/SpringSecurityConfig.java b/src/main/java/com/openclassrooms/moneytransfersystem/configuration/SpringSecurityConfig.java index cfc0e81..d1b8dbb 100644 --- a/src/main/java/com/openclassrooms/moneytransfersystem/configuration/SpringSecurityConfig.java +++ b/src/main/java/com/openclassrooms/moneytransfersystem/configuration/SpringSecurityConfig.java @@ -8,6 +8,7 @@ import org.springframework.security.config.annotation.web.builders.HttpSecurity; import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity; import org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter; +import org.springframework.security.core.userdetails.UserDetailsService; import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder; import javax.sql.DataSource; @@ -19,6 +20,12 @@ public class SpringSecurityConfig extends WebSecurityConfigurerAdapter { @Autowired private DataSource dataSource; + @Bean + public UserDetailsService userDetailsService() { + + return new CustomUserDetailsService(); + } + @Bean public BCryptPasswordEncoder passwordEncoder() { From b98b4b658c6676db6c8a88f16c157de4b35ff1b3 Mon Sep 17 00:00:00 2001 From: David Date: Tue, 24 Aug 2021 18:16:18 +0200 Subject: [PATCH 018/208] build(security): add index page --- src/main/resources/templates/index.html | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 src/main/resources/templates/index.html diff --git a/src/main/resources/templates/index.html b/src/main/resources/templates/index.html new file mode 100644 index 0000000..566549b --- /dev/null +++ b/src/main/resources/templates/index.html @@ -0,0 +1,10 @@ + + + + + Title + + + + + \ No newline at end of file From b98fe7eb69e76ca679f81c58168bd661d8997329 Mon Sep 17 00:00:00 2001 From: David Date: Tue, 24 Aug 2021 18:17:15 +0200 Subject: [PATCH 019/208] build(security): update index page --- src/main/resources/templates/index.html | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/src/main/resources/templates/index.html b/src/main/resources/templates/index.html index 566549b..9db6f8f 100644 --- a/src/main/resources/templates/index.html +++ b/src/main/resources/templates/index.html @@ -1,10 +1,19 @@ - + - Title + Accueil – Pay My Buddy + + + +
+

Bienvenue sur Pay My Buddy !

+

Démarrer votre expérience

+

Inscription

+

Connexion

+
- \ No newline at end of file + From 8d50229dea26d1611ae80c1d9abc98d83a3f0d09 Mon Sep 17 00:00:00 2001 From: David Date: Tue, 24 Aug 2021 18:18:43 +0200 Subject: [PATCH 020/208] build(security): add app page --- src/main/resources/templates/app.html | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 src/main/resources/templates/app.html diff --git a/src/main/resources/templates/app.html b/src/main/resources/templates/app.html new file mode 100644 index 0000000..566549b --- /dev/null +++ b/src/main/resources/templates/app.html @@ -0,0 +1,10 @@ + + + + + Title + + + + + \ No newline at end of file From 6dca5f6c8d3a2e7c9faf8324a3e9d76a672e26ad Mon Sep 17 00:00:00 2001 From: David Date: Tue, 24 Aug 2021 18:20:35 +0200 Subject: [PATCH 021/208] build(front): add transactions list --- src/main/resources/templates/app.html | 37 +++++++++++++++++++++++---- 1 file changed, 32 insertions(+), 5 deletions(-) diff --git a/src/main/resources/templates/app.html b/src/main/resources/templates/app.html index 566549b..8dae70d 100644 --- a/src/main/resources/templates/app.html +++ b/src/main/resources/templates/app.html @@ -1,10 +1,37 @@ - + - - Title + + Liste de transferts – Pay My Buddy + + + - +
+
+

Liste de transferts

+
+
+ + + + + + + + + + + + + + + + + +
ID de TransfertDateBénéficaireMontantTaxe
RelationDescriptionMontant
+
+
- \ No newline at end of file + From 15a91a651254c69b451e6238c8a7913532cdba01 Mon Sep 17 00:00:00 2001 From: David Date: Tue, 24 Aug 2021 18:22:08 +0200 Subject: [PATCH 022/208] build(model): add TransferView --- .../moneytransfersystem/model/TransferView.java | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 src/main/java/com/openclassrooms/moneytransfersystem/model/TransferView.java diff --git a/src/main/java/com/openclassrooms/moneytransfersystem/model/TransferView.java b/src/main/java/com/openclassrooms/moneytransfersystem/model/TransferView.java new file mode 100644 index 0000000..ab2de2c --- /dev/null +++ b/src/main/java/com/openclassrooms/moneytransfersystem/model/TransferView.java @@ -0,0 +1,9 @@ +package com.openclassrooms.moneytransfersystem.model; + +import lombok.Data; + +@Data +public class TransferView { + + +} From 009987fc67ab8916fa949420d03336d1bacb9fb8 Mon Sep 17 00:00:00 2001 From: David Date: Tue, 24 Aug 2021 18:22:29 +0200 Subject: [PATCH 023/208] build(model): update TransferView --- .../moneytransfersystem/model/TransferView.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/openclassrooms/moneytransfersystem/model/TransferView.java b/src/main/java/com/openclassrooms/moneytransfersystem/model/TransferView.java index ab2de2c..22886db 100644 --- a/src/main/java/com/openclassrooms/moneytransfersystem/model/TransferView.java +++ b/src/main/java/com/openclassrooms/moneytransfersystem/model/TransferView.java @@ -2,8 +2,13 @@ import lombok.Data; +import java.time.LocalDateTime; + @Data public class TransferView { - + LocalDateTime date; + String relation; + String description; + String amount; } From ea1692a2527c56104cc3a8183b7357f9c110a503 Mon Sep 17 00:00:00 2001 From: David Date: Tue, 24 Aug 2021 18:24:40 +0200 Subject: [PATCH 024/208] feat(security): update LoginController --- .../controller/LoginController.java | 30 ++++++++++++++----- 1 file changed, 22 insertions(+), 8 deletions(-) diff --git a/src/main/java/com/openclassrooms/moneytransfersystem/controller/LoginController.java b/src/main/java/com/openclassrooms/moneytransfersystem/controller/LoginController.java index ee9d3bb..913e5fa 100644 --- a/src/main/java/com/openclassrooms/moneytransfersystem/controller/LoginController.java +++ b/src/main/java/com/openclassrooms/moneytransfersystem/controller/LoginController.java @@ -1,17 +1,31 @@ package com.openclassrooms.moneytransfersystem.controller; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RestController; +import com.openclassrooms.moneytransfersystem.model.*; +import com.openclassrooms.moneytransfersystem.service.user.UserCreationService; +import com.openclassrooms.moneytransfersystem.service.user.UserReadService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.security.core.Authentication; +import org.springframework.security.core.context.SecurityContextHolder; +import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder; +import org.springframework.stereotype.Controller; +import org.springframework.ui.Model; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PostMapping; -import javax.annotation.security.RolesAllowed; +import java.util.*; -@RestController +@Controller public class LoginController { - @RequestMapping("/*") - @RolesAllowed("CLIENT") - public String getClient() { + @Autowired + private UserCreationService userCreationService; - return "Bienvenue !"; + @Autowired + private UserReadService userReadService; + + @GetMapping("") + public String viewHomePage() { + + return "index"; } } From 45877f62eeb7f4a22c7b9ced674244fa77e09a61 Mon Sep 17 00:00:00 2001 From: David Date: Tue, 24 Aug 2021 18:25:46 +0200 Subject: [PATCH 025/208] feat(security): update LoginController --- .../controller/LoginController.java | 28 +++++++++++++++++-- 1 file changed, 26 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/openclassrooms/moneytransfersystem/controller/LoginController.java b/src/main/java/com/openclassrooms/moneytransfersystem/controller/LoginController.java index 913e5fa..1785a2d 100644 --- a/src/main/java/com/openclassrooms/moneytransfersystem/controller/LoginController.java +++ b/src/main/java/com/openclassrooms/moneytransfersystem/controller/LoginController.java @@ -6,11 +6,9 @@ import org.springframework.beans.factory.annotation.Autowired; import org.springframework.security.core.Authentication; import org.springframework.security.core.context.SecurityContextHolder; -import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder; import org.springframework.stereotype.Controller; import org.springframework.ui.Model; import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.PostMapping; import java.util.*; @@ -28,4 +26,30 @@ public String viewHomePage() { return "index"; } + + @GetMapping("/app") + public String listTransfers(Model model) { + Authentication authentication = SecurityContextHolder.getContext().getAuthentication(); + User user = userReadService.readUserByEmail(authentication.getName()); + + List listTransfers = new ArrayList<>(); + user.getTransfers().stream() + .forEach( t -> { + TransferView transfer = new TransferView(); + transfer.setDate(t.getDate()); + transfer.setRelation(t.getUser().getFirstName()); + transfer.setDescription(t.getDescription()); + if (t.getType() == TransferType.INGOING) { + transfer.setAmount("+ " + String.valueOf(t.getAmount())); + } else if (t.getType() == TransferType.OUTGOING) { + transfer.setAmount("- " + String.valueOf(t.getAmount())); + } + listTransfers.add(transfer); + }); + + Collections.sort(listTransfers, Comparator.comparing(TransferView::getDate)); + model.addAttribute("listTransfers", listTransfers); + + return "app"; + } } From 7915ff4370e879962619f1d4fb0cd144a697830a Mon Sep 17 00:00:00 2001 From: David Date: Tue, 24 Aug 2021 18:27:23 +0200 Subject: [PATCH 026/208] build(front): add account identitication email --- src/main/resources/templates/app.html | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/main/resources/templates/app.html b/src/main/resources/templates/app.html index 8dae70d..3d5144a 100644 --- a/src/main/resources/templates/app.html +++ b/src/main/resources/templates/app.html @@ -9,6 +9,14 @@
+
+
+

+ Vous êtes connecté sur le compte : [[${#request.userPrincipal.name}]] +

+ +
+

Liste de transferts

From 35553f543c0ba37b755f607c20612a567d792dd7 Mon Sep 17 00:00:00 2001 From: David Date: Tue, 24 Aug 2021 18:27:42 +0200 Subject: [PATCH 027/208] build(front): add user account balance --- src/main/resources/templates/app.html | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/main/resources/templates/app.html b/src/main/resources/templates/app.html index 3d5144a..31f5f72 100644 --- a/src/main/resources/templates/app.html +++ b/src/main/resources/templates/app.html @@ -17,6 +17,9 @@
+
+

Solde votre compte : [[${balance}]] €

+

Liste de transferts

From 196813b5a71e40c944f0b760e5a8f2872d192c94 Mon Sep 17 00:00:00 2001 From: David Date: Tue, 24 Aug 2021 18:28:29 +0200 Subject: [PATCH 028/208] feat(security): update LoginController --- .../moneytransfersystem/controller/LoginController.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/main/java/com/openclassrooms/moneytransfersystem/controller/LoginController.java b/src/main/java/com/openclassrooms/moneytransfersystem/controller/LoginController.java index 1785a2d..81b8ee2 100644 --- a/src/main/java/com/openclassrooms/moneytransfersystem/controller/LoginController.java +++ b/src/main/java/com/openclassrooms/moneytransfersystem/controller/LoginController.java @@ -32,6 +32,9 @@ public String listTransfers(Model model) { Authentication authentication = SecurityContextHolder.getContext().getAuthentication(); User user = userReadService.readUserByEmail(authentication.getName()); + String balance = String.format("%.2f", user.getBalance()); + model.addAttribute("balance", balance); + List listTransfers = new ArrayList<>(); user.getTransfers().stream() .forEach( t -> { From c0f693370a09c38cb76715920aa1fa785e0570c8 Mon Sep 17 00:00:00 2001 From: David Date: Tue, 24 Aug 2021 18:32:41 +0200 Subject: [PATCH 029/208] build(dao): add TransferRepository --- .../moneytransfersystem/dao/TransferRepository.java | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 src/main/java/com/openclassrooms/moneytransfersystem/dao/TransferRepository.java diff --git a/src/main/java/com/openclassrooms/moneytransfersystem/dao/TransferRepository.java b/src/main/java/com/openclassrooms/moneytransfersystem/dao/TransferRepository.java new file mode 100644 index 0000000..94aec7e --- /dev/null +++ b/src/main/java/com/openclassrooms/moneytransfersystem/dao/TransferRepository.java @@ -0,0 +1,11 @@ +package com.openclassrooms.moneytransfersystem.dao; + +import com.openclassrooms.moneytransfersystem.model.Transfer; +import org.springframework.data.jpa.repository.JpaRepository; +import org.springframework.stereotype.Repository; + +@Repository +public interface TransferRepository extends JpaRepository { + + +} From 5466eaa7d490be0e7805267a6a6bead203eac8ae Mon Sep 17 00:00:00 2001 From: David Date: Tue, 24 Aug 2021 18:33:16 +0200 Subject: [PATCH 030/208] build(dao): add FriendshipRepository --- .../moneytransfersystem/dao/FriendshipRepository.java | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 src/main/java/com/openclassrooms/moneytransfersystem/dao/FriendshipRepository.java diff --git a/src/main/java/com/openclassrooms/moneytransfersystem/dao/FriendshipRepository.java b/src/main/java/com/openclassrooms/moneytransfersystem/dao/FriendshipRepository.java new file mode 100644 index 0000000..b52c731 --- /dev/null +++ b/src/main/java/com/openclassrooms/moneytransfersystem/dao/FriendshipRepository.java @@ -0,0 +1,11 @@ +package com.openclassrooms.moneytransfersystem.dao; + +import com.openclassrooms.moneytransfersystem.model.Friendship; +import org.springframework.data.jpa.repository.JpaRepository; +import org.springframework.stereotype.Repository; + +@Repository +public interface FriendshipRepository extends JpaRepository { + + +} From 63e84700ac34fd7f03d9353d918e88d43b591a80 Mon Sep 17 00:00:00 2001 From: David Date: Tue, 24 Aug 2021 18:35:54 +0200 Subject: [PATCH 031/208] feat(security): update LoginController --- .../controller/LoginController.java | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/main/java/com/openclassrooms/moneytransfersystem/controller/LoginController.java b/src/main/java/com/openclassrooms/moneytransfersystem/controller/LoginController.java index 81b8ee2..a6681b9 100644 --- a/src/main/java/com/openclassrooms/moneytransfersystem/controller/LoginController.java +++ b/src/main/java/com/openclassrooms/moneytransfersystem/controller/LoginController.java @@ -1,14 +1,19 @@ package com.openclassrooms.moneytransfersystem.controller; +import com.openclassrooms.moneytransfersystem.dao.FriendshipRepository; +import com.openclassrooms.moneytransfersystem.dao.TransferRepository; +import com.openclassrooms.moneytransfersystem.dao.UserRepository; import com.openclassrooms.moneytransfersystem.model.*; import com.openclassrooms.moneytransfersystem.service.user.UserCreationService; import com.openclassrooms.moneytransfersystem.service.user.UserReadService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.security.core.Authentication; import org.springframework.security.core.context.SecurityContextHolder; +import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder; import org.springframework.stereotype.Controller; import org.springframework.ui.Model; import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PostMapping; import java.util.*; @@ -27,6 +32,14 @@ public String viewHomePage() { return "index"; } + @GetMapping("/register") + public String showRegistrationForm(Model model) { + + model.addAttribute("user", new User()); + + return "signup_form"; + } + @GetMapping("/app") public String listTransfers(Model model) { Authentication authentication = SecurityContextHolder.getContext().getAuthentication(); From fd25c2f62bda9f58343d3ed32a9dfae2e3aff23f Mon Sep 17 00:00:00 2001 From: David Date: Tue, 24 Aug 2021 18:36:56 +0200 Subject: [PATCH 032/208] build(front): add registration page --- src/main/resources/templates/register.html | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 src/main/resources/templates/register.html diff --git a/src/main/resources/templates/register.html b/src/main/resources/templates/register.html new file mode 100644 index 0000000..566549b --- /dev/null +++ b/src/main/resources/templates/register.html @@ -0,0 +1,10 @@ + + + + + Title + + + + + \ No newline at end of file From f89ef9f76b2639495ef8040424a595821ec52b90 Mon Sep 17 00:00:00 2001 From: David Date: Tue, 24 Aug 2021 18:37:33 +0200 Subject: [PATCH 033/208] build(front): update registration page --- src/main/resources/templates/{register.html => signup_form.html} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename src/main/resources/templates/{register.html => signup_form.html} (100%) diff --git a/src/main/resources/templates/register.html b/src/main/resources/templates/signup_form.html similarity index 100% rename from src/main/resources/templates/register.html rename to src/main/resources/templates/signup_form.html From ba7fc60ba8c75e9023e5ec4a78201b7ed6941572 Mon Sep 17 00:00:00 2001 From: David Date: Tue, 24 Aug 2021 18:37:45 +0200 Subject: [PATCH 034/208] build(front): update registration page --- src/main/resources/templates/signup_form.html | 55 ++++++++++++++++++- 1 file changed, 52 insertions(+), 3 deletions(-) diff --git a/src/main/resources/templates/signup_form.html b/src/main/resources/templates/signup_form.html index 566549b..a167ebb 100644 --- a/src/main/resources/templates/signup_form.html +++ b/src/main/resources/templates/signup_form.html @@ -1,10 +1,59 @@ - + - Title + Inscription – Pay My Buddy + + + +
+
+

Formulaire d'inscription

+
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+ +
+ +
+ +
+
+ +
+ +
+ +
+
+ +
+ +
+
+
+
- \ No newline at end of file + From dc4742f20a95fd12729fd7cc28675d1de3d1445d Mon Sep 17 00:00:00 2001 From: David Date: Tue, 24 Aug 2021 18:38:04 +0200 Subject: [PATCH 035/208] feat(security): update LoginController --- .../controller/LoginController.java | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/main/java/com/openclassrooms/moneytransfersystem/controller/LoginController.java b/src/main/java/com/openclassrooms/moneytransfersystem/controller/LoginController.java index a6681b9..d5a05a9 100644 --- a/src/main/java/com/openclassrooms/moneytransfersystem/controller/LoginController.java +++ b/src/main/java/com/openclassrooms/moneytransfersystem/controller/LoginController.java @@ -40,6 +40,18 @@ public String showRegistrationForm(Model model) { return "signup_form"; } + @PostMapping("/process_register") + public String processRegister(User user) { + BCryptPasswordEncoder passwordEncoder = new BCryptPasswordEncoder(); + String encodedPassword = passwordEncoder.encode(user.getPassword()); + user.setPassword(encodedPassword); + user.setBalance(0); + + userCreationService.createUser(user); + + return "register_success"; + } + @GetMapping("/app") public String listTransfers(Model model) { Authentication authentication = SecurityContextHolder.getContext().getAuthentication(); From d2571b2afae12f3b418f8ae47d95030b72a76d6e Mon Sep 17 00:00:00 2001 From: David Date: Tue, 24 Aug 2021 18:38:42 +0200 Subject: [PATCH 036/208] build(front): add register success page --- src/main/resources/templates/register_success.html | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 src/main/resources/templates/register_success.html diff --git a/src/main/resources/templates/register_success.html b/src/main/resources/templates/register_success.html new file mode 100644 index 0000000..566549b --- /dev/null +++ b/src/main/resources/templates/register_success.html @@ -0,0 +1,10 @@ + + + + + Title + + + + + \ No newline at end of file From f6b1a31ea17a30979f114e2f94791bcc2e325ee2 Mon Sep 17 00:00:00 2001 From: David Date: Tue, 24 Aug 2021 18:39:00 +0200 Subject: [PATCH 037/208] build(front): update register success page --- src/main/resources/templates/register_success.html | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/main/resources/templates/register_success.html b/src/main/resources/templates/register_success.html index 566549b..42348cf 100644 --- a/src/main/resources/templates/register_success.html +++ b/src/main/resources/templates/register_success.html @@ -1,10 +1,15 @@ - + - Title + Inscription validée + +
+

Votre inscription vient d'être validée !

+

Cliquez-ici pour vous connecter

+
- \ No newline at end of file + From 2a2e7aacb46d368787272f1011faa4ddf9d55134 Mon Sep 17 00:00:00 2001 From: David Date: Sat, 28 Aug 2021 21:27:53 +0200 Subject: [PATCH 038/208] build(data): update database structure --- src/main/resources/data.sql | Bin 10262 -> 8036 bytes 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/src/main/resources/data.sql b/src/main/resources/data.sql index ab38d90708beed8579f722275c7e602484f15409..b3af7892bb878e1fb3f0ede08c97d7ed0651b276 100644 GIT binary patch delta 504 zcmZ8eO-lk{5T5nB)y(}cwU9c zw$Lo*WD%cb(OV-#hodgul&9h&Gksknb!6B$-U|WDu&E)AydvW*8^yK~?c$Pmd2FD- zLX9o{+sT!oK+EfpCy^CX0tsB7D3ILZa19eu78@Z4COy7j9!{vEMkh7Te@syYbbL|; zS~`Uhm8aEMqb2Rz(C_f!dn|#CNe4cNJLqxy4Q=+$F0In!BBWuB>(^b delta 1342 zcmb7DO>7cT5FTn!OO-wk;xkt}Em}oqB)qB-%mr6|fYHK!`eecc8H}k&t&DY`Q>Gv-VyNk3& z%T%CM%2S1wur6~=adX|%cS7K!J9LSkn1VcK|Kbz-1JuhY*=KHHl^j|3GSD9Yxr#b@ z%F;Zo^Dl3Re>&{0HJmNzRd>3m8lI-*v=BXus62mn`l3a;2P6S9Iz$Js0-v6#wla6s zZRhRsuqyQkd0Lc0!n?haVqF1B(F8ilP@3WtqZvwIcNwc`!^SDWpQSD#uGbra@LagKX{m#E+c=jc2ZJ zW|riuylFYvXv#|+8`r?WG;ThH`v*wh&48BxxV{gy6`(!+wQhiwaWIuYtp0W?MX8T^ zpp~4Vn>>ve+Nr>vhgwRs0h#)lUO-lWw84>+ny)Tc%lzMH#zslwQC(1_D~;q&vb}UOUhEM|s$j_Ew_4%L>6%A}`kX~L=n4W!;Wv`P zn%e`6ULKL;|G>};jHY}H7()k{kA`|QVcO@yH6^+SrO@_1x!cO^J#v$_u}0nh_K>VW Tk17q)MbhX3Y!r{`AS?X_zt1L> From 83581800c17977af9c048a8e7a90b5fd55aa46cf Mon Sep 17 00:00:00 2001 From: David Date: Sat, 28 Aug 2021 21:32:27 +0200 Subject: [PATCH 039/208] build(model): add ibanCode and bicCode to User --- .../com/openclassrooms/moneytransfersystem/model/User.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/main/java/com/openclassrooms/moneytransfersystem/model/User.java b/src/main/java/com/openclassrooms/moneytransfersystem/model/User.java index ab27d9a..922932f 100644 --- a/src/main/java/com/openclassrooms/moneytransfersystem/model/User.java +++ b/src/main/java/com/openclassrooms/moneytransfersystem/model/User.java @@ -30,6 +30,10 @@ public class User { @Column(nullable = false) String lastName; @Column(nullable = false) + int ibanCode; + @Column(nullable = false) + int bicCode; + @Column(nullable = false) float balance; @OneToMany(mappedBy = "user") From 8bda14a7b9ad5e0418344fbc9f2cbaef6701517f Mon Sep 17 00:00:00 2001 From: David Date: Sat, 28 Aug 2021 21:34:21 +0200 Subject: [PATCH 040/208] build(model): update friendsList from User --- .../moneytransfersystem/model/User.java | 10 ++-------- src/main/resources/data.sql | Bin 8036 -> 10262 bytes 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/src/main/java/com/openclassrooms/moneytransfersystem/model/User.java b/src/main/java/com/openclassrooms/moneytransfersystem/model/User.java index 922932f..8097755 100644 --- a/src/main/java/com/openclassrooms/moneytransfersystem/model/User.java +++ b/src/main/java/com/openclassrooms/moneytransfersystem/model/User.java @@ -36,14 +36,8 @@ public class User { @Column(nullable = false) float balance; + String friendsList; + @OneToMany(mappedBy = "user") private Collection transfers; - - @ManyToMany(cascade = CascadeType.ALL) - @JoinTable( - name = "friendship", - joinColumns = @JoinColumn(name = "invited_by"), - inverseJoinColumns = @JoinColumn(name = "recipient") - ) - private Collection friendships; } diff --git a/src/main/resources/data.sql b/src/main/resources/data.sql index b3af7892bb878e1fb3f0ede08c97d7ed0651b276..ab38d90708beed8579f722275c7e602484f15409 100644 GIT binary patch delta 1342 zcmb7DO>7cT5FTn!OO-wk;xkt}Em}oqB)qB-%mr6|fYHK!`eecc8H}k&t&DY`Q>Gv-VyNk3& z%T%CM%2S1wur6~=adX|%cS7K!J9LSkn1VcK|Kbz-1JuhY*=KHHl^j|3GSD9Yxr#b@ z%F;Zo^Dl3Re>&{0HJmNzRd>3m8lI-*v=BXus62mn`l3a;2P6S9Iz$Js0-v6#wla6s zZRhRsuqyQkd0Lc0!n?haVqF1B(F8ilP@3WtqZvwIcNwc`!^SDWpQSD#uGbra@LagKX{m#E+c=jc2ZJ zW|riuylFYvXv#|+8`r?WG;ThH`v*wh&48BxxV{gy6`(!+wQhiwaWIuYtp0W?MX8T^ zpp~4Vn>>ve+Nr>vhgwRs0h#)lUO-lWw84>+ny)Tc%lzMH#zslwQC(1_D~;q&vb}UOUhEM|s$j_Ew_4%L>6%A}`kX~L=n4W!;Wv`P zn%e`6ULKL;|G>};jHY}H7()k{kA`|QVcO@yH6^+SrO@_1x!cO^J#v$_u}0nh_K>VW Tk17q)MbhX3Y!r{`AS?X_zt1L> delta 504 zcmZ8eO-lk{5T5nB)y(}cwU9c zw$Lo*WD%cb(OV-#hodgul&9h&Gksknb!6B$-U|WDu&E)AydvW*8^yK~?c$Pmd2FD- zLX9o{+sT!oK+EfpCy^CX0tsB7D3ILZa19eu78@Z4COy7j9!{vEMkh7Te@syYbbL|; zS~`Uhm8aEMqb2Rz(C_f!dn|#CNe4cNJLqxy4Q=+$F0In!BBWuB>(^b From 68ac6a37cb0a6e7ed0ab605b08341f239f3887f1 Mon Sep 17 00:00:00 2001 From: David Date: Sat, 28 Aug 2021 21:34:56 +0200 Subject: [PATCH 041/208] build(model): remove Friendship model --- .../moneytransfersystem/model/Friendship.java | 20 ------------------- 1 file changed, 20 deletions(-) delete mode 100644 src/main/java/com/openclassrooms/moneytransfersystem/model/Friendship.java diff --git a/src/main/java/com/openclassrooms/moneytransfersystem/model/Friendship.java b/src/main/java/com/openclassrooms/moneytransfersystem/model/Friendship.java deleted file mode 100644 index 52b0e3f..0000000 --- a/src/main/java/com/openclassrooms/moneytransfersystem/model/Friendship.java +++ /dev/null @@ -1,20 +0,0 @@ -package com.openclassrooms.moneytransfersystem.model; - -import lombok.Data; - -import javax.persistence.*; -import java.util.Collection; - -@Data -@Entity -@Table(name = "friendship") -public class Friendship { - - @Id - @GeneratedValue(strategy = GenerationType.IDENTITY) - @Column(name = "friendship_id") - private Long id; - - @ManyToMany(mappedBy = "friendships") - private Collection users; -} From 1eb1fba7a30139661f261d10452d5dd08542442a Mon Sep 17 00:00:00 2001 From: David Date: Sat, 28 Aug 2021 21:35:44 +0200 Subject: [PATCH 042/208] build(model): remove TransferType model --- .../moneytransfersystem/model/TransferType.java | 6 ------ 1 file changed, 6 deletions(-) delete mode 100644 src/main/java/com/openclassrooms/moneytransfersystem/model/TransferType.java diff --git a/src/main/java/com/openclassrooms/moneytransfersystem/model/TransferType.java b/src/main/java/com/openclassrooms/moneytransfersystem/model/TransferType.java deleted file mode 100644 index 7ca77d9..0000000 --- a/src/main/java/com/openclassrooms/moneytransfersystem/model/TransferType.java +++ /dev/null @@ -1,6 +0,0 @@ -package com.openclassrooms.moneytransfersystem.model; - -public enum TransferType { - INGOING, - OUTGOING -} From 11e11c5df11c7fbca4c2f9bd4c342085bed99857 Mon Sep 17 00:00:00 2001 From: David Date: Sat, 28 Aug 2021 21:36:39 +0200 Subject: [PATCH 043/208] build(repo): remove FriendshipRepository --- .../moneytransfersystem/dao/FriendshipRepository.java | 11 ----------- 1 file changed, 11 deletions(-) delete mode 100644 src/main/java/com/openclassrooms/moneytransfersystem/dao/FriendshipRepository.java diff --git a/src/main/java/com/openclassrooms/moneytransfersystem/dao/FriendshipRepository.java b/src/main/java/com/openclassrooms/moneytransfersystem/dao/FriendshipRepository.java deleted file mode 100644 index b52c731..0000000 --- a/src/main/java/com/openclassrooms/moneytransfersystem/dao/FriendshipRepository.java +++ /dev/null @@ -1,11 +0,0 @@ -package com.openclassrooms.moneytransfersystem.dao; - -import com.openclassrooms.moneytransfersystem.model.Friendship; -import org.springframework.data.jpa.repository.JpaRepository; -import org.springframework.stereotype.Repository; - -@Repository -public interface FriendshipRepository extends JpaRepository { - - -} From e374562173349e66b0e1ea9a5c6a69282a318a27 Mon Sep 17 00:00:00 2001 From: David Date: Sat, 28 Aug 2021 21:39:26 +0200 Subject: [PATCH 044/208] build(model): remove transferType and recipient from User model --- .../openclassrooms/moneytransfersystem/model/Transfer.java | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/main/java/com/openclassrooms/moneytransfersystem/model/Transfer.java b/src/main/java/com/openclassrooms/moneytransfersystem/model/Transfer.java index eb208e8..a050df2 100644 --- a/src/main/java/com/openclassrooms/moneytransfersystem/model/Transfer.java +++ b/src/main/java/com/openclassrooms/moneytransfersystem/model/Transfer.java @@ -17,10 +17,6 @@ public class Transfer { @Column(nullable = false) private LocalDateTime date; - @Column(nullable = true) - private TransferType type; - @Column(nullable = false) - private Long recipient; @Column(nullable = false) private double amount; @Column(nullable = false) From 5719febdf9a9093a200cc44b0be6cc7557a58450 Mon Sep 17 00:00:00 2001 From: David Date: Sat, 28 Aug 2021 21:43:29 +0200 Subject: [PATCH 045/208] build(model): update add sender to Transfer model --- .../openclassrooms/moneytransfersystem/model/Transfer.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/java/com/openclassrooms/moneytransfersystem/model/Transfer.java b/src/main/java/com/openclassrooms/moneytransfersystem/model/Transfer.java index a050df2..f9ed1e9 100644 --- a/src/main/java/com/openclassrooms/moneytransfersystem/model/Transfer.java +++ b/src/main/java/com/openclassrooms/moneytransfersystem/model/Transfer.java @@ -26,9 +26,9 @@ public class Transfer { @ManyToOne(cascade = CascadeType.ALL) @JoinTable( - name = "users_transfers", + name = "user", joinColumns = @JoinColumn(name = "user_id"), - inverseJoinColumns = @JoinColumn(name = "transfer_id") + inverseJoinColumns = @JoinColumn(name = "sender") ) - private User user; + private User sender; } From 6c97797c32ecf36de5d2fa9bc474b0f5a9d5aec8 Mon Sep 17 00:00:00 2001 From: David Date: Sat, 28 Aug 2021 21:43:45 +0200 Subject: [PATCH 046/208] build(model): update add receiver to Transfer model --- .../moneytransfersystem/model/Transfer.java | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/main/java/com/openclassrooms/moneytransfersystem/model/Transfer.java b/src/main/java/com/openclassrooms/moneytransfersystem/model/Transfer.java index f9ed1e9..51d89c2 100644 --- a/src/main/java/com/openclassrooms/moneytransfersystem/model/Transfer.java +++ b/src/main/java/com/openclassrooms/moneytransfersystem/model/Transfer.java @@ -31,4 +31,12 @@ public class Transfer { inverseJoinColumns = @JoinColumn(name = "sender") ) private User sender; + + @ManyToOne(cascade = CascadeType.ALL) + @JoinTable( + name = "user", + joinColumns = @JoinColumn(name = "user_id"), + inverseJoinColumns = @JoinColumn(name = "receiver") + ) + private User receiver; } From 33558338b7920f995be0b087e06f6ea426e77a94 Mon Sep 17 00:00:00 2001 From: David Date: Sat, 28 Aug 2021 21:45:37 +0200 Subject: [PATCH 047/208] build(model): add Tax model --- .../moneytransfersystem/model/Tax.java | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 src/main/java/com/openclassrooms/moneytransfersystem/model/Tax.java diff --git a/src/main/java/com/openclassrooms/moneytransfersystem/model/Tax.java b/src/main/java/com/openclassrooms/moneytransfersystem/model/Tax.java new file mode 100644 index 0000000..e24b815 --- /dev/null +++ b/src/main/java/com/openclassrooms/moneytransfersystem/model/Tax.java @@ -0,0 +1,14 @@ +package com.openclassrooms.moneytransfersystem.model; + +import lombok.Data; + +import javax.persistence.Entity; +import javax.persistence.Table; + +@Data +@Entity +@Table(name = "tax") +public class Tax { + + +} From 8276bcbe65579ec56946185a5758aa177e232135 Mon Sep 17 00:00:00 2001 From: David Date: Sat, 28 Aug 2021 21:57:13 +0200 Subject: [PATCH 048/208] build(model): add nullable columns to User --- .../java/com/openclassrooms/moneytransfersystem/model/Tax.java | 2 +- .../com/openclassrooms/moneytransfersystem/model/Transfer.java | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/openclassrooms/moneytransfersystem/model/Tax.java b/src/main/java/com/openclassrooms/moneytransfersystem/model/Tax.java index e24b815..9075a68 100644 --- a/src/main/java/com/openclassrooms/moneytransfersystem/model/Tax.java +++ b/src/main/java/com/openclassrooms/moneytransfersystem/model/Tax.java @@ -10,5 +10,5 @@ @Table(name = "tax") public class Tax { - + } diff --git a/src/main/java/com/openclassrooms/moneytransfersystem/model/Transfer.java b/src/main/java/com/openclassrooms/moneytransfersystem/model/Transfer.java index 51d89c2..adcf850 100644 --- a/src/main/java/com/openclassrooms/moneytransfersystem/model/Transfer.java +++ b/src/main/java/com/openclassrooms/moneytransfersystem/model/Transfer.java @@ -24,6 +24,7 @@ public class Transfer { @Column(nullable = true) private String description; + @Column(nullable = true) @ManyToOne(cascade = CascadeType.ALL) @JoinTable( name = "user", @@ -32,6 +33,7 @@ public class Transfer { ) private User sender; + @Column(nullable = true) @ManyToOne(cascade = CascadeType.ALL) @JoinTable( name = "user", From 1c775dddd48a01bed8d9062f2935607dde842397 Mon Sep 17 00:00:00 2001 From: David Date: Sat, 28 Aug 2021 21:59:55 +0200 Subject: [PATCH 049/208] build(model): update Tax model --- .../openclassrooms/moneytransfersystem/model/Tax.java | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/openclassrooms/moneytransfersystem/model/Tax.java b/src/main/java/com/openclassrooms/moneytransfersystem/model/Tax.java index 9075a68..4b15bad 100644 --- a/src/main/java/com/openclassrooms/moneytransfersystem/model/Tax.java +++ b/src/main/java/com/openclassrooms/moneytransfersystem/model/Tax.java @@ -2,13 +2,20 @@ import lombok.Data; -import javax.persistence.Entity; -import javax.persistence.Table; +import javax.persistence.*; @Data @Entity @Table(name = "tax") public class Tax { + @Id + @GeneratedValue(strategy = GenerationType.IDENTITY) + @Column(name = "tax_id") + private Long id; + @Column(nullable = false) + private String name; + @Column(nullable = false) + private double rate; } From 25737b64d0020b1b5d2f6d0821b37dbfb645e907 Mon Sep 17 00:00:00 2001 From: David Date: Sat, 28 Aug 2021 22:00:33 +0200 Subject: [PATCH 050/208] build(model): update User model --- .../moneytransfersystem/model/User.java | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/src/main/java/com/openclassrooms/moneytransfersystem/model/User.java b/src/main/java/com/openclassrooms/moneytransfersystem/model/User.java index 8097755..fdf55d1 100644 --- a/src/main/java/com/openclassrooms/moneytransfersystem/model/User.java +++ b/src/main/java/com/openclassrooms/moneytransfersystem/model/User.java @@ -19,24 +19,24 @@ public class User { @Id @GeneratedValue(strategy = GenerationType.IDENTITY) @Column(name = "user_id") - Long id; + private Long id; @Column(nullable = false) - String email; + private String email; @Column(nullable = false) - String password; + private String password; @Column(nullable = false) - String firstName; + private String firstName; @Column(nullable = false) - String lastName; + private String lastName; @Column(nullable = false) - int ibanCode; + private int ibanCode; @Column(nullable = false) - int bicCode; + private int bicCode; @Column(nullable = false) - float balance; + private float balance; - String friendsList; + private String friendsList; @OneToMany(mappedBy = "user") private Collection transfers; From e3bc1dabba4a33456ed7619b0c56ca30e2c65054 Mon Sep 17 00:00:00 2001 From: David Date: Sat, 28 Aug 2021 22:01:08 +0200 Subject: [PATCH 051/208] build(model): replace float to double in User model --- .../java/com/openclassrooms/moneytransfersystem/model/User.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/com/openclassrooms/moneytransfersystem/model/User.java b/src/main/java/com/openclassrooms/moneytransfersystem/model/User.java index fdf55d1..9b002e8 100644 --- a/src/main/java/com/openclassrooms/moneytransfersystem/model/User.java +++ b/src/main/java/com/openclassrooms/moneytransfersystem/model/User.java @@ -34,7 +34,7 @@ public class User { @Column(nullable = false) private int bicCode; @Column(nullable = false) - private float balance; + private double balance; private String friendsList; From fb9507eef268481270154e3fa86980d00d7ea873 Mon Sep 17 00:00:00 2001 From: David Date: Sat, 28 Aug 2021 22:09:49 +0200 Subject: [PATCH 052/208] feat(controller): update LoginController --- .../controller/LoginController.java | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/src/main/java/com/openclassrooms/moneytransfersystem/controller/LoginController.java b/src/main/java/com/openclassrooms/moneytransfersystem/controller/LoginController.java index d5a05a9..8d10252 100644 --- a/src/main/java/com/openclassrooms/moneytransfersystem/controller/LoginController.java +++ b/src/main/java/com/openclassrooms/moneytransfersystem/controller/LoginController.java @@ -1,8 +1,5 @@ package com.openclassrooms.moneytransfersystem.controller; -import com.openclassrooms.moneytransfersystem.dao.FriendshipRepository; -import com.openclassrooms.moneytransfersystem.dao.TransferRepository; -import com.openclassrooms.moneytransfersystem.dao.UserRepository; import com.openclassrooms.moneytransfersystem.model.*; import com.openclassrooms.moneytransfersystem.service.user.UserCreationService; import com.openclassrooms.moneytransfersystem.service.user.UserReadService; @@ -65,13 +62,9 @@ public String listTransfers(Model model) { .forEach( t -> { TransferView transfer = new TransferView(); transfer.setDate(t.getDate()); - transfer.setRelation(t.getUser().getFirstName()); + transfer.setRelation(t.getSender().getFirstName()); transfer.setDescription(t.getDescription()); - if (t.getType() == TransferType.INGOING) { - transfer.setAmount("+ " + String.valueOf(t.getAmount())); - } else if (t.getType() == TransferType.OUTGOING) { - transfer.setAmount("- " + String.valueOf(t.getAmount())); - } + transfer.setAmount(String.valueOf(t.getAmount())); listTransfers.add(transfer); }); From c3ae12b0e15f844eb92df2b8ea37f11c65a6816f Mon Sep 17 00:00:00 2001 From: David Date: Mon, 30 Aug 2021 09:15:44 +0200 Subject: [PATCH 053/208] hotfix: fix start exception by removing nullable --- .../openclassrooms/moneytransfersystem/model/Transfer.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/java/com/openclassrooms/moneytransfersystem/model/Transfer.java b/src/main/java/com/openclassrooms/moneytransfersystem/model/Transfer.java index adcf850..74d8cf9 100644 --- a/src/main/java/com/openclassrooms/moneytransfersystem/model/Transfer.java +++ b/src/main/java/com/openclassrooms/moneytransfersystem/model/Transfer.java @@ -24,16 +24,16 @@ public class Transfer { @Column(nullable = true) private String description; - @Column(nullable = true) + //@Column(nullable = true) @ManyToOne(cascade = CascadeType.ALL) @JoinTable( name = "user", joinColumns = @JoinColumn(name = "user_id"), - inverseJoinColumns = @JoinColumn(name = "sender") + inverseJoinColumns = @JoinColumn(name = "sender")_ ) private User sender; - @Column(nullable = true) + //@Column(nullable = true) @ManyToOne(cascade = CascadeType.ALL) @JoinTable( name = "user", From 468903dcd67c4bfafe77dbeb542a30e07518cd56 Mon Sep 17 00:00:00 2001 From: David Date: Mon, 30 Aug 2021 09:18:59 +0200 Subject: [PATCH 054/208] feat(data): add two User associations to Transfer --- .../com/openclassrooms/moneytransfersystem/model/User.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/openclassrooms/moneytransfersystem/model/User.java b/src/main/java/com/openclassrooms/moneytransfersystem/model/User.java index 9b002e8..17572c2 100644 --- a/src/main/java/com/openclassrooms/moneytransfersystem/model/User.java +++ b/src/main/java/com/openclassrooms/moneytransfersystem/model/User.java @@ -38,6 +38,9 @@ public class User { private String friendsList; - @OneToMany(mappedBy = "user") - private Collection transfers; + @OneToMany(mappedBy = "sender") + private Collection outgoingTransfers; + + @OneToMany(mappedBy = "receiver") + private Collection ingoingTransfers; } From 70580067ed5ebb8407728f3eae0c06dd1671039a Mon Sep 17 00:00:00 2001 From: David Date: Mon, 30 Aug 2021 09:56:13 +0200 Subject: [PATCH 055/208] feat(data): update database stucture --- src/main/resources/data.sql | Bin 10262 -> 4629 bytes 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/src/main/resources/data.sql b/src/main/resources/data.sql index ab38d90708beed8579f722275c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#C~@DN)Ov_I zMxN~0H7xq&MHzpr-F2zEZ)n$*XOP7mIj$1jH`9nuWt?23bdh*q8y+6 zh9i@VH@$n3)sRc4NF?H}23NPodcAA*I1V9$t3~AOv2y*y?2e~gvwFSAU8y#9`nWU2 znfem5;u@Yft6R(<2W+Ytoe$1nXW}oMsVsr#J}CU5_e*wQl{)yJqt89&6xZuKpEyLe zc8s%y&-h(L%Q{waP4r!ZecprDF6!T*wvY3H3;dQqr-jc2R$~t__bv1=@)>DPAstIR zspE=oZjAM&YvHdi4s%D=&lm<6P2Us8iOwO~&oSH1mXM8-k=!4laU!~1tyu1p(Fw(s zu(XUZp;|X$`8&L!KD5%P6nUD!a}k~`n2afH4_B7Z&Zo@l>=C48Wq)^B^GTkL**Ki9 zL3kh3w~6TDzn3wdu1+gMbrSnn{$X9Dt>_^C-M+(jtBF~|*389^I`x+z(qu?j&~zvTh^Tdj;uQch{QpB1zdj&6cxj z_jFxu%J_9IRZG#o?~p{gMtsI+?%lXI3xrFN_Qg265h=_s+$x)kzi%y=QRM!R=vcJR zT_9mObKiS)5r p=Zyn%2G6@@5!MkUe9O51R>BRX1(a9twv3(cS17IHm%GKJ`7ewq$vgl6 From 386c06b5848a257609aa2030f960a9a9a39785fd Mon Sep 17 00:00:00 2001 From: David Date: Mon, 30 Aug 2021 09:57:35 +0200 Subject: [PATCH 056/208] build(model): rename Transfer model to Ingoing --- .../moneytransfersystem/dao/TransferRepository.java | 4 ++-- .../moneytransfersystem/model/{Transfer.java => Ingoing.java} | 2 +- .../com/openclassrooms/moneytransfersystem/model/User.java | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) rename src/main/java/com/openclassrooms/moneytransfersystem/model/{Transfer.java => Ingoing.java} (97%) diff --git a/src/main/java/com/openclassrooms/moneytransfersystem/dao/TransferRepository.java b/src/main/java/com/openclassrooms/moneytransfersystem/dao/TransferRepository.java index 94aec7e..d6dff70 100644 --- a/src/main/java/com/openclassrooms/moneytransfersystem/dao/TransferRepository.java +++ b/src/main/java/com/openclassrooms/moneytransfersystem/dao/TransferRepository.java @@ -1,11 +1,11 @@ package com.openclassrooms.moneytransfersystem.dao; -import com.openclassrooms.moneytransfersystem.model.Transfer; +import com.openclassrooms.moneytransfersystem.model.Ingoing; import org.springframework.data.jpa.repository.JpaRepository; import org.springframework.stereotype.Repository; @Repository -public interface TransferRepository extends JpaRepository { +public interface TransferRepository extends JpaRepository { } diff --git a/src/main/java/com/openclassrooms/moneytransfersystem/model/Transfer.java b/src/main/java/com/openclassrooms/moneytransfersystem/model/Ingoing.java similarity index 97% rename from src/main/java/com/openclassrooms/moneytransfersystem/model/Transfer.java rename to src/main/java/com/openclassrooms/moneytransfersystem/model/Ingoing.java index 74d8cf9..7a859af 100644 --- a/src/main/java/com/openclassrooms/moneytransfersystem/model/Transfer.java +++ b/src/main/java/com/openclassrooms/moneytransfersystem/model/Ingoing.java @@ -8,7 +8,7 @@ @Data @Entity @Table(name = "transfer") -public class Transfer { +public class Ingoing { @Id @GeneratedValue(strategy = GenerationType.IDENTITY) diff --git a/src/main/java/com/openclassrooms/moneytransfersystem/model/User.java b/src/main/java/com/openclassrooms/moneytransfersystem/model/User.java index 17572c2..bb1dadd 100644 --- a/src/main/java/com/openclassrooms/moneytransfersystem/model/User.java +++ b/src/main/java/com/openclassrooms/moneytransfersystem/model/User.java @@ -39,8 +39,8 @@ public class User { private String friendsList; @OneToMany(mappedBy = "sender") - private Collection outgoingTransfers; + private Collection outgoingTransfers; @OneToMany(mappedBy = "receiver") - private Collection ingoingTransfers; + private Collection ingoingTransfers; } From 0e5827a56ea46591a86e50d6c927e72e284dbf85 Mon Sep 17 00:00:00 2001 From: David Date: Mon, 30 Aug 2021 09:58:37 +0200 Subject: [PATCH 057/208] build(model): update Ingoing model --- .../openclassrooms/moneytransfersystem/model/User.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/main/java/com/openclassrooms/moneytransfersystem/model/User.java b/src/main/java/com/openclassrooms/moneytransfersystem/model/User.java index bb1dadd..25450d1 100644 --- a/src/main/java/com/openclassrooms/moneytransfersystem/model/User.java +++ b/src/main/java/com/openclassrooms/moneytransfersystem/model/User.java @@ -38,9 +38,9 @@ public class User { private String friendsList; - @OneToMany(mappedBy = "sender") - private Collection outgoingTransfers; - - @OneToMany(mappedBy = "receiver") + @OneToMany(mappedBy = "user") private Collection ingoingTransfers; + + @OneToMany(mappedBy = "user") + private Collection outgoingTransfers; } From 8b8e98c3d2eab2b0396de7465e6c875f025270ca Mon Sep 17 00:00:00 2001 From: David Date: Mon, 30 Aug 2021 09:59:57 +0200 Subject: [PATCH 058/208] build(model): update Ingoing model --- .../moneytransfersystem/model/Ingoing.java | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/src/main/java/com/openclassrooms/moneytransfersystem/model/Ingoing.java b/src/main/java/com/openclassrooms/moneytransfersystem/model/Ingoing.java index 7a859af..6baddeb 100644 --- a/src/main/java/com/openclassrooms/moneytransfersystem/model/Ingoing.java +++ b/src/main/java/com/openclassrooms/moneytransfersystem/model/Ingoing.java @@ -24,21 +24,11 @@ public class Ingoing { @Column(nullable = true) private String description; - //@Column(nullable = true) @ManyToOne(cascade = CascadeType.ALL) @JoinTable( name = "user", joinColumns = @JoinColumn(name = "user_id"), - inverseJoinColumns = @JoinColumn(name = "sender")_ + inverseJoinColumns = @JoinColumn(name = "user_id") ) - private User sender; - - //@Column(nullable = true) - @ManyToOne(cascade = CascadeType.ALL) - @JoinTable( - name = "user", - joinColumns = @JoinColumn(name = "user_id"), - inverseJoinColumns = @JoinColumn(name = "receiver") - ) - private User receiver; + private User user; } From aae8886a5bec64e311fcd464291cdb2c8166084c Mon Sep 17 00:00:00 2001 From: David Date: Mon, 30 Aug 2021 10:01:49 +0200 Subject: [PATCH 059/208] build(model): add outgoing model --- .../moneytransfersystem/model/Outgoing.java | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 src/main/java/com/openclassrooms/moneytransfersystem/model/Outgoing.java diff --git a/src/main/java/com/openclassrooms/moneytransfersystem/model/Outgoing.java b/src/main/java/com/openclassrooms/moneytransfersystem/model/Outgoing.java new file mode 100644 index 0000000..6719f64 --- /dev/null +++ b/src/main/java/com/openclassrooms/moneytransfersystem/model/Outgoing.java @@ -0,0 +1,12 @@ +package com.openclassrooms.moneytransfersystem.model; + +import lombok.Data; + +import javax.persistence.Entity; +import javax.persistence.Table; + +@Data +@Entity +@Table(name = "outgoing") +public class Outgoing { +} From dc199b0f1a4556645f50840e3f76944aeee8c94a Mon Sep 17 00:00:00 2001 From: David Date: Mon, 30 Aug 2021 10:02:03 +0200 Subject: [PATCH 060/208] build(model): update Ingoing model --- .../com/openclassrooms/moneytransfersystem/model/Ingoing.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/com/openclassrooms/moneytransfersystem/model/Ingoing.java b/src/main/java/com/openclassrooms/moneytransfersystem/model/Ingoing.java index 6baddeb..3513abf 100644 --- a/src/main/java/com/openclassrooms/moneytransfersystem/model/Ingoing.java +++ b/src/main/java/com/openclassrooms/moneytransfersystem/model/Ingoing.java @@ -7,7 +7,7 @@ @Data @Entity -@Table(name = "transfer") +@Table(name = "ingoing") public class Ingoing { @Id From edc52c0c52e0e3832d61d2dbed467dbd7c2a4995 Mon Sep 17 00:00:00 2001 From: David Date: Mon, 30 Aug 2021 10:04:22 +0200 Subject: [PATCH 061/208] build(model): update Outgoing model --- .../moneytransfersystem/model/Outgoing.java | 26 +++++++++++++++++-- 1 file changed, 24 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/openclassrooms/moneytransfersystem/model/Outgoing.java b/src/main/java/com/openclassrooms/moneytransfersystem/model/Outgoing.java index 6719f64..4e8a0a3 100644 --- a/src/main/java/com/openclassrooms/moneytransfersystem/model/Outgoing.java +++ b/src/main/java/com/openclassrooms/moneytransfersystem/model/Outgoing.java @@ -2,11 +2,33 @@ import lombok.Data; -import javax.persistence.Entity; -import javax.persistence.Table; +import javax.persistence.*; +import java.time.LocalDateTime; @Data @Entity @Table(name = "outgoing") public class Outgoing { + + @Id + @GeneratedValue(strategy = GenerationType.IDENTITY) + @Column(name = "transfer_id") + private Long id; + + @Column(nullable = false) + private LocalDateTime date; + @Column(nullable = false) + private double amount; + @Column(nullable = false) + private double tax; + @Column(nullable = true) + private String description; + + @ManyToOne(cascade = CascadeType.ALL) + @JoinTable( + name = "user", + joinColumns = @JoinColumn(name = "user_id"), + inverseJoinColumns = @JoinColumn(name = "user_id") + ) + private User user; } From 18098288d2127cfda3f28c973499278d46c62722 Mon Sep 17 00:00:00 2001 From: David Date: Mon, 30 Aug 2021 10:07:07 +0200 Subject: [PATCH 062/208] build(repo): rename TransferRepository to IngoingRepository --- .../dao/{TransferRepository.java => IngoingRepository.java} | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) rename src/main/java/com/openclassrooms/moneytransfersystem/dao/{TransferRepository.java => IngoingRepository.java} (76%) diff --git a/src/main/java/com/openclassrooms/moneytransfersystem/dao/TransferRepository.java b/src/main/java/com/openclassrooms/moneytransfersystem/dao/IngoingRepository.java similarity index 76% rename from src/main/java/com/openclassrooms/moneytransfersystem/dao/TransferRepository.java rename to src/main/java/com/openclassrooms/moneytransfersystem/dao/IngoingRepository.java index d6dff70..441ab88 100644 --- a/src/main/java/com/openclassrooms/moneytransfersystem/dao/TransferRepository.java +++ b/src/main/java/com/openclassrooms/moneytransfersystem/dao/IngoingRepository.java @@ -5,7 +5,7 @@ import org.springframework.stereotype.Repository; @Repository -public interface TransferRepository extends JpaRepository { +public interface IngoingRepository extends JpaRepository { } From b0df6a195e0ba46e54ff8af04840654a57c34217 Mon Sep 17 00:00:00 2001 From: David Date: Mon, 30 Aug 2021 10:08:19 +0200 Subject: [PATCH 063/208] build(repo): add OutgoingRepository --- .../moneytransfersystem/dao/OutgoingRepository.java | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 src/main/java/com/openclassrooms/moneytransfersystem/dao/OutgoingRepository.java diff --git a/src/main/java/com/openclassrooms/moneytransfersystem/dao/OutgoingRepository.java b/src/main/java/com/openclassrooms/moneytransfersystem/dao/OutgoingRepository.java new file mode 100644 index 0000000..bac1831 --- /dev/null +++ b/src/main/java/com/openclassrooms/moneytransfersystem/dao/OutgoingRepository.java @@ -0,0 +1,9 @@ +package com.openclassrooms.moneytransfersystem.dao; + +import org.springframework.stereotype.Repository; + +@Repository +public interface OutgoingRepository { + + +} From 80bc696c7fe78e6f7d8a5ca6f1fb9e0ac12ab59b Mon Sep 17 00:00:00 2001 From: David Date: Mon, 30 Aug 2021 10:28:26 +0200 Subject: [PATCH 064/208] feat(data): update database strcuture --- .../controller/LoginController.java | 10 ++++++++-- .../dao/OutgoingRepository.java | 6 ++++-- src/main/resources/data.sql | 20 ++++++++++++------- 3 files changed, 25 insertions(+), 11 deletions(-) diff --git a/src/main/java/com/openclassrooms/moneytransfersystem/controller/LoginController.java b/src/main/java/com/openclassrooms/moneytransfersystem/controller/LoginController.java index 8d10252..3ad0b86 100644 --- a/src/main/java/com/openclassrooms/moneytransfersystem/controller/LoginController.java +++ b/src/main/java/com/openclassrooms/moneytransfersystem/controller/LoginController.java @@ -1,5 +1,6 @@ package com.openclassrooms.moneytransfersystem.controller; +import com.openclassrooms.moneytransfersystem.dao.OutgoingRepository; import com.openclassrooms.moneytransfersystem.model.*; import com.openclassrooms.moneytransfersystem.service.user.UserCreationService; import com.openclassrooms.moneytransfersystem.service.user.UserReadService; @@ -23,6 +24,9 @@ public class LoginController { @Autowired private UserReadService userReadService; + @Autowired + private OutgoingRepository outgoingRepository; + @GetMapping("") public String viewHomePage() { @@ -58,11 +62,13 @@ public String listTransfers(Model model) { model.addAttribute("balance", balance); List listTransfers = new ArrayList<>(); - user.getTransfers().stream() + user.getIngoingTransfers().stream() .forEach( t -> { TransferView transfer = new TransferView(); transfer.setDate(t.getDate()); - transfer.setRelation(t.getSender().getFirstName()); + transfer.setRelation( + outgoingRepository.getById(t.getId()) getSender().getFirstName() + ); transfer.setDescription(t.getDescription()); transfer.setAmount(String.valueOf(t.getAmount())); listTransfers.add(transfer); diff --git a/src/main/java/com/openclassrooms/moneytransfersystem/dao/OutgoingRepository.java b/src/main/java/com/openclassrooms/moneytransfersystem/dao/OutgoingRepository.java index bac1831..b2cd617 100644 --- a/src/main/java/com/openclassrooms/moneytransfersystem/dao/OutgoingRepository.java +++ b/src/main/java/com/openclassrooms/moneytransfersystem/dao/OutgoingRepository.java @@ -1,9 +1,11 @@ package com.openclassrooms.moneytransfersystem.dao; +import com.openclassrooms.moneytransfersystem.model.Ingoing; +import org.springframework.data.jpa.repository.JpaRepository; import org.springframework.stereotype.Repository; @Repository -public interface OutgoingRepository { +public interface OutgoingRepository extends JpaRepository { + - } diff --git a/src/main/resources/data.sql b/src/main/resources/data.sql index 4226f46..675489f 100644 --- a/src/main/resources/data.sql +++ b/src/main/resources/data.sql @@ -23,15 +23,18 @@ DROP TABLE IF EXISTS `ingoing`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!50503 SET character_set_client = utf8mb4 */; CREATE TABLE `ingoing` ( - `transfer_id` int(10) unsigned NOT NULL AUTO_INCREMENT, + `ingoing_id` int(10) unsigned NOT NULL AUTO_INCREMENT, `user_id` int(10) unsigned DEFAULT NULL, + `outgoing_id` int(10) unsigned DEFAULT NULL, `date` timestamp NOT NULL, `amount` decimal(10,2) NOT NULL, `tax` decimal(10,1) NOT NULL, `description` varchar(50) DEFAULT NULL, - PRIMARY KEY (`transfer_id`), + PRIMARY KEY (`ingoing_id`), KEY `user_id` (`user_id`), - CONSTRAINT `ingoing_ibfk_1` FOREIGN KEY (`user_id`) REFERENCES `user` (`user_id`) ON DELETE SET NULL ON UPDATE CASCADE + KEY `outgoing_id` (`outgoing_id`), + CONSTRAINT `ingoing_ibfk_1` FOREIGN KEY (`user_id`) REFERENCES `user` (`user_id`) ON DELETE SET NULL ON UPDATE CASCADE, + CONSTRAINT `ingoing_ibfk_2` FOREIGN KEY (`outgoing_id`) REFERENCES `outgoing` (`outgoing_id`) ON DELETE CASCADE ON UPDATE CASCADE ) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; /*!40101 SET character_set_client = @saved_cs_client */; @@ -52,14 +55,17 @@ DROP TABLE IF EXISTS `outgoing`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!50503 SET character_set_client = utf8mb4 */; CREATE TABLE `outgoing` ( - `transfer_id` int(10) unsigned NOT NULL AUTO_INCREMENT, + `outgoing_id` int(10) unsigned NOT NULL AUTO_INCREMENT, `user_id` int(10) unsigned DEFAULT NULL, + `ingoing_id` int(10) unsigned DEFAULT NULL, `date` timestamp NOT NULL, `amount` decimal(10,2) NOT NULL, `tax` decimal(10,1) NOT NULL, `description` varchar(50) DEFAULT NULL, - PRIMARY KEY (`transfer_id`), - KEY `user_id` (`user_id`) + PRIMARY KEY (`outgoing_id`), + KEY `user_id` (`user_id`), + KEY `ingoing_id` (`ingoing_id`), + CONSTRAINT `outgoing_ibfk_1` FOREIGN KEY (`ingoing_id`) REFERENCES `ingoing` (`ingoing_id`) ON DELETE CASCADE ON UPDATE CASCADE ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; /*!40101 SET character_set_client = @saved_cs_client */; @@ -137,4 +143,4 @@ UNLOCK TABLES; /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; /*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; --- Dump completed on 2021-08-30 9:55:21 +-- Dump completed on 2021-08-30 10:27:25 From c5e5f2456dd0ac186e25430e9a25484a4292371f Mon Sep 17 00:00:00 2001 From: David Date: Mon, 30 Aug 2021 10:30:57 +0200 Subject: [PATCH 065/208] build(model): update Outgoing mode --- .../openclassrooms/moneytransfersystem/model/Outgoing.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/main/java/com/openclassrooms/moneytransfersystem/model/Outgoing.java b/src/main/java/com/openclassrooms/moneytransfersystem/model/Outgoing.java index 4e8a0a3..ffca6b8 100644 --- a/src/main/java/com/openclassrooms/moneytransfersystem/model/Outgoing.java +++ b/src/main/java/com/openclassrooms/moneytransfersystem/model/Outgoing.java @@ -24,6 +24,10 @@ public class Outgoing { @Column(nullable = true) private String description; + @OneToOne(cascade = CascadeType.ALL) + @JoinColumn(name = "ingoing_id") + private Ingoing ingoing; + @ManyToOne(cascade = CascadeType.ALL) @JoinTable( name = "user", From 623b0bc247e8cf14d1e4dcbcdd9e3efac017fe72 Mon Sep 17 00:00:00 2001 From: David Date: Mon, 30 Aug 2021 10:48:29 +0200 Subject: [PATCH 066/208] build(model): update Ingoing and Outgoing models relationships --- .../openclassrooms/moneytransfersystem/model/Ingoing.java | 5 ++++- .../openclassrooms/moneytransfersystem/model/Outgoing.java | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/openclassrooms/moneytransfersystem/model/Ingoing.java b/src/main/java/com/openclassrooms/moneytransfersystem/model/Ingoing.java index 3513abf..fad3e71 100644 --- a/src/main/java/com/openclassrooms/moneytransfersystem/model/Ingoing.java +++ b/src/main/java/com/openclassrooms/moneytransfersystem/model/Ingoing.java @@ -12,7 +12,7 @@ public class Ingoing { @Id @GeneratedValue(strategy = GenerationType.IDENTITY) - @Column(name = "transfer_id") + @Column(name = "ingoing_id") private Long id; @Column(nullable = false) @@ -24,6 +24,9 @@ public class Ingoing { @Column(nullable = true) private String description; + @OneToOne(mappedBy = "ingoing") + private Outgoing outgoing; + @ManyToOne(cascade = CascadeType.ALL) @JoinTable( name = "user", diff --git a/src/main/java/com/openclassrooms/moneytransfersystem/model/Outgoing.java b/src/main/java/com/openclassrooms/moneytransfersystem/model/Outgoing.java index ffca6b8..5208397 100644 --- a/src/main/java/com/openclassrooms/moneytransfersystem/model/Outgoing.java +++ b/src/main/java/com/openclassrooms/moneytransfersystem/model/Outgoing.java @@ -12,7 +12,7 @@ public class Outgoing { @Id @GeneratedValue(strategy = GenerationType.IDENTITY) - @Column(name = "transfer_id") + @Column(name = "outgoing_id") private Long id; @Column(nullable = false) From a87607c6e9a1e249026b8f125f919a29a29bb4b6 Mon Sep 17 00:00:00 2001 From: David Date: Mon, 30 Aug 2021 10:50:47 +0200 Subject: [PATCH 067/208] feat(controller): add OutgoingRepository to LoginController --- .../moneytransfersystem/controller/LoginController.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/main/java/com/openclassrooms/moneytransfersystem/controller/LoginController.java b/src/main/java/com/openclassrooms/moneytransfersystem/controller/LoginController.java index 3ad0b86..323f020 100644 --- a/src/main/java/com/openclassrooms/moneytransfersystem/controller/LoginController.java +++ b/src/main/java/com/openclassrooms/moneytransfersystem/controller/LoginController.java @@ -1,5 +1,6 @@ package com.openclassrooms.moneytransfersystem.controller; +import com.openclassrooms.moneytransfersystem.dao.IngoingRepository; import com.openclassrooms.moneytransfersystem.dao.OutgoingRepository; import com.openclassrooms.moneytransfersystem.model.*; import com.openclassrooms.moneytransfersystem.service.user.UserCreationService; @@ -24,6 +25,9 @@ public class LoginController { @Autowired private UserReadService userReadService; + @Autowired + private IngoingRepository ingoingRepository; + @Autowired private OutgoingRepository outgoingRepository; From 17f9d0960be776fbeae7bab181192846266e7f8c Mon Sep 17 00:00:00 2001 From: David Date: Mon, 30 Aug 2021 10:54:33 +0200 Subject: [PATCH 068/208] feat(repo): update OutgoingRepository --- .../moneytransfersystem/dao/OutgoingRepository.java | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/openclassrooms/moneytransfersystem/dao/OutgoingRepository.java b/src/main/java/com/openclassrooms/moneytransfersystem/dao/OutgoingRepository.java index b2cd617..a8096d4 100644 --- a/src/main/java/com/openclassrooms/moneytransfersystem/dao/OutgoingRepository.java +++ b/src/main/java/com/openclassrooms/moneytransfersystem/dao/OutgoingRepository.java @@ -1,11 +1,15 @@ package com.openclassrooms.moneytransfersystem.dao; import com.openclassrooms.moneytransfersystem.model.Ingoing; +import com.openclassrooms.moneytransfersystem.model.Outgoing; +import com.openclassrooms.moneytransfersystem.model.User; import org.springframework.data.jpa.repository.JpaRepository; +import org.springframework.data.jpa.repository.Query; import org.springframework.stereotype.Repository; @Repository -public interface OutgoingRepository extends JpaRepository { - +public interface OutgoingRepository extends JpaRepository { + @Query("SELECT u FROM Ingoing u WHERE u.outgoing.id = ?1") + User findByIngoing(Long ingoingId); } From 4ecbf3ceb9bec8f62a88d7f7f481250ccf8cfcc1 Mon Sep 17 00:00:00 2001 From: David Date: Mon, 30 Aug 2021 10:55:29 +0200 Subject: [PATCH 069/208] feat(repo): update IngoingRepository --- .../moneytransfersystem/dao/IngoingRepository.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/openclassrooms/moneytransfersystem/dao/IngoingRepository.java b/src/main/java/com/openclassrooms/moneytransfersystem/dao/IngoingRepository.java index 441ab88..ff89de7 100644 --- a/src/main/java/com/openclassrooms/moneytransfersystem/dao/IngoingRepository.java +++ b/src/main/java/com/openclassrooms/moneytransfersystem/dao/IngoingRepository.java @@ -1,11 +1,14 @@ package com.openclassrooms.moneytransfersystem.dao; import com.openclassrooms.moneytransfersystem.model.Ingoing; +import com.openclassrooms.moneytransfersystem.model.User; import org.springframework.data.jpa.repository.JpaRepository; +import org.springframework.data.jpa.repository.Query; import org.springframework.stereotype.Repository; @Repository public interface IngoingRepository extends JpaRepository { - + @Query("SELECT u FROM Outgoing u WHERE u.ingoing.id = ?1") + User findByOutgoing(Long outgoingId); } From 8d9798a78b23620c186b1fc39dd3beb60d470075 Mon Sep 17 00:00:00 2001 From: David Date: Mon, 30 Aug 2021 10:57:09 +0200 Subject: [PATCH 070/208] feat(controller): add ingoing transfers to LoginController --- .../moneytransfersystem/controller/LoginController.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/openclassrooms/moneytransfersystem/controller/LoginController.java b/src/main/java/com/openclassrooms/moneytransfersystem/controller/LoginController.java index 323f020..abebd39 100644 --- a/src/main/java/com/openclassrooms/moneytransfersystem/controller/LoginController.java +++ b/src/main/java/com/openclassrooms/moneytransfersystem/controller/LoginController.java @@ -71,10 +71,10 @@ public String listTransfers(Model model) { TransferView transfer = new TransferView(); transfer.setDate(t.getDate()); transfer.setRelation( - outgoingRepository.getById(t.getId()) getSender().getFirstName() + outgoingRepository.findByIngoing(t.getId()).getFirstName() ); transfer.setDescription(t.getDescription()); - transfer.setAmount(String.valueOf(t.getAmount())); + transfer.setAmount(String.valueOf("+" + t.getAmount())); listTransfers.add(transfer); }); From b04e1fc37c4cb9bc6cbcc12cfe7c27183414ce8e Mon Sep 17 00:00:00 2001 From: David Date: Mon, 30 Aug 2021 10:59:10 +0200 Subject: [PATCH 071/208] feat(controller): add outgoing transfers to LoginController --- .../controller/LoginController.java | 22 ++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) diff --git a/src/main/java/com/openclassrooms/moneytransfersystem/controller/LoginController.java b/src/main/java/com/openclassrooms/moneytransfersystem/controller/LoginController.java index abebd39..5b9014a 100644 --- a/src/main/java/com/openclassrooms/moneytransfersystem/controller/LoginController.java +++ b/src/main/java/com/openclassrooms/moneytransfersystem/controller/LoginController.java @@ -67,14 +67,26 @@ public String listTransfers(Model model) { List listTransfers = new ArrayList<>(); user.getIngoingTransfers().stream() - .forEach( t -> { + .forEach( i -> { TransferView transfer = new TransferView(); - transfer.setDate(t.getDate()); + transfer.setDate(i.getDate()); transfer.setRelation( - outgoingRepository.findByIngoing(t.getId()).getFirstName() + outgoingRepository.findByIngoing(i.getId()).getFirstName() ); - transfer.setDescription(t.getDescription()); - transfer.setAmount(String.valueOf("+" + t.getAmount())); + transfer.setDescription(i.getDescription()); + transfer.setAmount(String.valueOf("+" + i.getAmount())); + listTransfers.add(transfer); + }); + + user.getOutgoingTransfers().stream() + .forEach( o -> { + TransferView transfer = new TransferView(); + transfer.setDate(o.getDate()); + transfer.setRelation( + ingoingRepository.findByOutgoing(o.getId()).getFirstName() + ); + transfer.setDescription(o.getDescription()); + transfer.setAmount(String.valueOf("-" + o.getAmount())); listTransfers.add(transfer); }); From 1c4f51729325a48030eaa6e04cfe6ac4a24a1612 Mon Sep 17 00:00:00 2001 From: David Date: Mon, 30 Aug 2021 10:59:44 +0200 Subject: [PATCH 072/208] refactor: rename TransferView model to Transfer --- .../moneytransfersystem/controller/LoginController.java | 8 ++++---- .../model/{TransferView.java => Transfer.java} | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) rename src/main/java/com/openclassrooms/moneytransfersystem/model/{TransferView.java => Transfer.java} (88%) diff --git a/src/main/java/com/openclassrooms/moneytransfersystem/controller/LoginController.java b/src/main/java/com/openclassrooms/moneytransfersystem/controller/LoginController.java index 5b9014a..2ef4733 100644 --- a/src/main/java/com/openclassrooms/moneytransfersystem/controller/LoginController.java +++ b/src/main/java/com/openclassrooms/moneytransfersystem/controller/LoginController.java @@ -65,10 +65,10 @@ public String listTransfers(Model model) { String balance = String.format("%.2f", user.getBalance()); model.addAttribute("balance", balance); - List listTransfers = new ArrayList<>(); + List listTransfers = new ArrayList<>(); user.getIngoingTransfers().stream() .forEach( i -> { - TransferView transfer = new TransferView(); + Transfer transfer = new Transfer(); transfer.setDate(i.getDate()); transfer.setRelation( outgoingRepository.findByIngoing(i.getId()).getFirstName() @@ -80,7 +80,7 @@ public String listTransfers(Model model) { user.getOutgoingTransfers().stream() .forEach( o -> { - TransferView transfer = new TransferView(); + Transfer transfer = new Transfer(); transfer.setDate(o.getDate()); transfer.setRelation( ingoingRepository.findByOutgoing(o.getId()).getFirstName() @@ -90,7 +90,7 @@ public String listTransfers(Model model) { listTransfers.add(transfer); }); - Collections.sort(listTransfers, Comparator.comparing(TransferView::getDate)); + Collections.sort(listTransfers, Comparator.comparing(Transfer::getDate)); model.addAttribute("listTransfers", listTransfers); return "app"; diff --git a/src/main/java/com/openclassrooms/moneytransfersystem/model/TransferView.java b/src/main/java/com/openclassrooms/moneytransfersystem/model/Transfer.java similarity index 88% rename from src/main/java/com/openclassrooms/moneytransfersystem/model/TransferView.java rename to src/main/java/com/openclassrooms/moneytransfersystem/model/Transfer.java index 22886db..119800f 100644 --- a/src/main/java/com/openclassrooms/moneytransfersystem/model/TransferView.java +++ b/src/main/java/com/openclassrooms/moneytransfersystem/model/Transfer.java @@ -5,7 +5,7 @@ import java.time.LocalDateTime; @Data -public class TransferView { +public class Transfer { LocalDateTime date; String relation; From 79edfdfc58f422ed5035ddf5597e13478dc2db40 Mon Sep 17 00:00:00 2001 From: David Date: Mon, 30 Aug 2021 11:07:38 +0200 Subject: [PATCH 073/208] feat(front): update signup relations --- src/main/resources/templates/signup_form.html | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/src/main/resources/templates/signup_form.html b/src/main/resources/templates/signup_form.html index a167ebb..5aa842c 100644 --- a/src/main/resources/templates/signup_form.html +++ b/src/main/resources/templates/signup_form.html @@ -49,6 +49,22 @@

Revenir en arrière

+
+ +
+ +
+
+ +
+ +
+ +
+
+
From 858138bcda7fbedc16ca63343d60f6951ca8b42c Mon Sep 17 00:00:00 2001 From: David Date: Mon, 30 Aug 2021 11:22:32 +0200 Subject: [PATCH 074/208] build(model): add cascade types to Outgoing model --- .../moneytransfersystem/controller/LoginController.java | 1 + .../com/openclassrooms/moneytransfersystem/model/Outgoing.java | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/openclassrooms/moneytransfersystem/controller/LoginController.java b/src/main/java/com/openclassrooms/moneytransfersystem/controller/LoginController.java index 2ef4733..d3a784e 100644 --- a/src/main/java/com/openclassrooms/moneytransfersystem/controller/LoginController.java +++ b/src/main/java/com/openclassrooms/moneytransfersystem/controller/LoginController.java @@ -51,6 +51,7 @@ public String processRegister(User user) { String encodedPassword = passwordEncoder.encode(user.getPassword()); user.setPassword(encodedPassword); user.setBalance(0); + user.setFriendsList("[]"); userCreationService.createUser(user); diff --git a/src/main/java/com/openclassrooms/moneytransfersystem/model/Outgoing.java b/src/main/java/com/openclassrooms/moneytransfersystem/model/Outgoing.java index 5208397..a85128e 100644 --- a/src/main/java/com/openclassrooms/moneytransfersystem/model/Outgoing.java +++ b/src/main/java/com/openclassrooms/moneytransfersystem/model/Outgoing.java @@ -32,7 +32,7 @@ public class Outgoing { @JoinTable( name = "user", joinColumns = @JoinColumn(name = "user_id"), - inverseJoinColumns = @JoinColumn(name = "user_id") + inverseJoinColumns = @JoinColumn(name = "user_id", insertable = false, updatable = false) ) private User user; } From 427cca6fbfc542c1942e6ea3fb6214557de0c5ba Mon Sep 17 00:00:00 2001 From: David Date: Mon, 30 Aug 2021 11:22:48 +0200 Subject: [PATCH 075/208] build(model): add cascade types to Ingoing model --- .../com/openclassrooms/moneytransfersystem/model/Ingoing.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/com/openclassrooms/moneytransfersystem/model/Ingoing.java b/src/main/java/com/openclassrooms/moneytransfersystem/model/Ingoing.java index fad3e71..9b9e120 100644 --- a/src/main/java/com/openclassrooms/moneytransfersystem/model/Ingoing.java +++ b/src/main/java/com/openclassrooms/moneytransfersystem/model/Ingoing.java @@ -31,7 +31,7 @@ public class Ingoing { @JoinTable( name = "user", joinColumns = @JoinColumn(name = "user_id"), - inverseJoinColumns = @JoinColumn(name = "user_id") + inverseJoinColumns = @JoinColumn(name = "user_id", insertable = false, updatable = false) ) private User user; } From 8c8147fccb404f9d5faccd0276d238c9eee16595 Mon Sep 17 00:00:00 2001 From: David Date: Mon, 30 Aug 2021 11:39:40 +0200 Subject: [PATCH 076/208] build(model): fix DuplicateMappingsException --- .../com/openclassrooms/moneytransfersystem/model/Ingoing.java | 2 +- .../openclassrooms/moneytransfersystem/model/Outgoing.java | 2 +- .../com/openclassrooms/moneytransfersystem/model/User.java | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/main/java/com/openclassrooms/moneytransfersystem/model/Ingoing.java b/src/main/java/com/openclassrooms/moneytransfersystem/model/Ingoing.java index 9b9e120..a1651b2 100644 --- a/src/main/java/com/openclassrooms/moneytransfersystem/model/Ingoing.java +++ b/src/main/java/com/openclassrooms/moneytransfersystem/model/Ingoing.java @@ -33,5 +33,5 @@ public class Ingoing { joinColumns = @JoinColumn(name = "user_id"), inverseJoinColumns = @JoinColumn(name = "user_id", insertable = false, updatable = false) ) - private User user; + private User receiver; } diff --git a/src/main/java/com/openclassrooms/moneytransfersystem/model/Outgoing.java b/src/main/java/com/openclassrooms/moneytransfersystem/model/Outgoing.java index a85128e..0c7cd46 100644 --- a/src/main/java/com/openclassrooms/moneytransfersystem/model/Outgoing.java +++ b/src/main/java/com/openclassrooms/moneytransfersystem/model/Outgoing.java @@ -34,5 +34,5 @@ public class Outgoing { joinColumns = @JoinColumn(name = "user_id"), inverseJoinColumns = @JoinColumn(name = "user_id", insertable = false, updatable = false) ) - private User user; + private User sender; } diff --git a/src/main/java/com/openclassrooms/moneytransfersystem/model/User.java b/src/main/java/com/openclassrooms/moneytransfersystem/model/User.java index 25450d1..6a4c0ef 100644 --- a/src/main/java/com/openclassrooms/moneytransfersystem/model/User.java +++ b/src/main/java/com/openclassrooms/moneytransfersystem/model/User.java @@ -38,9 +38,9 @@ public class User { private String friendsList; - @OneToMany(mappedBy = "user") + @OneToMany(mappedBy = "sender") private Collection ingoingTransfers; - @OneToMany(mappedBy = "user") + @OneToMany(mappedBy = "receiver") private Collection outgoingTransfers; } From a9a3e50f176e0358ffe20a85dc87c25c469fd17b Mon Sep 17 00:00:00 2001 From: David Date: Mon, 30 Aug 2021 11:51:05 +0200 Subject: [PATCH 077/208] refactor: update User model annotations --- .../com/openclassrooms/moneytransfersystem/model/User.java | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/main/java/com/openclassrooms/moneytransfersystem/model/User.java b/src/main/java/com/openclassrooms/moneytransfersystem/model/User.java index 6a4c0ef..89af7ad 100644 --- a/src/main/java/com/openclassrooms/moneytransfersystem/model/User.java +++ b/src/main/java/com/openclassrooms/moneytransfersystem/model/User.java @@ -9,9 +9,6 @@ import java.util.Collection; @Data -@Builder -@AllArgsConstructor -@NoArgsConstructor @Entity @Table(name = "user") public class User { From 5952c5595bf4b3e0d5631a38c87e2cb1f675652c Mon Sep 17 00:00:00 2001 From: David Date: Mon, 30 Aug 2021 14:12:09 +0200 Subject: [PATCH 078/208] build(data): update database structure due to DuplicateMappingException --- src/main/resources/data.sql | 83 +++++++++++++++++-------------------- 1 file changed, 38 insertions(+), 45 deletions(-) diff --git a/src/main/resources/data.sql b/src/main/resources/data.sql index 675489f..bb9da0c 100644 --- a/src/main/resources/data.sql +++ b/src/main/resources/data.sql @@ -16,91 +16,84 @@ /*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */; -- --- Table structure for table `ingoing` +-- Table structure for table `tax` -- -DROP TABLE IF EXISTS `ingoing`; +DROP TABLE IF EXISTS `tax`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!50503 SET character_set_client = utf8mb4 */; -CREATE TABLE `ingoing` ( - `ingoing_id` int(10) unsigned NOT NULL AUTO_INCREMENT, - `user_id` int(10) unsigned DEFAULT NULL, - `outgoing_id` int(10) unsigned DEFAULT NULL, - `date` timestamp NOT NULL, - `amount` decimal(10,2) NOT NULL, - `tax` decimal(10,1) NOT NULL, - `description` varchar(50) DEFAULT NULL, - PRIMARY KEY (`ingoing_id`), - KEY `user_id` (`user_id`), - KEY `outgoing_id` (`outgoing_id`), - CONSTRAINT `ingoing_ibfk_1` FOREIGN KEY (`user_id`) REFERENCES `user` (`user_id`) ON DELETE SET NULL ON UPDATE CASCADE, - CONSTRAINT `ingoing_ibfk_2` FOREIGN KEY (`outgoing_id`) REFERENCES `outgoing` (`outgoing_id`) ON DELETE CASCADE ON UPDATE CASCADE -) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; +CREATE TABLE `tax` ( + `tax_id` int(10) unsigned NOT NULL, + `name` varchar(35) NOT NULL, + `rate` decimal(10,2) NOT NULL, + PRIMARY KEY (`tax_id`), + UNIQUE KEY `name` (`name`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- --- Dumping data for table `ingoing` +-- Dumping data for table `tax` -- -LOCK TABLES `ingoing` WRITE; -/*!40000 ALTER TABLE `ingoing` DISABLE KEYS */; -/*!40000 ALTER TABLE `ingoing` ENABLE KEYS */; +LOCK TABLES `tax` WRITE; +/*!40000 ALTER TABLE `tax` DISABLE KEYS */; +/*!40000 ALTER TABLE `tax` ENABLE KEYS */; UNLOCK TABLES; -- --- Table structure for table `outgoing` +-- Table structure for table `transfer` -- -DROP TABLE IF EXISTS `outgoing`; +DROP TABLE IF EXISTS `transfer`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!50503 SET character_set_client = utf8mb4 */; -CREATE TABLE `outgoing` ( - `outgoing_id` int(10) unsigned NOT NULL AUTO_INCREMENT, +CREATE TABLE `transfer` ( + `transfer_id` int(10) unsigned NOT NULL AUTO_INCREMENT, `user_id` int(10) unsigned DEFAULT NULL, - `ingoing_id` int(10) unsigned DEFAULT NULL, + `type` varchar(7) DEFAULT NULL, `date` timestamp NOT NULL, `amount` decimal(10,2) NOT NULL, `tax` decimal(10,1) NOT NULL, `description` varchar(50) DEFAULT NULL, - PRIMARY KEY (`outgoing_id`), + PRIMARY KEY (`transfer_id`), KEY `user_id` (`user_id`), - KEY `ingoing_id` (`ingoing_id`), - CONSTRAINT `outgoing_ibfk_1` FOREIGN KEY (`ingoing_id`) REFERENCES `ingoing` (`ingoing_id`) ON DELETE CASCADE ON UPDATE CASCADE -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; + KEY `type` (`type`), + CONSTRAINT `transfer_ibfk_1` FOREIGN KEY (`user_id`) REFERENCES `user` (`user_id`) ON DELETE SET NULL ON UPDATE CASCADE, + CONSTRAINT `transfer_ibfk_2` FOREIGN KEY (`type`) REFERENCES `type` (`name`) ON DELETE SET NULL ON UPDATE CASCADE +) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- --- Dumping data for table `outgoing` +-- Dumping data for table `transfer` -- -LOCK TABLES `outgoing` WRITE; -/*!40000 ALTER TABLE `outgoing` DISABLE KEYS */; -/*!40000 ALTER TABLE `outgoing` ENABLE KEYS */; +LOCK TABLES `transfer` WRITE; +/*!40000 ALTER TABLE `transfer` DISABLE KEYS */; +/*!40000 ALTER TABLE `transfer` ENABLE KEYS */; UNLOCK TABLES; -- --- Table structure for table `tax` +-- Table structure for table `type` -- -DROP TABLE IF EXISTS `tax`; +DROP TABLE IF EXISTS `type`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!50503 SET character_set_client = utf8mb4 */; -CREATE TABLE `tax` ( - `tax_id` int(10) unsigned NOT NULL, - `name` varchar(35) NOT NULL, - `rate` decimal(10,2) NOT NULL, - PRIMARY KEY (`tax_id`), +CREATE TABLE `type` ( + `type_id` int(10) unsigned NOT NULL AUTO_INCREMENT, + `name` varchar(7) DEFAULT NULL, + PRIMARY KEY (`type_id`), UNIQUE KEY `name` (`name`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- --- Dumping data for table `tax` +-- Dumping data for table `type` -- -LOCK TABLES `tax` WRITE; -/*!40000 ALTER TABLE `tax` DISABLE KEYS */; -/*!40000 ALTER TABLE `tax` ENABLE KEYS */; +LOCK TABLES `type` WRITE; +/*!40000 ALTER TABLE `type` DISABLE KEYS */; +/*!40000 ALTER TABLE `type` ENABLE KEYS */; UNLOCK TABLES; -- @@ -143,4 +136,4 @@ UNLOCK TABLES; /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; /*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; --- Dump completed on 2021-08-30 10:27:25 +-- Dump completed on 2021-08-30 14:10:44 From 6ad0ea724e0eab96bbca31054d4d11d5f727388c Mon Sep 17 00:00:00 2001 From: David Date: Mon, 30 Aug 2021 14:13:43 +0200 Subject: [PATCH 079/208] build(model): remove Outgoing model and repository --- .../dao/OutgoingRepository.java | 15 -------- .../moneytransfersystem/model/Outgoing.java | 38 ------------------- 2 files changed, 53 deletions(-) delete mode 100644 src/main/java/com/openclassrooms/moneytransfersystem/dao/OutgoingRepository.java delete mode 100644 src/main/java/com/openclassrooms/moneytransfersystem/model/Outgoing.java diff --git a/src/main/java/com/openclassrooms/moneytransfersystem/dao/OutgoingRepository.java b/src/main/java/com/openclassrooms/moneytransfersystem/dao/OutgoingRepository.java deleted file mode 100644 index a8096d4..0000000 --- a/src/main/java/com/openclassrooms/moneytransfersystem/dao/OutgoingRepository.java +++ /dev/null @@ -1,15 +0,0 @@ -package com.openclassrooms.moneytransfersystem.dao; - -import com.openclassrooms.moneytransfersystem.model.Ingoing; -import com.openclassrooms.moneytransfersystem.model.Outgoing; -import com.openclassrooms.moneytransfersystem.model.User; -import org.springframework.data.jpa.repository.JpaRepository; -import org.springframework.data.jpa.repository.Query; -import org.springframework.stereotype.Repository; - -@Repository -public interface OutgoingRepository extends JpaRepository { - - @Query("SELECT u FROM Ingoing u WHERE u.outgoing.id = ?1") - User findByIngoing(Long ingoingId); -} diff --git a/src/main/java/com/openclassrooms/moneytransfersystem/model/Outgoing.java b/src/main/java/com/openclassrooms/moneytransfersystem/model/Outgoing.java deleted file mode 100644 index 0c7cd46..0000000 --- a/src/main/java/com/openclassrooms/moneytransfersystem/model/Outgoing.java +++ /dev/null @@ -1,38 +0,0 @@ -package com.openclassrooms.moneytransfersystem.model; - -import lombok.Data; - -import javax.persistence.*; -import java.time.LocalDateTime; - -@Data -@Entity -@Table(name = "outgoing") -public class Outgoing { - - @Id - @GeneratedValue(strategy = GenerationType.IDENTITY) - @Column(name = "outgoing_id") - private Long id; - - @Column(nullable = false) - private LocalDateTime date; - @Column(nullable = false) - private double amount; - @Column(nullable = false) - private double tax; - @Column(nullable = true) - private String description; - - @OneToOne(cascade = CascadeType.ALL) - @JoinColumn(name = "ingoing_id") - private Ingoing ingoing; - - @ManyToOne(cascade = CascadeType.ALL) - @JoinTable( - name = "user", - joinColumns = @JoinColumn(name = "user_id"), - inverseJoinColumns = @JoinColumn(name = "user_id", insertable = false, updatable = false) - ) - private User sender; -} From a56fa9368145283256640b34fddd66eac33187f9 Mon Sep 17 00:00:00 2001 From: David Date: Mon, 30 Aug 2021 14:16:15 +0200 Subject: [PATCH 080/208] refactor: update models names --- .../controller/LoginController.java | 10 ++--- .../dao/IngoingRepository.java | 4 +- .../moneytransfersystem/model/Ingoing.java | 37 ------------------- .../moneytransfersystem/model/Transfer.java | 31 ++++++++++++++-- .../model/TransferView.java | 14 +++++++ .../moneytransfersystem/model/User.java | 5 +-- 6 files changed, 49 insertions(+), 52 deletions(-) delete mode 100644 src/main/java/com/openclassrooms/moneytransfersystem/model/Ingoing.java create mode 100644 src/main/java/com/openclassrooms/moneytransfersystem/model/TransferView.java diff --git a/src/main/java/com/openclassrooms/moneytransfersystem/controller/LoginController.java b/src/main/java/com/openclassrooms/moneytransfersystem/controller/LoginController.java index d3a784e..1e19ccb 100644 --- a/src/main/java/com/openclassrooms/moneytransfersystem/controller/LoginController.java +++ b/src/main/java/com/openclassrooms/moneytransfersystem/controller/LoginController.java @@ -66,10 +66,10 @@ public String listTransfers(Model model) { String balance = String.format("%.2f", user.getBalance()); model.addAttribute("balance", balance); - List listTransfers = new ArrayList<>(); - user.getIngoingTransfers().stream() + List listTransfers = new ArrayList<>(); + user.getTransferTransfers().stream() .forEach( i -> { - Transfer transfer = new Transfer(); + TransferView transfer = new TransferView(); transfer.setDate(i.getDate()); transfer.setRelation( outgoingRepository.findByIngoing(i.getId()).getFirstName() @@ -81,7 +81,7 @@ public String listTransfers(Model model) { user.getOutgoingTransfers().stream() .forEach( o -> { - Transfer transfer = new Transfer(); + TransferView transfer = new TransferView(); transfer.setDate(o.getDate()); transfer.setRelation( ingoingRepository.findByOutgoing(o.getId()).getFirstName() @@ -91,7 +91,7 @@ public String listTransfers(Model model) { listTransfers.add(transfer); }); - Collections.sort(listTransfers, Comparator.comparing(Transfer::getDate)); + Collections.sort(listTransfers, Comparator.comparing(TransferView::getDate)); model.addAttribute("listTransfers", listTransfers); return "app"; diff --git a/src/main/java/com/openclassrooms/moneytransfersystem/dao/IngoingRepository.java b/src/main/java/com/openclassrooms/moneytransfersystem/dao/IngoingRepository.java index ff89de7..8126386 100644 --- a/src/main/java/com/openclassrooms/moneytransfersystem/dao/IngoingRepository.java +++ b/src/main/java/com/openclassrooms/moneytransfersystem/dao/IngoingRepository.java @@ -1,13 +1,13 @@ package com.openclassrooms.moneytransfersystem.dao; -import com.openclassrooms.moneytransfersystem.model.Ingoing; +import com.openclassrooms.moneytransfersystem.model.Transfer; import com.openclassrooms.moneytransfersystem.model.User; import org.springframework.data.jpa.repository.JpaRepository; import org.springframework.data.jpa.repository.Query; import org.springframework.stereotype.Repository; @Repository -public interface IngoingRepository extends JpaRepository { +public interface IngoingRepository extends JpaRepository { @Query("SELECT u FROM Outgoing u WHERE u.ingoing.id = ?1") User findByOutgoing(Long outgoingId); diff --git a/src/main/java/com/openclassrooms/moneytransfersystem/model/Ingoing.java b/src/main/java/com/openclassrooms/moneytransfersystem/model/Ingoing.java deleted file mode 100644 index a1651b2..0000000 --- a/src/main/java/com/openclassrooms/moneytransfersystem/model/Ingoing.java +++ /dev/null @@ -1,37 +0,0 @@ -package com.openclassrooms.moneytransfersystem.model; - -import lombok.Data; - -import javax.persistence.*; -import java.time.LocalDateTime; - -@Data -@Entity -@Table(name = "ingoing") -public class Ingoing { - - @Id - @GeneratedValue(strategy = GenerationType.IDENTITY) - @Column(name = "ingoing_id") - private Long id; - - @Column(nullable = false) - private LocalDateTime date; - @Column(nullable = false) - private double amount; - @Column(nullable = false) - private double tax; - @Column(nullable = true) - private String description; - - @OneToOne(mappedBy = "ingoing") - private Outgoing outgoing; - - @ManyToOne(cascade = CascadeType.ALL) - @JoinTable( - name = "user", - joinColumns = @JoinColumn(name = "user_id"), - inverseJoinColumns = @JoinColumn(name = "user_id", insertable = false, updatable = false) - ) - private User receiver; -} diff --git a/src/main/java/com/openclassrooms/moneytransfersystem/model/Transfer.java b/src/main/java/com/openclassrooms/moneytransfersystem/model/Transfer.java index 119800f..1de4f86 100644 --- a/src/main/java/com/openclassrooms/moneytransfersystem/model/Transfer.java +++ b/src/main/java/com/openclassrooms/moneytransfersystem/model/Transfer.java @@ -2,13 +2,36 @@ import lombok.Data; +import javax.persistence.*; import java.time.LocalDateTime; @Data +@Entity +@Table(name = "ingoing") public class Transfer { - LocalDateTime date; - String relation; - String description; - String amount; + @Id + @GeneratedValue(strategy = GenerationType.IDENTITY) + @Column(name = "ingoing_id") + private Long id; + + @Column(nullable = false) + private LocalDateTime date; + @Column(nullable = false) + private double amount; + @Column(nullable = false) + private double tax; + @Column(nullable = true) + private String description; + + @OneToOne(mappedBy = "ingoing") + private Outgoing outgoing; + + @ManyToOne(cascade = CascadeType.ALL) + @JoinTable( + name = "user", + joinColumns = @JoinColumn(name = "user_id"), + inverseJoinColumns = @JoinColumn(name = "user_id", insertable = false, updatable = false) + ) + private User receiver; } diff --git a/src/main/java/com/openclassrooms/moneytransfersystem/model/TransferView.java b/src/main/java/com/openclassrooms/moneytransfersystem/model/TransferView.java new file mode 100644 index 0000000..22886db --- /dev/null +++ b/src/main/java/com/openclassrooms/moneytransfersystem/model/TransferView.java @@ -0,0 +1,14 @@ +package com.openclassrooms.moneytransfersystem.model; + +import lombok.Data; + +import java.time.LocalDateTime; + +@Data +public class TransferView { + + LocalDateTime date; + String relation; + String description; + String amount; +} diff --git a/src/main/java/com/openclassrooms/moneytransfersystem/model/User.java b/src/main/java/com/openclassrooms/moneytransfersystem/model/User.java index 89af7ad..22761d2 100644 --- a/src/main/java/com/openclassrooms/moneytransfersystem/model/User.java +++ b/src/main/java/com/openclassrooms/moneytransfersystem/model/User.java @@ -1,9 +1,6 @@ package com.openclassrooms.moneytransfersystem.model; -import lombok.AllArgsConstructor; -import lombok.Builder; import lombok.Data; -import lombok.NoArgsConstructor; import javax.persistence.*; import java.util.Collection; @@ -36,7 +33,7 @@ public class User { private String friendsList; @OneToMany(mappedBy = "sender") - private Collection ingoingTransfers; + private Collection transferTransfers; @OneToMany(mappedBy = "receiver") private Collection outgoingTransfers; From 844d414e75c10fa9314ad1d2cde389ef6b97ac97 Mon Sep 17 00:00:00 2001 From: David Date: Mon, 30 Aug 2021 14:18:18 +0200 Subject: [PATCH 081/208] build(model): update User --- .../moneytransfersystem/model/Transfer.java | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/src/main/java/com/openclassrooms/moneytransfersystem/model/Transfer.java b/src/main/java/com/openclassrooms/moneytransfersystem/model/Transfer.java index 1de4f86..0127a70 100644 --- a/src/main/java/com/openclassrooms/moneytransfersystem/model/Transfer.java +++ b/src/main/java/com/openclassrooms/moneytransfersystem/model/Transfer.java @@ -7,12 +7,12 @@ @Data @Entity -@Table(name = "ingoing") +@Table(name = "transfer") public class Transfer { @Id @GeneratedValue(strategy = GenerationType.IDENTITY) - @Column(name = "ingoing_id") + @Column(name = "transfer_id") private Long id; @Column(nullable = false) @@ -24,14 +24,11 @@ public class Transfer { @Column(nullable = true) private String description; - @OneToOne(mappedBy = "ingoing") - private Outgoing outgoing; - @ManyToOne(cascade = CascadeType.ALL) @JoinTable( name = "user", joinColumns = @JoinColumn(name = "user_id"), inverseJoinColumns = @JoinColumn(name = "user_id", insertable = false, updatable = false) ) - private User receiver; + private User user; } From 3f6750194443b255401fa2c493734a436b5c8150 Mon Sep 17 00:00:00 2001 From: David Date: Mon, 30 Aug 2021 14:18:38 +0200 Subject: [PATCH 082/208] build(model): update User --- .../com/openclassrooms/moneytransfersystem/model/User.java | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/main/java/com/openclassrooms/moneytransfersystem/model/User.java b/src/main/java/com/openclassrooms/moneytransfersystem/model/User.java index 22761d2..5f2ad6b 100644 --- a/src/main/java/com/openclassrooms/moneytransfersystem/model/User.java +++ b/src/main/java/com/openclassrooms/moneytransfersystem/model/User.java @@ -32,9 +32,6 @@ public class User { private String friendsList; - @OneToMany(mappedBy = "sender") - private Collection transferTransfers; - - @OneToMany(mappedBy = "receiver") - private Collection outgoingTransfers; + @OneToMany(mappedBy = "user") + private Collection transfers; } From 64ef414a9df6b9b64c696668b53eadb6f2294e2a Mon Sep 17 00:00:00 2001 From: David Date: Mon, 30 Aug 2021 14:21:31 +0200 Subject: [PATCH 083/208] build(model): update Transfer model --- .../openclassrooms/moneytransfersystem/model/Transfer.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/main/java/com/openclassrooms/moneytransfersystem/model/Transfer.java b/src/main/java/com/openclassrooms/moneytransfersystem/model/Transfer.java index 0127a70..6ace796 100644 --- a/src/main/java/com/openclassrooms/moneytransfersystem/model/Transfer.java +++ b/src/main/java/com/openclassrooms/moneytransfersystem/model/Transfer.java @@ -24,6 +24,10 @@ public class Transfer { @Column(nullable = true) private String description; + @OneToOne(cascade = CascadeType.ALL) + @JoinColumn(name = "user_id") + private Type type; + @ManyToOne(cascade = CascadeType.ALL) @JoinTable( name = "user", From 6dd223c646797604d552830a92f8031e05ba1cb6 Mon Sep 17 00:00:00 2001 From: David Date: Mon, 30 Aug 2021 14:22:17 +0200 Subject: [PATCH 084/208] build(model): add Type model --- .../moneytransfersystem/model/Type.java | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 src/main/java/com/openclassrooms/moneytransfersystem/model/Type.java diff --git a/src/main/java/com/openclassrooms/moneytransfersystem/model/Type.java b/src/main/java/com/openclassrooms/moneytransfersystem/model/Type.java new file mode 100644 index 0000000..f9c6452 --- /dev/null +++ b/src/main/java/com/openclassrooms/moneytransfersystem/model/Type.java @@ -0,0 +1,14 @@ +package com.openclassrooms.moneytransfersystem.model; + +import lombok.Data; + +import javax.persistence.Entity; +import javax.persistence.Table; + +@Data +@Entity +@Table(name = "type") +public class Type { + + +} From 5e58e4a45db5a166ac0234312175f32258403830 Mon Sep 17 00:00:00 2001 From: David Date: Mon, 30 Aug 2021 14:23:30 +0200 Subject: [PATCH 085/208] build(model): update Type model --- .../moneytransfersystem/model/Type.java | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/main/java/com/openclassrooms/moneytransfersystem/model/Type.java b/src/main/java/com/openclassrooms/moneytransfersystem/model/Type.java index f9c6452..f79f045 100644 --- a/src/main/java/com/openclassrooms/moneytransfersystem/model/Type.java +++ b/src/main/java/com/openclassrooms/moneytransfersystem/model/Type.java @@ -2,13 +2,18 @@ import lombok.Data; -import javax.persistence.Entity; -import javax.persistence.Table; +import javax.persistence.*; @Data @Entity @Table(name = "type") public class Type { - + @Id + @GeneratedValue(strategy = GenerationType.IDENTITY) + @Column(name = "type_id") + private Long id; + + @Column(nullable = false) + private String name; } From e0a359a96bc1f5416aaa974c5c5e82e11df04fe4 Mon Sep 17 00:00:00 2001 From: David Date: Mon, 30 Aug 2021 14:25:22 +0200 Subject: [PATCH 086/208] build(model): update Type model --- .../com/openclassrooms/moneytransfersystem/model/Type.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/main/java/com/openclassrooms/moneytransfersystem/model/Type.java b/src/main/java/com/openclassrooms/moneytransfersystem/model/Type.java index f79f045..3d61500 100644 --- a/src/main/java/com/openclassrooms/moneytransfersystem/model/Type.java +++ b/src/main/java/com/openclassrooms/moneytransfersystem/model/Type.java @@ -16,4 +16,7 @@ public class Type { @Column(nullable = false) private String name; + + @OneToOne(mappedBy = "type") + private Transfer transfer; } From cb7b543852e717bf5c11b09bd9af1559148f7f70 Mon Sep 17 00:00:00 2001 From: David Date: Mon, 30 Aug 2021 14:27:18 +0200 Subject: [PATCH 087/208] build(model): update Transfer model --- .../moneytransfersystem/model/Transfer.java | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/main/java/com/openclassrooms/moneytransfersystem/model/Transfer.java b/src/main/java/com/openclassrooms/moneytransfersystem/model/Transfer.java index 6ace796..28846a2 100644 --- a/src/main/java/com/openclassrooms/moneytransfersystem/model/Transfer.java +++ b/src/main/java/com/openclassrooms/moneytransfersystem/model/Transfer.java @@ -19,15 +19,17 @@ public class Transfer { private LocalDateTime date; @Column(nullable = false) private double amount; - @Column(nullable = false) - private double tax; @Column(nullable = true) private String description; @OneToOne(cascade = CascadeType.ALL) - @JoinColumn(name = "user_id") + @JoinColumn(name = "type") private Type type; + @OneToOne(cascade = CascadeType.ALL) + @JoinColumn(name = "tax") + private Tax tax; + @ManyToOne(cascade = CascadeType.ALL) @JoinTable( name = "user", From b2e40488b3fd190e0b820d5941501a1b46b0959b Mon Sep 17 00:00:00 2001 From: David Date: Mon, 30 Aug 2021 14:28:07 +0200 Subject: [PATCH 088/208] build(model): update Tax model --- .../java/com/openclassrooms/moneytransfersystem/model/Tax.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/main/java/com/openclassrooms/moneytransfersystem/model/Tax.java b/src/main/java/com/openclassrooms/moneytransfersystem/model/Tax.java index 4b15bad..e6cc49b 100644 --- a/src/main/java/com/openclassrooms/moneytransfersystem/model/Tax.java +++ b/src/main/java/com/openclassrooms/moneytransfersystem/model/Tax.java @@ -18,4 +18,7 @@ public class Tax { private String name; @Column(nullable = false) private double rate; + + @OneToOne(mappedBy = "tax") + private Transfer transfer; } From 9fbaea21f4c5afffcd88af08fd54e71aa688558d Mon Sep 17 00:00:00 2001 From: David Date: Mon, 30 Aug 2021 14:40:47 +0200 Subject: [PATCH 089/208] feat(controller): update LoginController --- .../controller/LoginController.java | 22 ++++++------------- 1 file changed, 7 insertions(+), 15 deletions(-) diff --git a/src/main/java/com/openclassrooms/moneytransfersystem/controller/LoginController.java b/src/main/java/com/openclassrooms/moneytransfersystem/controller/LoginController.java index 1e19ccb..d0e2e7d 100644 --- a/src/main/java/com/openclassrooms/moneytransfersystem/controller/LoginController.java +++ b/src/main/java/com/openclassrooms/moneytransfersystem/controller/LoginController.java @@ -67,27 +67,19 @@ public String listTransfers(Model model) { model.addAttribute("balance", balance); List listTransfers = new ArrayList<>(); - user.getTransferTransfers().stream() + user.getTransfers().stream() .forEach( i -> { TransferView transfer = new TransferView(); transfer.setDate(i.getDate()); transfer.setRelation( - outgoingRepository.findByIngoing(i.getId()).getFirstName() + transferRepository.findById(i.getId() + 1).getFirstName() ); transfer.setDescription(i.getDescription()); - transfer.setAmount(String.valueOf("+" + i.getAmount())); - listTransfers.add(transfer); - }); - - user.getOutgoingTransfers().stream() - .forEach( o -> { - TransferView transfer = new TransferView(); - transfer.setDate(o.getDate()); - transfer.setRelation( - ingoingRepository.findByOutgoing(o.getId()).getFirstName() - ); - transfer.setDescription(o.getDescription()); - transfer.setAmount(String.valueOf("-" + o.getAmount())); + String prefix = "+"; + if (i.getType() == "OUT") { + prefix = "-"; + } + transfer.setAmount(String.valueOf(prefix + i.getAmount())); listTransfers.add(transfer); }); From 2ecb97de0f99358660151d9d152410a68cedf18c Mon Sep 17 00:00:00 2001 From: David Date: Mon, 30 Aug 2021 14:41:27 +0200 Subject: [PATCH 090/208] build(repo): rename IngoingRepository to TransferRepository --- .../moneytransfersystem/controller/LoginController.java | 4 ++-- .../dao/{IngoingRepository.java => TransferRepository.java} | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) rename src/main/java/com/openclassrooms/moneytransfersystem/dao/{IngoingRepository.java => TransferRepository.java} (85%) diff --git a/src/main/java/com/openclassrooms/moneytransfersystem/controller/LoginController.java b/src/main/java/com/openclassrooms/moneytransfersystem/controller/LoginController.java index d0e2e7d..7c863b5 100644 --- a/src/main/java/com/openclassrooms/moneytransfersystem/controller/LoginController.java +++ b/src/main/java/com/openclassrooms/moneytransfersystem/controller/LoginController.java @@ -1,6 +1,6 @@ package com.openclassrooms.moneytransfersystem.controller; -import com.openclassrooms.moneytransfersystem.dao.IngoingRepository; +import com.openclassrooms.moneytransfersystem.dao.TransferRepository; import com.openclassrooms.moneytransfersystem.dao.OutgoingRepository; import com.openclassrooms.moneytransfersystem.model.*; import com.openclassrooms.moneytransfersystem.service.user.UserCreationService; @@ -26,7 +26,7 @@ public class LoginController { private UserReadService userReadService; @Autowired - private IngoingRepository ingoingRepository; + private TransferRepository transferRepository; @Autowired private OutgoingRepository outgoingRepository; diff --git a/src/main/java/com/openclassrooms/moneytransfersystem/dao/IngoingRepository.java b/src/main/java/com/openclassrooms/moneytransfersystem/dao/TransferRepository.java similarity index 85% rename from src/main/java/com/openclassrooms/moneytransfersystem/dao/IngoingRepository.java rename to src/main/java/com/openclassrooms/moneytransfersystem/dao/TransferRepository.java index 8126386..728f618 100644 --- a/src/main/java/com/openclassrooms/moneytransfersystem/dao/IngoingRepository.java +++ b/src/main/java/com/openclassrooms/moneytransfersystem/dao/TransferRepository.java @@ -7,7 +7,7 @@ import org.springframework.stereotype.Repository; @Repository -public interface IngoingRepository extends JpaRepository { +public interface TransferRepository extends JpaRepository { @Query("SELECT u FROM Outgoing u WHERE u.ingoing.id = ?1") User findByOutgoing(Long outgoingId); From ae46f3c161f5e481c7d404e63c478c68a16ea692 Mon Sep 17 00:00:00 2001 From: David Date: Mon, 30 Aug 2021 14:42:39 +0200 Subject: [PATCH 091/208] feat(controller): update LoginController --- .../moneytransfersystem/controller/LoginController.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/openclassrooms/moneytransfersystem/controller/LoginController.java b/src/main/java/com/openclassrooms/moneytransfersystem/controller/LoginController.java index 7c863b5..0397067 100644 --- a/src/main/java/com/openclassrooms/moneytransfersystem/controller/LoginController.java +++ b/src/main/java/com/openclassrooms/moneytransfersystem/controller/LoginController.java @@ -72,11 +72,11 @@ public String listTransfers(Model model) { TransferView transfer = new TransferView(); transfer.setDate(i.getDate()); transfer.setRelation( - transferRepository.findById(i.getId() + 1).getFirstName() + transferRepository.findById(i.getId() + 1).get().getUser().getFirstName() ); transfer.setDescription(i.getDescription()); String prefix = "+"; - if (i.getType() == "OUT") { + if (i.getType().equals("OUT")) { prefix = "-"; } transfer.setAmount(String.valueOf(prefix + i.getAmount())); From 2ec877b3429dd8aa9a95ab30ed4c0a9dffd3ef56 Mon Sep 17 00:00:00 2001 From: David Date: Mon, 30 Aug 2021 14:43:23 +0200 Subject: [PATCH 092/208] feat(controller): update LoginController --- .../moneytransfersystem/controller/LoginController.java | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/main/java/com/openclassrooms/moneytransfersystem/controller/LoginController.java b/src/main/java/com/openclassrooms/moneytransfersystem/controller/LoginController.java index 0397067..5f65147 100644 --- a/src/main/java/com/openclassrooms/moneytransfersystem/controller/LoginController.java +++ b/src/main/java/com/openclassrooms/moneytransfersystem/controller/LoginController.java @@ -1,7 +1,6 @@ package com.openclassrooms.moneytransfersystem.controller; import com.openclassrooms.moneytransfersystem.dao.TransferRepository; -import com.openclassrooms.moneytransfersystem.dao.OutgoingRepository; import com.openclassrooms.moneytransfersystem.model.*; import com.openclassrooms.moneytransfersystem.service.user.UserCreationService; import com.openclassrooms.moneytransfersystem.service.user.UserReadService; @@ -28,9 +27,6 @@ public class LoginController { @Autowired private TransferRepository transferRepository; - @Autowired - private OutgoingRepository outgoingRepository; - @GetMapping("") public String viewHomePage() { From 2fa2cbebf9e6ee34aafb8fabdffb2ceed29bb284 Mon Sep 17 00:00:00 2001 From: David Date: Mon, 30 Aug 2021 14:56:15 +0200 Subject: [PATCH 093/208] build(model): update Transfer model --- .../moneytransfersystem/dao/TransferRepository.java | 3 +-- .../openclassrooms/moneytransfersystem/model/Transfer.java | 6 +----- 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/src/main/java/com/openclassrooms/moneytransfersystem/dao/TransferRepository.java b/src/main/java/com/openclassrooms/moneytransfersystem/dao/TransferRepository.java index 728f618..db7106b 100644 --- a/src/main/java/com/openclassrooms/moneytransfersystem/dao/TransferRepository.java +++ b/src/main/java/com/openclassrooms/moneytransfersystem/dao/TransferRepository.java @@ -9,6 +9,5 @@ @Repository public interface TransferRepository extends JpaRepository { - @Query("SELECT u FROM Outgoing u WHERE u.ingoing.id = ?1") - User findByOutgoing(Long outgoingId); + } diff --git a/src/main/java/com/openclassrooms/moneytransfersystem/model/Transfer.java b/src/main/java/com/openclassrooms/moneytransfersystem/model/Transfer.java index 28846a2..27daf54 100644 --- a/src/main/java/com/openclassrooms/moneytransfersystem/model/Transfer.java +++ b/src/main/java/com/openclassrooms/moneytransfersystem/model/Transfer.java @@ -31,10 +31,6 @@ public class Transfer { private Tax tax; @ManyToOne(cascade = CascadeType.ALL) - @JoinTable( - name = "user", - joinColumns = @JoinColumn(name = "user_id"), - inverseJoinColumns = @JoinColumn(name = "user_id", insertable = false, updatable = false) - ) + @JoinColumn(name="user_id",referencedColumnName="user_id", insertable=false, updatable=false) private User user; } From ac425bfc39e30084bfe0797154e6832897d0efb0 Mon Sep 17 00:00:00 2001 From: David Date: Mon, 30 Aug 2021 14:59:09 +0200 Subject: [PATCH 094/208] build(repo): add TaxRepository --- .../moneytransfersystem/dao/TaxRepository.java | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 src/main/java/com/openclassrooms/moneytransfersystem/dao/TaxRepository.java diff --git a/src/main/java/com/openclassrooms/moneytransfersystem/dao/TaxRepository.java b/src/main/java/com/openclassrooms/moneytransfersystem/dao/TaxRepository.java new file mode 100644 index 0000000..5213319 --- /dev/null +++ b/src/main/java/com/openclassrooms/moneytransfersystem/dao/TaxRepository.java @@ -0,0 +1,9 @@ +package com.openclassrooms.moneytransfersystem.dao; + +import org.springframework.stereotype.Repository; + +@Repository +public interface TaxRepository { + + +} From d780f2d0f774db12f7698738f59add410767ba04 Mon Sep 17 00:00:00 2001 From: David Date: Mon, 30 Aug 2021 14:59:52 +0200 Subject: [PATCH 095/208] build(repo): add TypeRepository --- .../moneytransfersystem/dao/TaxRepository.java | 6 ++++-- .../moneytransfersystem/dao/TypeRepository.java | 9 +++++++++ 2 files changed, 13 insertions(+), 2 deletions(-) create mode 100644 src/main/java/com/openclassrooms/moneytransfersystem/dao/TypeRepository.java diff --git a/src/main/java/com/openclassrooms/moneytransfersystem/dao/TaxRepository.java b/src/main/java/com/openclassrooms/moneytransfersystem/dao/TaxRepository.java index 5213319..ccb4fa3 100644 --- a/src/main/java/com/openclassrooms/moneytransfersystem/dao/TaxRepository.java +++ b/src/main/java/com/openclassrooms/moneytransfersystem/dao/TaxRepository.java @@ -1,9 +1,11 @@ package com.openclassrooms.moneytransfersystem.dao; +import com.openclassrooms.moneytransfersystem.model.Transfer; +import org.springframework.data.jpa.repository.JpaRepository; import org.springframework.stereotype.Repository; @Repository -public interface TaxRepository { +public interface TaxRepository extends JpaRepository { + - } diff --git a/src/main/java/com/openclassrooms/moneytransfersystem/dao/TypeRepository.java b/src/main/java/com/openclassrooms/moneytransfersystem/dao/TypeRepository.java new file mode 100644 index 0000000..cbc4827 --- /dev/null +++ b/src/main/java/com/openclassrooms/moneytransfersystem/dao/TypeRepository.java @@ -0,0 +1,9 @@ +package com.openclassrooms.moneytransfersystem.dao; + +import com.openclassrooms.moneytransfersystem.model.Transfer; +import org.springframework.data.jpa.repository.JpaRepository; +import org.springframework.stereotype.Repository; + +@Repository +public interface TypeRepository extends JpaRepository { +} From 7b6d9a7c2ce42c2debd8fb7928c75c819fe46db0 Mon Sep 17 00:00:00 2001 From: David Date: Mon, 30 Aug 2021 15:03:30 +0200 Subject: [PATCH 096/208] feat(controller): fix AmbiguousMappingException --- .../moneytransfersystem/controller/UserController.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/com/openclassrooms/moneytransfersystem/controller/UserController.java b/src/main/java/com/openclassrooms/moneytransfersystem/controller/UserController.java index b82cf01..3885e14 100644 --- a/src/main/java/com/openclassrooms/moneytransfersystem/controller/UserController.java +++ b/src/main/java/com/openclassrooms/moneytransfersystem/controller/UserController.java @@ -43,7 +43,7 @@ public User readUserById(@PathVariable Long id) { return userReadService.readUserById(id); } - @GetMapping("/users") + @GetMapping("/user") public User readUserByEmail(@RequestParam String email) { return userReadService.readUserByEmail(email); From 528bb9fd57fde4d88119559798f28526eb7baa4e Mon Sep 17 00:00:00 2001 From: David Date: Mon, 30 Aug 2021 15:24:07 +0200 Subject: [PATCH 097/208] feat(front): add BootStrap --- pom.xml | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/pom.xml b/pom.xml index 552dc3d..8900f79 100644 --- a/pom.xml +++ b/pom.xml @@ -34,6 +34,20 @@ spring-boot-starter-web + + org.springframework.boot + spring-boot-starter-thymeleaf + + + org.webjars + jquery + 3.4.1 + + + org.webjars + bootstrap + 4.3.1 + mysql mysql-connector-java From 6e48d083c75265c76648dc62f736ed95993a863c Mon Sep 17 00:00:00 2001 From: David Date: Mon, 30 Aug 2021 15:58:06 +0200 Subject: [PATCH 098/208] feat(controller): update LoginController --- .../controller/LoginController.java | 24 ++++++++++++------- .../moneytransfersystem/model/Tax.java | 3 --- .../moneytransfersystem/model/Transfer.java | 9 ++----- .../moneytransfersystem/model/Type.java | 3 --- 4 files changed, 17 insertions(+), 22 deletions(-) diff --git a/src/main/java/com/openclassrooms/moneytransfersystem/controller/LoginController.java b/src/main/java/com/openclassrooms/moneytransfersystem/controller/LoginController.java index 5f65147..7d7ae83 100644 --- a/src/main/java/com/openclassrooms/moneytransfersystem/controller/LoginController.java +++ b/src/main/java/com/openclassrooms/moneytransfersystem/controller/LoginController.java @@ -64,18 +64,24 @@ public String listTransfers(Model model) { List listTransfers = new ArrayList<>(); user.getTransfers().stream() - .forEach( i -> { + .forEach( t -> { TransferView transfer = new TransferView(); - transfer.setDate(i.getDate()); - transfer.setRelation( - transferRepository.findById(i.getId() + 1).get().getUser().getFirstName() - ); - transfer.setDescription(i.getDescription()); - String prefix = "+"; - if (i.getType().equals("OUT")) { + String prefix; + if (t.getType().equals("OUT")) { prefix = "-"; + transfer.setRelation( + transferRepository.findById(t.getId() + 1).get().getUser().getFirstName() + ); + } else { + prefix = "+"; + transfer.setRelation( + transferRepository.findById(t.getId() - 1).get().getUser().getFirstName() + ); } - transfer.setAmount(String.valueOf(prefix + i.getAmount())); + transfer.setDate(t.getDate()); + + transfer.setDescription(t.getDescription()); + transfer.setAmount(String.valueOf(prefix + t.getAmount())); listTransfers.add(transfer); }); diff --git a/src/main/java/com/openclassrooms/moneytransfersystem/model/Tax.java b/src/main/java/com/openclassrooms/moneytransfersystem/model/Tax.java index e6cc49b..4b15bad 100644 --- a/src/main/java/com/openclassrooms/moneytransfersystem/model/Tax.java +++ b/src/main/java/com/openclassrooms/moneytransfersystem/model/Tax.java @@ -18,7 +18,4 @@ public class Tax { private String name; @Column(nullable = false) private double rate; - - @OneToOne(mappedBy = "tax") - private Transfer transfer; } diff --git a/src/main/java/com/openclassrooms/moneytransfersystem/model/Transfer.java b/src/main/java/com/openclassrooms/moneytransfersystem/model/Transfer.java index 27daf54..1bbd6e2 100644 --- a/src/main/java/com/openclassrooms/moneytransfersystem/model/Transfer.java +++ b/src/main/java/com/openclassrooms/moneytransfersystem/model/Transfer.java @@ -22,13 +22,8 @@ public class Transfer { @Column(nullable = true) private String description; - @OneToOne(cascade = CascadeType.ALL) - @JoinColumn(name = "type") - private Type type; - - @OneToOne(cascade = CascadeType.ALL) - @JoinColumn(name = "tax") - private Tax tax; + @JoinColumn(name = "type", insertable=false, updatable=false) + private String type; @ManyToOne(cascade = CascadeType.ALL) @JoinColumn(name="user_id",referencedColumnName="user_id", insertable=false, updatable=false) diff --git a/src/main/java/com/openclassrooms/moneytransfersystem/model/Type.java b/src/main/java/com/openclassrooms/moneytransfersystem/model/Type.java index 3d61500..f79f045 100644 --- a/src/main/java/com/openclassrooms/moneytransfersystem/model/Type.java +++ b/src/main/java/com/openclassrooms/moneytransfersystem/model/Type.java @@ -16,7 +16,4 @@ public class Type { @Column(nullable = false) private String name; - - @OneToOne(mappedBy = "type") - private Transfer transfer; } From 355c79e107b0cca193dbdd370d397c515c374fe1 Mon Sep 17 00:00:00 2001 From: David Date: Mon, 30 Aug 2021 16:00:08 +0200 Subject: [PATCH 099/208] feat(front): fix BootStrap --- pom.xml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pom.xml b/pom.xml index 8900f79..d257d3c 100644 --- a/pom.xml +++ b/pom.xml @@ -48,6 +48,10 @@ bootstrap 4.3.1 + + org.webjars + webjars-locator-core + mysql mysql-connector-java From ebb32257ff559dc77cca99e54074b7a0bd57a213 Mon Sep 17 00:00:00 2001 From: David Date: Mon, 30 Aug 2021 16:02:13 +0200 Subject: [PATCH 100/208] feat(controller): update app home page --- src/main/resources/templates/app.html | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/resources/templates/app.html b/src/main/resources/templates/app.html index 31f5f72..1edb402 100644 --- a/src/main/resources/templates/app.html +++ b/src/main/resources/templates/app.html @@ -27,15 +27,15 @@

Liste de transferts

- - + + - + From 126e5ac573d36e228819b14f50a162e2999b81b1 Mon Sep 17 00:00:00 2001 From: David Date: Mon, 30 Aug 2021 16:19:26 +0200 Subject: [PATCH 101/208] feat(front): update home page --- src/main/resources/static/images/logo.png | Bin 0 -> 21912 bytes src/main/resources/templates/app.html | 11 +++++++---- 2 files changed, 7 insertions(+), 4 deletions(-) create mode 100644 src/main/resources/static/images/logo.png diff --git a/src/main/resources/static/images/logo.png b/src/main/resources/static/images/logo.png new file mode 100644 index 0000000000000000000000000000000000000000..ab7f4b4f5627dcf7093c0b8c54077799aff57287 GIT binary patch literal 21912 zcmaHS1yo$k@@H^&2yTN*aCc|$V1Wc@aCevB?hqij2bbU)f(H-o?lQQ`4&Qt4zkANU z-8pBPdz-52vcBE7>o*Y}m1WV8iICsDdxs_mlu~>54l4fbiwF$h%J0L4EfF4n?;e<`J{^pQf+-pQ1L zhlT9}h>eYhf|s9#orjB;o0FM>gN=iom5qayo%;h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UN|RD$ZgY*{&80gFh<^(`W< zQ$h1Uuin~wb_Z)C;rlTuVMR0-Om$hnxGNNCt94Qgo;&Y0H2H)%+dEdop@T_y`cQ4$ zP<*aM%!b3e{v=j@-A_|*gbd)f0HT_PN_UL8`0C9)8EGSL=$P&gh}%x04MiJ?dlrs< gN2Mg|B8ZrYC`!SKk$rVKkieCysiq4nQ+XWxKb*5NSpWb4 literal 0 HcmV?d00001 diff --git a/src/main/resources/templates/app.html b/src/main/resources/templates/app.html index 1edb402..e595f94 100644 --- a/src/main/resources/templates/app.html +++ b/src/main/resources/templates/app.html @@ -9,6 +9,9 @@
+
+ logo +

@@ -27,10 +30,10 @@

Liste de transferts

ID de Transfert DateBénéficaireRelationDescription MontantTaxe
Date Relation Description Montant
- - - - + + + + From 53d411414fdda0fa457e4c5b8de0ca1c0c702572 Mon Sep 17 00:00:00 2001 From: David Date: Mon, 30 Aug 2021 16:21:54 +0200 Subject: [PATCH 102/208] build(data): update database structure --- src/main/resources/data.sql | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/src/main/resources/data.sql b/src/main/resources/data.sql index bb9da0c..15e35b5 100644 --- a/src/main/resources/data.sql +++ b/src/main/resources/data.sql @@ -23,12 +23,12 @@ DROP TABLE IF EXISTS `tax`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!50503 SET character_set_client = utf8mb4 */; CREATE TABLE `tax` ( - `tax_id` int(10) unsigned NOT NULL, + `tax_id` int(10) unsigned NOT NULL AUTO_INCREMENT, `name` varchar(35) NOT NULL, `rate` decimal(10,2) NOT NULL, PRIMARY KEY (`tax_id`), UNIQUE KEY `name` (`name`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; +) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -37,6 +37,7 @@ CREATE TABLE `tax` ( LOCK TABLES `tax` WRITE; /*!40000 ALTER TABLE `tax` DISABLE KEYS */; +INSERT INTO `tax` VALUES (1,'DEFAULT',0.05); /*!40000 ALTER TABLE `tax` ENABLE KEYS */; UNLOCK TABLES; @@ -53,14 +54,13 @@ CREATE TABLE `transfer` ( `type` varchar(7) DEFAULT NULL, `date` timestamp NOT NULL, `amount` decimal(10,2) NOT NULL, - `tax` decimal(10,1) NOT NULL, + `tax` decimal(10,2) DEFAULT NULL, `description` varchar(50) DEFAULT NULL, PRIMARY KEY (`transfer_id`), KEY `user_id` (`user_id`), KEY `type` (`type`), - CONSTRAINT `transfer_ibfk_1` FOREIGN KEY (`user_id`) REFERENCES `user` (`user_id`) ON DELETE SET NULL ON UPDATE CASCADE, - CONSTRAINT `transfer_ibfk_2` FOREIGN KEY (`type`) REFERENCES `type` (`name`) ON DELETE SET NULL ON UPDATE CASCADE -) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; + CONSTRAINT `transfer_ibfk_1` FOREIGN KEY (`user_id`) REFERENCES `user` (`user_id`) ON DELETE SET NULL ON UPDATE CASCADE +) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -69,6 +69,7 @@ CREATE TABLE `transfer` ( LOCK TABLES `transfer` WRITE; /*!40000 ALTER TABLE `transfer` DISABLE KEYS */; +INSERT INTO `transfer` VALUES (2,16,'OUT','2021-08-30 13:33:34',20.00,0.05,'Remboursement pour le cinéma'),(3,17,'IN','2021-08-30 13:34:00',20.00,0.05,'Remboursement pour le cinéma'); /*!40000 ALTER TABLE `transfer` ENABLE KEYS */; UNLOCK TABLES; @@ -84,7 +85,7 @@ CREATE TABLE `type` ( `name` varchar(7) DEFAULT NULL, PRIMARY KEY (`type_id`), UNIQUE KEY `name` (`name`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; +) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -93,6 +94,7 @@ CREATE TABLE `type` ( LOCK TABLES `type` WRITE; /*!40000 ALTER TABLE `type` DISABLE KEYS */; +INSERT INTO `type` VALUES (1,'IN'),(2,'OUT'); /*!40000 ALTER TABLE `type` ENABLE KEYS */; UNLOCK TABLES; @@ -115,7 +117,7 @@ CREATE TABLE `user` ( `friends_list` json DEFAULT NULL, PRIMARY KEY (`user_id`), UNIQUE KEY `email` (`email`) -) ENGINE=InnoDB AUTO_INCREMENT=16 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; +) ENGINE=InnoDB AUTO_INCREMENT=18 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -124,6 +126,7 @@ CREATE TABLE `user` ( LOCK TABLES `user` WRITE; /*!40000 ALTER TABLE `user` DISABLE KEYS */; +INSERT INTO `user` VALUES (16,'david@test.com','$2a$10$xl5NeX6b7os9eewSGR3NU.o1mTiJX8tCPy6vapTd1rOThXxXh6qyW','David','Z.',123456,123456,0.00,'[]'),(17,'clement@test.com','$2a$10$9ZDoOv.HZTnNXB8H3rNdm.elhSYzb/.4owCP.iZWevFU83Bmy/WsO','Clément','S.',123456,123456,0.00,'[]'); /*!40000 ALTER TABLE `user` ENABLE KEYS */; UNLOCK TABLES; /*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */; @@ -136,4 +139,4 @@ UNLOCK TABLES; /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; /*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; --- Dump completed on 2021-08-30 14:10:44 +-- Dump completed on 2021-08-30 16:20:08 From ee5e7770b16446829729e27b4fe3be50eb3d95a9 Mon Sep 17 00:00:00 2001 From: David Date: Mon, 30 Aug 2021 16:40:23 +0200 Subject: [PATCH 103/208] feat(balance): add balance back feature --- src/main/resources/templates/app.html | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/main/resources/templates/app.html b/src/main/resources/templates/app.html index e595f94..d4712ca 100644 --- a/src/main/resources/templates/app.html +++ b/src/main/resources/templates/app.html @@ -23,6 +23,13 @@

Solde votre compte : [[${balance}]] €

+
+ + Transfert sur votre compte bancaire : + + + +

Liste de transferts

From cdd2de4a95c7fcc1e2bfb73d43605c60a4daf2ab Mon Sep 17 00:00:00 2001 From: David Date: Mon, 30 Aug 2021 16:45:33 +0200 Subject: [PATCH 104/208] feat(balance): update UserController --- .../moneytransfersystem/controller/UserController.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/main/java/com/openclassrooms/moneytransfersystem/controller/UserController.java b/src/main/java/com/openclassrooms/moneytransfersystem/controller/UserController.java index 3885e14..ed85dab 100644 --- a/src/main/java/com/openclassrooms/moneytransfersystem/controller/UserController.java +++ b/src/main/java/com/openclassrooms/moneytransfersystem/controller/UserController.java @@ -61,6 +61,12 @@ public User updateUser(@RequestBody User user) { return userUpdateService.updateUser(user); } + @PutMapping("/balanceBack/{email}/") + public void balanceBack(@PathVariable String email, @RequestParam int amount) { + + return userUpdateService.getBalanceBack(email, amount); + } + @DeleteMapping("/users/{id}") public void deleteUser(@PathVariable Long id) { From 035423211d362abfd8408d7158a42f6bc700c2a7 Mon Sep 17 00:00:00 2001 From: David Date: Mon, 30 Aug 2021 16:50:07 +0200 Subject: [PATCH 105/208] feat(balance): update UserUpdateService --- .../moneytransfersystem/controller/UserController.java | 2 +- .../service/user/UserUpdateService.java | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/openclassrooms/moneytransfersystem/controller/UserController.java b/src/main/java/com/openclassrooms/moneytransfersystem/controller/UserController.java index ed85dab..0063455 100644 --- a/src/main/java/com/openclassrooms/moneytransfersystem/controller/UserController.java +++ b/src/main/java/com/openclassrooms/moneytransfersystem/controller/UserController.java @@ -64,7 +64,7 @@ public User updateUser(@RequestBody User user) { @PutMapping("/balanceBack/{email}/") public void balanceBack(@PathVariable String email, @RequestParam int amount) { - return userUpdateService.getBalanceBack(email, amount); + userUpdateService.getBalanceBack(email, amount); } @DeleteMapping("/users/{id}") diff --git a/src/main/java/com/openclassrooms/moneytransfersystem/service/user/UserUpdateService.java b/src/main/java/com/openclassrooms/moneytransfersystem/service/user/UserUpdateService.java index 3ecb7df..05bc746 100644 --- a/src/main/java/com/openclassrooms/moneytransfersystem/service/user/UserUpdateService.java +++ b/src/main/java/com/openclassrooms/moneytransfersystem/service/user/UserUpdateService.java @@ -37,4 +37,11 @@ public User updateUser(User user) { return userUpdated; } + + public void getBalanceBack(String email, int amount) { + + User userUpdated = userRepository.findByEmail(email); + userUpdated.setBalance(userUpdated.getBalance() - amount); + userRepository.save(userUpdated); + } } From 8343d4f35be86e5307980943da3a349626356ce6 Mon Sep 17 00:00:00 2001 From: David Date: Mon, 30 Aug 2021 16:55:28 +0200 Subject: [PATCH 106/208] feat(front): add balance back button --- .../moneytransfersystem/controller/UserController.java | 2 +- src/main/resources/templates/app.html | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/java/com/openclassrooms/moneytransfersystem/controller/UserController.java b/src/main/java/com/openclassrooms/moneytransfersystem/controller/UserController.java index 0063455..d1beeca 100644 --- a/src/main/java/com/openclassrooms/moneytransfersystem/controller/UserController.java +++ b/src/main/java/com/openclassrooms/moneytransfersystem/controller/UserController.java @@ -61,7 +61,7 @@ public User updateUser(@RequestBody User user) { return userUpdateService.updateUser(user); } - @PutMapping("/balanceBack/{email}/") + @PutMapping("/balanceBack/{email}") public void balanceBack(@PathVariable String email, @RequestParam int amount) { userUpdateService.getBalanceBack(email, amount); diff --git a/src/main/resources/templates/app.html b/src/main/resources/templates/app.html index d4712ca..8e5a4c2 100644 --- a/src/main/resources/templates/app.html +++ b/src/main/resources/templates/app.html @@ -24,9 +24,9 @@

Solde votre compte : [[${balance}]] €

-
+ Transfert sur votre compte bancaire : - +
From 3d25d4e71cc1cb76fb39b425dc4d8bdb97193b3c Mon Sep 17 00:00:00 2001 From: David Date: Mon, 30 Aug 2021 18:44:47 +0200 Subject: [PATCH 107/208] build(front): update home page --- src/main/resources/templates/app.html | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/resources/templates/app.html b/src/main/resources/templates/app.html index 8e5a4c2..9b14f9c 100644 --- a/src/main/resources/templates/app.html +++ b/src/main/resources/templates/app.html @@ -24,9 +24,9 @@

Solde votre compte : [[${balance}]] €

-
- Transfert sur votre compte bancaire : - + + Transfert sur mon compte bancaire : +
From 62828a545a107835c16adc311c38f656692576dc Mon Sep 17 00:00:00 2001 From: David Date: Tue, 31 Aug 2021 16:21:48 +0200 Subject: [PATCH 108/208] build(model): add TransferBack --- .../controller/LoginController.java | 14 ++++++++++ .../controller/UserController.java | 7 ++--- .../model/TransferBack.java | 9 +++++++ .../service/user/UserUpdateService.java | 27 ++++++++++++++++--- src/main/resources/templates/app.html | 23 +++++++++++----- 5 files changed, 67 insertions(+), 13 deletions(-) create mode 100644 src/main/java/com/openclassrooms/moneytransfersystem/model/TransferBack.java diff --git a/src/main/java/com/openclassrooms/moneytransfersystem/controller/LoginController.java b/src/main/java/com/openclassrooms/moneytransfersystem/controller/LoginController.java index 7d7ae83..48ae43a 100644 --- a/src/main/java/com/openclassrooms/moneytransfersystem/controller/LoginController.java +++ b/src/main/java/com/openclassrooms/moneytransfersystem/controller/LoginController.java @@ -4,6 +4,7 @@ import com.openclassrooms.moneytransfersystem.model.*; import com.openclassrooms.moneytransfersystem.service.user.UserCreationService; import com.openclassrooms.moneytransfersystem.service.user.UserReadService; +import com.openclassrooms.moneytransfersystem.service.user.UserUpdateService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.security.core.Authentication; import org.springframework.security.core.context.SecurityContextHolder; @@ -13,6 +14,7 @@ import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.PostMapping; +import java.time.LocalDateTime; import java.util.*; @Controller @@ -24,6 +26,9 @@ public class LoginController { @Autowired private UserReadService userReadService; + @Autowired + private UserUpdateService userUpdateService; + @Autowired private TransferRepository transferRepository; @@ -54,6 +59,14 @@ public String processRegister(User user) { return "register_success"; } + @PostMapping("/process_balance_back") + public String processRegister(Transfer transfer) { + + userUpdateService.getBalanceBack(transfer); + + return "app"; + } + @GetMapping("/app") public String listTransfers(Model model) { Authentication authentication = SecurityContextHolder.getContext().getAuthentication(); @@ -87,6 +100,7 @@ public String listTransfers(Model model) { Collections.sort(listTransfers, Comparator.comparing(TransferView::getDate)); model.addAttribute("listTransfers", listTransfers); + model.addAttribute("transfer", new Transfer()); return "app"; } diff --git a/src/main/java/com/openclassrooms/moneytransfersystem/controller/UserController.java b/src/main/java/com/openclassrooms/moneytransfersystem/controller/UserController.java index d1beeca..5854e99 100644 --- a/src/main/java/com/openclassrooms/moneytransfersystem/controller/UserController.java +++ b/src/main/java/com/openclassrooms/moneytransfersystem/controller/UserController.java @@ -1,5 +1,6 @@ package com.openclassrooms.moneytransfersystem.controller; +import com.openclassrooms.moneytransfersystem.model.Transfer; import com.openclassrooms.moneytransfersystem.model.User; import com.openclassrooms.moneytransfersystem.service.user.UserCreationService; import com.openclassrooms.moneytransfersystem.service.user.UserDeletionService; @@ -61,10 +62,10 @@ public User updateUser(@RequestBody User user) { return userUpdateService.updateUser(user); } - @PutMapping("/balanceBack/{email}") - public void balanceBack(@PathVariable String email, @RequestParam int amount) { + @PutMapping("/balanceBack") + public void getBalanceBack(@RequestBody Transfer transfer) { - userUpdateService.getBalanceBack(email, amount); + userUpdateService.getBalanceBack(transfer); } @DeleteMapping("/users/{id}") diff --git a/src/main/java/com/openclassrooms/moneytransfersystem/model/TransferBack.java b/src/main/java/com/openclassrooms/moneytransfersystem/model/TransferBack.java new file mode 100644 index 0000000..ada3f41 --- /dev/null +++ b/src/main/java/com/openclassrooms/moneytransfersystem/model/TransferBack.java @@ -0,0 +1,9 @@ +package com.openclassrooms.moneytransfersystem.model; + +import lombok.Data; + +@Data +public class TransferBack { + + +} diff --git a/src/main/java/com/openclassrooms/moneytransfersystem/service/user/UserUpdateService.java b/src/main/java/com/openclassrooms/moneytransfersystem/service/user/UserUpdateService.java index 05bc746..e9a2b80 100644 --- a/src/main/java/com/openclassrooms/moneytransfersystem/service/user/UserUpdateService.java +++ b/src/main/java/com/openclassrooms/moneytransfersystem/service/user/UserUpdateService.java @@ -1,12 +1,15 @@ package com.openclassrooms.moneytransfersystem.service.user; +import com.openclassrooms.moneytransfersystem.dao.TransferRepository; import com.openclassrooms.moneytransfersystem.dao.UserRepository; +import com.openclassrooms.moneytransfersystem.model.Transfer; import com.openclassrooms.moneytransfersystem.model.User; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; +import java.time.LocalDateTime; import java.util.Optional; @Service @@ -15,6 +18,9 @@ public class UserUpdateService { @Autowired private UserRepository userRepository; + @Autowired + private TransferRepository transferRepository; + Logger logger = LoggerFactory.getLogger(UserUpdateService.class); public User updateUser(User user) { @@ -38,10 +44,25 @@ public User updateUser(User user) { return userUpdated; } - public void getBalanceBack(String email, int amount) { + public void getBalanceBack(Transfer transfer) { - User userUpdated = userRepository.findByEmail(email); - userUpdated.setBalance(userUpdated.getBalance() - amount); + // Reduce Balance + User userUpdated = transfer.getUser(); + userUpdated.setBalance(userUpdated.getBalance() - transfer.getAmount()); userRepository.save(userUpdated); + + // IN Transfer + transfer.setDate(LocalDateTime.now()); + transfer.setDescription("Retrait de solde vers compte bancaire"); + transfer.setType("OUT"); + transfer.setId(transfer.getUser().getId()); + transferRepository.save(transfer); + + // OUT Transfer + transfer.setDate(LocalDateTime.now()); + transfer.setDescription("Retrait de solde vers compte bancaire"); + transfer.setType("IN"); + transfer.setId(userRepository.findByEmail("app@test.com").getId()); + transferRepository.save(transfer); } } diff --git a/src/main/resources/templates/app.html b/src/main/resources/templates/app.html index 9b14f9c..6de1579 100644 --- a/src/main/resources/templates/app.html +++ b/src/main/resources/templates/app.html @@ -23,17 +23,26 @@

Solde votre compte : [[${balance}]] €

-
-
- Transfert sur mon compte bancaire : - - + +
+
+ +
+ + +
+
+
+ +
+
-
+

Liste de transferts

-
+
DateRelationDescriptionMontantDateRelationDescriptionMontant
From 779daca499a7c9f0ed0eb9165acacb458e43065d Mon Sep 17 00:00:00 2001 From: David Date: Tue, 31 Aug 2021 16:31:22 +0200 Subject: [PATCH 109/208] build(repo): update Tax Repository --- .../controller/LoginController.java | 4 ++-- .../controller/UserController.java | 5 ++-- .../dao/TaxRepository.java | 8 +++++-- .../moneytransfersystem/model/Transfer.java | 2 ++ .../model/TransferBack.java | 3 ++- .../service/user/UserUpdateService.java | 24 ++++++++++++------- 6 files changed, 30 insertions(+), 16 deletions(-) diff --git a/src/main/java/com/openclassrooms/moneytransfersystem/controller/LoginController.java b/src/main/java/com/openclassrooms/moneytransfersystem/controller/LoginController.java index 48ae43a..420ff5c 100644 --- a/src/main/java/com/openclassrooms/moneytransfersystem/controller/LoginController.java +++ b/src/main/java/com/openclassrooms/moneytransfersystem/controller/LoginController.java @@ -60,9 +60,9 @@ public String processRegister(User user) { } @PostMapping("/process_balance_back") - public String processRegister(Transfer transfer) { + public String processRegister(TransferBack transferBack) { - userUpdateService.getBalanceBack(transfer); + userUpdateService.getBalanceBack(transferBack); return "app"; } diff --git a/src/main/java/com/openclassrooms/moneytransfersystem/controller/UserController.java b/src/main/java/com/openclassrooms/moneytransfersystem/controller/UserController.java index 5854e99..fa9217f 100644 --- a/src/main/java/com/openclassrooms/moneytransfersystem/controller/UserController.java +++ b/src/main/java/com/openclassrooms/moneytransfersystem/controller/UserController.java @@ -1,6 +1,7 @@ package com.openclassrooms.moneytransfersystem.controller; import com.openclassrooms.moneytransfersystem.model.Transfer; +import com.openclassrooms.moneytransfersystem.model.TransferBack; import com.openclassrooms.moneytransfersystem.model.User; import com.openclassrooms.moneytransfersystem.service.user.UserCreationService; import com.openclassrooms.moneytransfersystem.service.user.UserDeletionService; @@ -63,9 +64,9 @@ public User updateUser(@RequestBody User user) { } @PutMapping("/balanceBack") - public void getBalanceBack(@RequestBody Transfer transfer) { + public void getBalanceBack(@RequestBody TransferBack transferBack) { - userUpdateService.getBalanceBack(transfer); + userUpdateService.getBalanceBack(transferBack); } @DeleteMapping("/users/{id}") diff --git a/src/main/java/com/openclassrooms/moneytransfersystem/dao/TaxRepository.java b/src/main/java/com/openclassrooms/moneytransfersystem/dao/TaxRepository.java index ccb4fa3..0bc7dee 100644 --- a/src/main/java/com/openclassrooms/moneytransfersystem/dao/TaxRepository.java +++ b/src/main/java/com/openclassrooms/moneytransfersystem/dao/TaxRepository.java @@ -1,11 +1,15 @@ package com.openclassrooms.moneytransfersystem.dao; +import com.openclassrooms.moneytransfersystem.model.Tax; import com.openclassrooms.moneytransfersystem.model.Transfer; +import com.openclassrooms.moneytransfersystem.model.User; import org.springframework.data.jpa.repository.JpaRepository; +import org.springframework.data.jpa.repository.Query; import org.springframework.stereotype.Repository; @Repository -public interface TaxRepository extends JpaRepository { - +public interface TaxRepository extends JpaRepository { + @Query("SELECT u FROM Tax u WHERE u.name = ?1") + Tax findByName(String name); } diff --git a/src/main/java/com/openclassrooms/moneytransfersystem/model/Transfer.java b/src/main/java/com/openclassrooms/moneytransfersystem/model/Transfer.java index 1bbd6e2..0bd73cf 100644 --- a/src/main/java/com/openclassrooms/moneytransfersystem/model/Transfer.java +++ b/src/main/java/com/openclassrooms/moneytransfersystem/model/Transfer.java @@ -20,6 +20,8 @@ public class Transfer { @Column(nullable = false) private double amount; @Column(nullable = true) + private double tax; + @Column(nullable = true) private String description; @JoinColumn(name = "type", insertable=false, updatable=false) diff --git a/src/main/java/com/openclassrooms/moneytransfersystem/model/TransferBack.java b/src/main/java/com/openclassrooms/moneytransfersystem/model/TransferBack.java index ada3f41..3f696a0 100644 --- a/src/main/java/com/openclassrooms/moneytransfersystem/model/TransferBack.java +++ b/src/main/java/com/openclassrooms/moneytransfersystem/model/TransferBack.java @@ -5,5 +5,6 @@ @Data public class TransferBack { - + String email; + double amount; } diff --git a/src/main/java/com/openclassrooms/moneytransfersystem/service/user/UserUpdateService.java b/src/main/java/com/openclassrooms/moneytransfersystem/service/user/UserUpdateService.java index e9a2b80..fc6012a 100644 --- a/src/main/java/com/openclassrooms/moneytransfersystem/service/user/UserUpdateService.java +++ b/src/main/java/com/openclassrooms/moneytransfersystem/service/user/UserUpdateService.java @@ -1,8 +1,10 @@ package com.openclassrooms.moneytransfersystem.service.user; +import com.openclassrooms.moneytransfersystem.dao.TaxRepository; import com.openclassrooms.moneytransfersystem.dao.TransferRepository; import com.openclassrooms.moneytransfersystem.dao.UserRepository; import com.openclassrooms.moneytransfersystem.model.Transfer; +import com.openclassrooms.moneytransfersystem.model.TransferBack; import com.openclassrooms.moneytransfersystem.model.User; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -21,6 +23,9 @@ public class UserUpdateService { @Autowired private TransferRepository transferRepository; + @Autowired + private TaxRepository taxRepository; + Logger logger = LoggerFactory.getLogger(UserUpdateService.class); public User updateUser(User user) { @@ -44,25 +49,26 @@ public User updateUser(User user) { return userUpdated; } - public void getBalanceBack(Transfer transfer) { + public void getBalanceBack(TransferBack transferBack) { - // Reduce Balance - User userUpdated = transfer.getUser(); - userUpdated.setBalance(userUpdated.getBalance() - transfer.getAmount()); + User userUpdated = userRepository.findByEmail(transferBack.getEmail()); + userUpdated.setBalance(userUpdated.getBalance() - transferBack.getAmount()); userRepository.save(userUpdated); // IN Transfer + Transfer transfer = new Transfer(); + transfer.setId(userUpdated.getId()); transfer.setDate(LocalDateTime.now()); - transfer.setDescription("Retrait de solde vers compte bancaire"); transfer.setType("OUT"); - transfer.setId(transfer.getUser().getId()); + transfer.setAmount(transferBack.getAmount()); + transfer.setTax(taxRepository.findByName("DEFAULT").getRate()); + transfer.setDescription("Retrait de solde vers compte bancaire"); + transferRepository.save(transfer); // OUT Transfer - transfer.setDate(LocalDateTime.now()); - transfer.setDescription("Retrait de solde vers compte bancaire"); - transfer.setType("IN"); transfer.setId(userRepository.findByEmail("app@test.com").getId()); + transfer.setType("IN"); transferRepository.save(transfer); } } From 5f9d1da44dbbba5f8fabd86e13321ea147c2e213 Mon Sep 17 00:00:00 2001 From: David Date: Tue, 31 Aug 2021 17:21:31 +0200 Subject: [PATCH 110/208] feat(front): update home page --- .../moneytransfersystem/controller/LoginController.java | 4 ++-- .../moneytransfersystem/service/user/UserUpdateService.java | 5 ++--- src/main/resources/templates/app.html | 5 +++-- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/main/java/com/openclassrooms/moneytransfersystem/controller/LoginController.java b/src/main/java/com/openclassrooms/moneytransfersystem/controller/LoginController.java index 420ff5c..78cbd48 100644 --- a/src/main/java/com/openclassrooms/moneytransfersystem/controller/LoginController.java +++ b/src/main/java/com/openclassrooms/moneytransfersystem/controller/LoginController.java @@ -64,7 +64,7 @@ public String processRegister(TransferBack transferBack) { userUpdateService.getBalanceBack(transferBack); - return "app"; + return "index"; } @GetMapping("/app") @@ -100,7 +100,7 @@ public String listTransfers(Model model) { Collections.sort(listTransfers, Comparator.comparing(TransferView::getDate)); model.addAttribute("listTransfers", listTransfers); - model.addAttribute("transfer", new Transfer()); + model.addAttribute("transferBack", new TransferBack()); return "app"; } diff --git a/src/main/java/com/openclassrooms/moneytransfersystem/service/user/UserUpdateService.java b/src/main/java/com/openclassrooms/moneytransfersystem/service/user/UserUpdateService.java index fc6012a..26c161d 100644 --- a/src/main/java/com/openclassrooms/moneytransfersystem/service/user/UserUpdateService.java +++ b/src/main/java/com/openclassrooms/moneytransfersystem/service/user/UserUpdateService.java @@ -51,11 +51,12 @@ public User updateUser(User user) { public void getBalanceBack(TransferBack transferBack) { + logger.debug("Transfer back for " + transferBack.getEmail() + ": " + transferBack.getAmount()); + User userUpdated = userRepository.findByEmail(transferBack.getEmail()); userUpdated.setBalance(userUpdated.getBalance() - transferBack.getAmount()); userRepository.save(userUpdated); - // IN Transfer Transfer transfer = new Transfer(); transfer.setId(userUpdated.getId()); transfer.setDate(LocalDateTime.now()); @@ -63,10 +64,8 @@ public void getBalanceBack(TransferBack transferBack) { transfer.setAmount(transferBack.getAmount()); transfer.setTax(taxRepository.findByName("DEFAULT").getRate()); transfer.setDescription("Retrait de solde vers compte bancaire"); - transferRepository.save(transfer); - // OUT Transfer transfer.setId(userRepository.findByEmail("app@test.com").getId()); transfer.setType("IN"); transferRepository.save(transfer); diff --git a/src/main/resources/templates/app.html b/src/main/resources/templates/app.html index 6de1579..4667d20 100644 --- a/src/main/resources/templates/app.html +++ b/src/main/resources/templates/app.html @@ -23,13 +23,14 @@

Solde votre compte : [[${balance}]] €

-
- + +
From 1eedeacc2dfb2723e8e61d00464de1c723cb7031 Mon Sep 17 00:00:00 2001 From: David Date: Wed, 1 Sep 2021 15:31:51 +0200 Subject: [PATCH 111/208] feat(controller): add balance back relation --- .../controller/LoginController.java | 16 ++++- .../moneytransfersystem/model/Transfer.java | 4 +- .../model/TransferBack.java | 2 +- .../service/user/UserUpdateService.java | 62 +++++++++++++------ src/main/resources/templates/app.html | 3 +- 5 files changed, 63 insertions(+), 24 deletions(-) diff --git a/src/main/java/com/openclassrooms/moneytransfersystem/controller/LoginController.java b/src/main/java/com/openclassrooms/moneytransfersystem/controller/LoginController.java index 78cbd48..f3f44b3 100644 --- a/src/main/java/com/openclassrooms/moneytransfersystem/controller/LoginController.java +++ b/src/main/java/com/openclassrooms/moneytransfersystem/controller/LoginController.java @@ -5,6 +5,8 @@ import com.openclassrooms.moneytransfersystem.service.user.UserCreationService; import com.openclassrooms.moneytransfersystem.service.user.UserReadService; import com.openclassrooms.moneytransfersystem.service.user.UserUpdateService; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.security.core.Authentication; import org.springframework.security.core.context.SecurityContextHolder; @@ -32,6 +34,8 @@ public class LoginController { @Autowired private TransferRepository transferRepository; + Logger logger = LoggerFactory.getLogger(LoginController.class); + @GetMapping("") public String viewHomePage() { @@ -62,6 +66,9 @@ public String processRegister(User user) { @PostMapping("/process_balance_back") public String processRegister(TransferBack transferBack) { + logger.debug("[process_balance_back] User ID: " + transferBack.getUserId()); + logger.debug("[process_balance_back] Amount: " + transferBack.getAmount()); + userUpdateService.getBalanceBack(transferBack); return "index"; @@ -70,7 +77,9 @@ public String processRegister(TransferBack transferBack) { @GetMapping("/app") public String listTransfers(Model model) { Authentication authentication = SecurityContextHolder.getContext().getAuthentication(); + logger.debug("[app] User Email: " + authentication.getName()); User user = userReadService.readUserByEmail(authentication.getName()); + //logger.debug("[app] User Balance: " + user.getBalance()); String balance = String.format("%.2f", user.getBalance()); model.addAttribute("balance", balance); @@ -100,7 +109,12 @@ public String listTransfers(Model model) { Collections.sort(listTransfers, Comparator.comparing(TransferView::getDate)); model.addAttribute("listTransfers", listTransfers); - model.addAttribute("transferBack", new TransferBack()); + + TransferBack transferBack = new TransferBack(); + transferBack.setUserId(user.getId()); + logger.debug("[app-transfer-back] User ID: " + transferBack.getUserId()); + logger.debug("[app-transfer-back] Amount: " + transferBack.getAmount()); + model.addAttribute("transferBack", transferBack); return "app"; } diff --git a/src/main/java/com/openclassrooms/moneytransfersystem/model/Transfer.java b/src/main/java/com/openclassrooms/moneytransfersystem/model/Transfer.java index 0bd73cf..93d5de5 100644 --- a/src/main/java/com/openclassrooms/moneytransfersystem/model/Transfer.java +++ b/src/main/java/com/openclassrooms/moneytransfersystem/model/Transfer.java @@ -27,7 +27,7 @@ public class Transfer { @JoinColumn(name = "type", insertable=false, updatable=false) private String type; - @ManyToOne(cascade = CascadeType.ALL) - @JoinColumn(name="user_id",referencedColumnName="user_id", insertable=false, updatable=false) + @ManyToOne(cascade = CascadeType.MERGE) + @JoinColumn(name="user_id", updatable=false) private User user; } diff --git a/src/main/java/com/openclassrooms/moneytransfersystem/model/TransferBack.java b/src/main/java/com/openclassrooms/moneytransfersystem/model/TransferBack.java index 3f696a0..941e4b4 100644 --- a/src/main/java/com/openclassrooms/moneytransfersystem/model/TransferBack.java +++ b/src/main/java/com/openclassrooms/moneytransfersystem/model/TransferBack.java @@ -5,6 +5,6 @@ @Data public class TransferBack { - String email; + Long userId; double amount; } diff --git a/src/main/java/com/openclassrooms/moneytransfersystem/service/user/UserUpdateService.java b/src/main/java/com/openclassrooms/moneytransfersystem/service/user/UserUpdateService.java index 26c161d..298167b 100644 --- a/src/main/java/com/openclassrooms/moneytransfersystem/service/user/UserUpdateService.java +++ b/src/main/java/com/openclassrooms/moneytransfersystem/service/user/UserUpdateService.java @@ -51,23 +51,49 @@ public User updateUser(User user) { public void getBalanceBack(TransferBack transferBack) { - logger.debug("Transfer back for " + transferBack.getEmail() + ": " + transferBack.getAmount()); - - User userUpdated = userRepository.findByEmail(transferBack.getEmail()); - userUpdated.setBalance(userUpdated.getBalance() - transferBack.getAmount()); - userRepository.save(userUpdated); - - Transfer transfer = new Transfer(); - transfer.setId(userUpdated.getId()); - transfer.setDate(LocalDateTime.now()); - transfer.setType("OUT"); - transfer.setAmount(transferBack.getAmount()); - transfer.setTax(taxRepository.findByName("DEFAULT").getRate()); - transfer.setDescription("Retrait de solde vers compte bancaire"); - transferRepository.save(transfer); - - transfer.setId(userRepository.findByEmail("app@test.com").getId()); - transfer.setType("IN"); - transferRepository.save(transfer); + //System.out.println("test: " + userRepository.findById(transferBack.getUserId())); + + logger.debug("[service-balance-back] User ID: " + transferBack.getUserId()); + logger.debug("[service-balance-back] Balance: " + transferBack.getAmount()); + + Optional optionalUser = userRepository.findById(transferBack.getUserId()); + User userUpdated = new User(); + if (optionalUser.isPresent()) { + userUpdated.setId(optionalUser.get().getId()); + userUpdated.setEmail(optionalUser.get().getEmail()); + userUpdated.setPassword(optionalUser.get().getPassword()); + userUpdated.setFirstName(optionalUser.get().getFirstName()); + userUpdated.setLastName(optionalUser.get().getLastName()); + userUpdated.setIbanCode(optionalUser.get().getIbanCode()); + userUpdated.setBicCode(optionalUser.get().getBicCode()); + userUpdated.setFriendsList(optionalUser.get().getFriendsList()); + userUpdated.setBalance(optionalUser.get().getBalance() - transferBack.getAmount()); + userRepository.save(userUpdated); + + Transfer transfer = new Transfer(); + transfer.setUser(userUpdated); + transfer.setDate(LocalDateTime.now()); + transfer.setType("OUT"); + transfer.setAmount(transferBack.getAmount()); + transfer.setTax(taxRepository.findByName("DEFAULT").getRate()); + transfer.setDescription("Retrait de solde vers compte bancaire"); + transferRepository.save(transfer); + //logger.debug(transfer.getUser().toString()); + /*logger.debug("[service-balance-back] OUT: " + transfer.getUser().getId() + "|" + + transfer.getDate() + "|" + transfer.getType() + "|" + + transfer.getAmount() + "|" + transfer.getDescription());*/ + + Transfer inTransfer = new Transfer(); + inTransfer.setDate(LocalDateTime.now()); + inTransfer.setAmount(transferBack.getAmount()); + inTransfer.setTax(taxRepository.findByName("DEFAULT").getRate()); + inTransfer.setDescription("Retrait de solde vers compte bancaire"); + inTransfer.setUser(userRepository.findByEmail("app@test.com")); + inTransfer.setType("IN"); + transferRepository.save(inTransfer); + /*logger.debug("[service-balance-back] IN: " + transfer.getUser().getId() + "|" + + transfer.getDate() + "|" + transfer.getType() + "|" + + transfer.getAmount() + "|" + transfer.getDescription());*/ + } } } diff --git a/src/main/resources/templates/app.html b/src/main/resources/templates/app.html index 4667d20..f3da44c 100644 --- a/src/main/resources/templates/app.html +++ b/src/main/resources/templates/app.html @@ -29,8 +29,7 @@

Solde votre compte : [[${balance}]] €

- - +
From e3cda2941de61f867f1f563beae176f67efc1da7 Mon Sep 17 00:00:00 2001 From: David Date: Wed, 1 Sep 2021 15:51:53 +0200 Subject: [PATCH 112/208] feat(controller): add balance topup --- .../controller/LoginController.java | 11 +++++ .../service/user/UserUpdateService.java | 45 +++++++++++++++++++ src/main/resources/templates/app.html | 15 +++++++ 3 files changed, 71 insertions(+) diff --git a/src/main/java/com/openclassrooms/moneytransfersystem/controller/LoginController.java b/src/main/java/com/openclassrooms/moneytransfersystem/controller/LoginController.java index f3f44b3..dffe230 100644 --- a/src/main/java/com/openclassrooms/moneytransfersystem/controller/LoginController.java +++ b/src/main/java/com/openclassrooms/moneytransfersystem/controller/LoginController.java @@ -74,6 +74,17 @@ public String processRegister(TransferBack transferBack) { return "index"; } + @PostMapping("/process_topup") + public String processTopup(TransferBack transferBack) { + + logger.debug("[process_balance_back] User ID: " + transferBack.getUserId()); + logger.debug("[process_balance_back] Amount: " + transferBack.getAmount()); + + userUpdateService.getTopup(transferBack); + + return "index"; + } + @GetMapping("/app") public String listTransfers(Model model) { Authentication authentication = SecurityContextHolder.getContext().getAuthentication(); diff --git a/src/main/java/com/openclassrooms/moneytransfersystem/service/user/UserUpdateService.java b/src/main/java/com/openclassrooms/moneytransfersystem/service/user/UserUpdateService.java index 298167b..acfc1c0 100644 --- a/src/main/java/com/openclassrooms/moneytransfersystem/service/user/UserUpdateService.java +++ b/src/main/java/com/openclassrooms/moneytransfersystem/service/user/UserUpdateService.java @@ -96,4 +96,49 @@ public void getBalanceBack(TransferBack transferBack) { + transfer.getAmount() + "|" + transfer.getDescription());*/ } } + + public void getTopup(TransferBack transferBack) { + + //System.out.println("test: " + userRepository.findById(transferBack.getUserId())); + + Optional optionalUser = userRepository.findById(transferBack.getUserId()); + User userUpdated = new User(); + if (optionalUser.isPresent()) { + userUpdated.setId(optionalUser.get().getId()); + userUpdated.setEmail(optionalUser.get().getEmail()); + userUpdated.setPassword(optionalUser.get().getPassword()); + userUpdated.setFirstName(optionalUser.get().getFirstName()); + userUpdated.setLastName(optionalUser.get().getLastName()); + userUpdated.setIbanCode(optionalUser.get().getIbanCode()); + userUpdated.setBicCode(optionalUser.get().getBicCode()); + userUpdated.setFriendsList(optionalUser.get().getFriendsList()); + userUpdated.setBalance(optionalUser.get().getBalance() + transferBack.getAmount()); + userRepository.save(userUpdated); + + Transfer transfer = new Transfer(); + transfer.setUser(userUpdated); + transfer.setDate(LocalDateTime.now()); + transfer.setType("IN"); + transfer.setAmount(transferBack.getAmount()); + transfer.setTax(taxRepository.findByName("DEFAULT").getRate()); + transfer.setDescription("Rechargement depuis votre compte bancaire"); + transferRepository.save(transfer); + //logger.debug(transfer.getUser().toString()); + /*logger.debug("[service-balance-back] OUT: " + transfer.getUser().getId() + "|" + + transfer.getDate() + "|" + transfer.getType() + "|" + + transfer.getAmount() + "|" + transfer.getDescription());*/ + + Transfer inTransfer = new Transfer(); + inTransfer.setDate(LocalDateTime.now()); + inTransfer.setAmount(transferBack.getAmount()); + inTransfer.setTax(taxRepository.findByName("DEFAULT").getRate()); + inTransfer.setDescription("Rechargement depuis votre compte bancaire"); + inTransfer.setUser(userRepository.findByEmail("app@test.com")); + inTransfer.setType("OUT"); + transferRepository.save(inTransfer); + /*logger.debug("[service-balance-back] IN: " + transfer.getUser().getId() + "|" + + transfer.getDate() + "|" + transfer.getType() + "|" + + transfer.getAmount() + "|" + transfer.getDescription());*/ + } + } } diff --git a/src/main/resources/templates/app.html b/src/main/resources/templates/app.html index f3da44c..86ec6c2 100644 --- a/src/main/resources/templates/app.html +++ b/src/main/resources/templates/app.html @@ -38,6 +38,21 @@

Solde votre compte : [[${balance}]] €

+
+
+
+ +
+ + +
+
+
+ +
+
+

Liste de transferts

From df0ae4201a1810a8b85f2a3ea2049745f44e23b3 Mon Sep 17 00:00:00 2001 From: David Date: Wed, 1 Sep 2021 16:54:08 +0200 Subject: [PATCH 113/208] feat(controller): add friends list select options --- .../controller/LoginController.java | 8 ++++++- .../model/TransferBack.java | 1 + src/main/resources/templates/app.html | 22 ++++++++++++++++++- 3 files changed, 29 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/openclassrooms/moneytransfersystem/controller/LoginController.java b/src/main/java/com/openclassrooms/moneytransfersystem/controller/LoginController.java index dffe230..66a0720 100644 --- a/src/main/java/com/openclassrooms/moneytransfersystem/controller/LoginController.java +++ b/src/main/java/com/openclassrooms/moneytransfersystem/controller/LoginController.java @@ -1,5 +1,7 @@ package com.openclassrooms.moneytransfersystem.controller; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.ObjectMapper; import com.openclassrooms.moneytransfersystem.dao.TransferRepository; import com.openclassrooms.moneytransfersystem.model.*; import com.openclassrooms.moneytransfersystem.service.user.UserCreationService; @@ -86,7 +88,7 @@ public String processTopup(TransferBack transferBack) { } @GetMapping("/app") - public String listTransfers(Model model) { + public String listTransfers(Model model) throws JsonProcessingException { Authentication authentication = SecurityContextHolder.getContext().getAuthentication(); logger.debug("[app] User Email: " + authentication.getName()); User user = userReadService.readUserByEmail(authentication.getName()); @@ -127,6 +129,10 @@ public String listTransfers(Model model) { logger.debug("[app-transfer-back] Amount: " + transferBack.getAmount()); model.addAttribute("transferBack", transferBack); + ObjectMapper mapper = new ObjectMapper(); + List friends = mapper.readValue(user.getFriendsList(), List.class); + model.addAttribute("friends", friends); + return "app"; } } diff --git a/src/main/java/com/openclassrooms/moneytransfersystem/model/TransferBack.java b/src/main/java/com/openclassrooms/moneytransfersystem/model/TransferBack.java index 941e4b4..ee52dfd 100644 --- a/src/main/java/com/openclassrooms/moneytransfersystem/model/TransferBack.java +++ b/src/main/java/com/openclassrooms/moneytransfersystem/model/TransferBack.java @@ -6,5 +6,6 @@ public class TransferBack { Long userId; + Long recipient; double amount; } diff --git a/src/main/resources/templates/app.html b/src/main/resources/templates/app.html index 86ec6c2..f122a2b 100644 --- a/src/main/resources/templates/app.html +++ b/src/main/resources/templates/app.html @@ -49,11 +49,31 @@

Solde votre compte : [[${balance}]] €

- +
+
+
+
+ + + + + + + +
Transférer vers un ami : + +
+ +

Liste de transferts

From 08b9f3ee378be17fdbbca46efbb3515f1b5db25a Mon Sep 17 00:00:00 2001 From: David Date: Thu, 2 Sep 2021 12:57:23 +0200 Subject: [PATCH 114/208] feat(front): update app homepage --- .../service/user/UserUpdateService.java | 10 + src/main/resources/templates/app.html | 201 ++++++++++-------- 2 files changed, 117 insertions(+), 94 deletions(-) diff --git a/src/main/java/com/openclassrooms/moneytransfersystem/service/user/UserUpdateService.java b/src/main/java/com/openclassrooms/moneytransfersystem/service/user/UserUpdateService.java index acfc1c0..091061e 100644 --- a/src/main/java/com/openclassrooms/moneytransfersystem/service/user/UserUpdateService.java +++ b/src/main/java/com/openclassrooms/moneytransfersystem/service/user/UserUpdateService.java @@ -53,6 +53,11 @@ public void getBalanceBack(TransferBack transferBack) { //System.out.println("test: " + userRepository.findById(transferBack.getUserId())); + if (transferBack.getAmount() == 0) { + + return; + } + logger.debug("[service-balance-back] User ID: " + transferBack.getUserId()); logger.debug("[service-balance-back] Balance: " + transferBack.getAmount()); @@ -101,6 +106,11 @@ public void getTopup(TransferBack transferBack) { //System.out.println("test: " + userRepository.findById(transferBack.getUserId())); + if (transferBack.getAmount() == 0) { + + return; + } + Optional optionalUser = userRepository.findById(transferBack.getUserId()); User userUpdated = new User(); if (optionalUser.isPresent()) { diff --git a/src/main/resources/templates/app.html b/src/main/resources/templates/app.html index f122a2b..a88aee7 100644 --- a/src/main/resources/templates/app.html +++ b/src/main/resources/templates/app.html @@ -1,102 +1,115 @@ - - - Liste de transferts – Pay My Buddy - - - - - -
-
- logo -
-
-
-

- Vous êtes connecté sur le compte : [[${#request.userPrincipal.name}]] -

- -
-
-
-

Solde votre compte : [[${balance}]] €

-
-
-
-
- -
- - -
-
-
- -
+ + + Liste de transferts – Pay My Buddy + + + + + + +
+
+ logo +
+
+ + + Vous êtes connecté sur le compte : [[${#request.userPrincipal.name}]] + + +
- -
-
-
- -
- - -
+
+

Solde votre compte : [[${balance}]] €

+
+ +
+
+ +
+
+ +
+ + +
+
+ +
+ +
+
+ + +
+
+
+ +
+ + +
+
+ +
+ +
+
+
+ +
+
- +
+
+
+ +
+ +
+
+
+ +
+
+
- -
-
-
- - - - - - - - -
Transférer vers un ami : - -
-
-
-
-

Liste de transferts

-
-
- - - - - - - - - - - - - - - - - -
DateRelationDescriptionMontant
DateRelationDescriptionMontant
-
-
- + +
+

Liste de transferts

+
+ +
+ + + + + + + + + + + + + + + + + +
DateRelationDescriptionMontant
DateRelationDescriptionMontant
+
+
+ From ddc89fe5f9e6b6c3fd7c56097e93ed0fa2c8f094 Mon Sep 17 00:00:00 2001 From: David Date: Thu, 2 Sep 2021 13:07:42 +0200 Subject: [PATCH 115/208] feat(front): update app homepage --- .../moneytransfersystem/controller/LoginController.java | 3 ++- .../moneytransfersystem/model/TransferView.java | 2 +- src/main/resources/templates/app.html | 4 ++-- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/main/java/com/openclassrooms/moneytransfersystem/controller/LoginController.java b/src/main/java/com/openclassrooms/moneytransfersystem/controller/LoginController.java index 66a0720..3bb6b37 100644 --- a/src/main/java/com/openclassrooms/moneytransfersystem/controller/LoginController.java +++ b/src/main/java/com/openclassrooms/moneytransfersystem/controller/LoginController.java @@ -19,6 +19,7 @@ import org.springframework.web.bind.annotation.PostMapping; import java.time.LocalDateTime; +import java.time.format.DateTimeFormatter; import java.util.*; @Controller @@ -113,7 +114,7 @@ public String listTransfers(Model model) throws JsonProcessingException { transferRepository.findById(t.getId() - 1).get().getUser().getFirstName() ); } - transfer.setDate(t.getDate()); + transfer.setDate(t.getDate().format(DateTimeFormatter.ofPattern("EEEE, dd MMMM, yyyy", Locale.FRENCH))); transfer.setDescription(t.getDescription()); transfer.setAmount(String.valueOf(prefix + t.getAmount())); diff --git a/src/main/java/com/openclassrooms/moneytransfersystem/model/TransferView.java b/src/main/java/com/openclassrooms/moneytransfersystem/model/TransferView.java index 22886db..7b9e30c 100644 --- a/src/main/java/com/openclassrooms/moneytransfersystem/model/TransferView.java +++ b/src/main/java/com/openclassrooms/moneytransfersystem/model/TransferView.java @@ -7,7 +7,7 @@ @Data public class TransferView { - LocalDateTime date; + String date; String relation; String description; String amount; diff --git a/src/main/resources/templates/app.html b/src/main/resources/templates/app.html index a88aee7..c0f82ec 100644 --- a/src/main/resources/templates/app.html +++ b/src/main/resources/templates/app.html @@ -86,8 +86,8 @@

Solde votre compte : [[${balance}]] €

-
-

Liste de transferts

+
+

Historique du compte

From 77b5750a3122752b3b23292ea72bcb03d713b1e4 Mon Sep 17 00:00:00 2001 From: David Date: Thu, 2 Sep 2021 13:21:22 +0200 Subject: [PATCH 116/208] feat(transfer): add processTransfer --- .../moneytransfersystem/controller/LoginController.java | 6 ++++++ .../moneytransfersystem/model/TransferBack.java | 3 ++- src/main/resources/templates/app.html | 6 ++++-- 3 files changed, 12 insertions(+), 3 deletions(-) diff --git a/src/main/java/com/openclassrooms/moneytransfersystem/controller/LoginController.java b/src/main/java/com/openclassrooms/moneytransfersystem/controller/LoginController.java index 3bb6b37..4f0ead3 100644 --- a/src/main/java/com/openclassrooms/moneytransfersystem/controller/LoginController.java +++ b/src/main/java/com/openclassrooms/moneytransfersystem/controller/LoginController.java @@ -88,6 +88,12 @@ public String processTopup(TransferBack transferBack) { return "index"; } + @PostMapping("/process_transfer") + public String processTransfer(TransferBack transferBack) { + + return "index"; + } + @GetMapping("/app") public String listTransfers(Model model) throws JsonProcessingException { Authentication authentication = SecurityContextHolder.getContext().getAuthentication(); diff --git a/src/main/java/com/openclassrooms/moneytransfersystem/model/TransferBack.java b/src/main/java/com/openclassrooms/moneytransfersystem/model/TransferBack.java index ee52dfd..12ec0f1 100644 --- a/src/main/java/com/openclassrooms/moneytransfersystem/model/TransferBack.java +++ b/src/main/java/com/openclassrooms/moneytransfersystem/model/TransferBack.java @@ -6,6 +6,7 @@ public class TransferBack { Long userId; - Long recipient; + String recipient; double amount; + String description; } diff --git a/src/main/resources/templates/app.html b/src/main/resources/templates/app.html index c0f82ec..17435ac 100644 --- a/src/main/resources/templates/app.html +++ b/src/main/resources/templates/app.html @@ -65,17 +65,19 @@

Solde votre compte : [[${balance}]] €

-
+
-
From b3988325396be8780a2f0c6171e3c10cac3e630b Mon Sep 17 00:00:00 2001 From: David Date: Thu, 2 Sep 2021 13:26:20 +0200 Subject: [PATCH 117/208] feat(front): update app homepage --- src/main/resources/templates/app.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/resources/templates/app.html b/src/main/resources/templates/app.html index 17435ac..af96aeb 100644 --- a/src/main/resources/templates/app.html +++ b/src/main/resources/templates/app.html @@ -68,9 +68,9 @@

Solde votre compte : [[${balance}]] €

- +
-