Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
Antoine-BL committed Dec 16, 2018
2 parents ff518f8 + 546010d commit e1733a7
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,8 @@ public List<Combat> getAllMyCombat(@Autowired Authentication auth) {
Compte compte = compteDao.findById(courriel)
.orElseThrow(IllegalArgumentException::new);

myCombats = Stream.concat(combatDao.findAllByRouge(compte).stream(), combatDao.findAllByBlanc(compte).stream())
myCombats = Stream.of(combatDao.findAllByRouge(compte), combatDao.findAllByBlanc(compte), combatDao.findAllByArbitre(compte))
.flatMap(Collection::stream)
.collect(Collectors.toList());

myCombats.sort( (c1, c2) -> c1.getTemps() < c2.getTemps() ? 1 : -1);
Expand Down Expand Up @@ -361,6 +362,7 @@ public CompteDao getDao() {
}



/**----------------------------------------------------------------------
*
* Les fonctions ci-dessous sont pour le prototype android uniquement
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,5 @@
public interface CombatDao extends JpaRepository<Combat, Long> {
List<Combat> findAllByRouge(Compte rouge);
List<Combat> findAllByBlanc(Compte blanc);
List<Combat> findAllByArbitre(Compte blanc);
}
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,9 @@ public class Compte extends UserBase implements UserDetails, SanitizedCompte {
@JoinColumn(name="GROUPE_ID")
private Groupe groupe;

@Column(name="ANCIENDEPUIS")
private long ancienDepuis;

@Column(name="CHOUCHOU")
private int chouchou;
@Column(name="ENTRAINEMENT")
Expand Down Expand Up @@ -72,6 +75,14 @@ public class Compte extends UserBase implements UserDetails, SanitizedCompte {
@Transient
private Integer credits = null;

public long getAncienDepuis() {
return ancienDepuis;
}

public void setAncienDepuis(long ancienDepuis) {
this.ancienDepuis = ancienDepuis;
}

protected Compte() { }

Compte(
Expand Down

0 comments on commit e1733a7

Please sign in to comment.