Changeset b31afbd for src/main/java/it/finki
- Timestamp:
- 01/08/21 03:13:23 (4 years ago)
- Branches:
- master
- Children:
- 336d09e
- Parents:
- b24fe9b
- Location:
- src/main/java/it/finki/tinki
- Files:
-
- 1 added
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
src/main/java/it/finki/tinki/bootstrap/DataHolder.java
rb24fe9b rb31afbd 71 71 List<Skill> l2 = new ArrayList<>(); 72 72 l2.add(skillRepository.getOne(3L)); 73 l2.add(skillRepository.getOne( 0L));73 l2.add(skillRepository.getOne(10L)); 74 74 l2.add(skillRepository.getOne(1L)); 75 75 l2.add(skillRepository.getOne(2L)); … … 82 82 List<Skill> l3 = new ArrayList<>(); 83 83 l3.add(skillRepository.getOne(3L)); 84 l3.add(skillRepository.getOne( 0L));84 l3.add(skillRepository.getOne(10L)); 85 85 l3.add(skillRepository.getOne(5L)); 86 86 l3.add(skillRepository.getOne(6L)); … … 105 105 Account m = this.accountService.registerTeam("asdf", "asd", "TeamRocket", 3); 106 106 107 Job z = this.workService.insertJob("asdfq", "asdfqw", m.getId() ,5000, smalls, AccountType.TEAM); 108 Job n = this.workService.insertJob("asdfq", "asdfqw", c.getId() ,5000, sm2, AccountType.COMPANY); 107 109 Job j = this.workService.insertJob("Asdf", "Asdfa", c.getId() ,5000, ids, AccountType.COMPANY); 108 110 Job k = this.workService.insertJob("Asdf", "Asdfa", m.getId() ,5000, ids, AccountType.TEAM); 109 Job z = this.workService.insertJob("asdfq", "asdfqw", m.getId() ,5000, smalls, AccountType.TEAM);110 Job n = this.workService.insertJob("asdfq", "asdfqw", c.getId() ,5000, sm2, AccountType.COMPANY);111 111 112 Account u = this.accountService.registerUser("asdf", "asdf ", "Zoki", "Poki", lista, lista);112 Account u = this.accountService.registerUser("asdf", "asdfq", "Zoki", "Poki", lista, lista); 113 113 114 114 } -
src/main/java/it/finki/tinki/model/Users/Account.java
rb24fe9b rb31afbd 1 1 package it.finki.tinki.model.Users; 2 2 3 import com.sun.istack.NotNull; 3 4 import it.finki.tinki.model.enumerator.AccountType; 4 5 import lombok.Data; … … 16 17 17 18 @Column(unique = true) 19 @NotNull 18 20 String email; 19 21 22 @NotNull 20 23 String password; 21 24 25 @NotNull 22 26 String name; 23 27 -
src/main/java/it/finki/tinki/model/Users/User.java
rb24fe9b rb31afbd 29 29 this.skillsToLearn = skillsToLearn; 30 30 } 31 32 public String toString(){ 33 return ""; 34 } 31 35 } -
src/main/java/it/finki/tinki/service/impl/MatchmakerServiceImpl.java
rb24fe9b rb31afbd 61 61 if(matches.size()!=0) { 62 62 matches.forEach(match -> { 63 System.out.println(match.getCoefficient()); 63 64 jobs.add((Job) match.getEmbeddedMatchId().getWork()); 64 65 }); -
src/main/java/it/finki/tinki/web/controller/RegisterController.java
rb24fe9b rb31afbd 8 8 import it.finki.tinki.model.Users.Account; 9 9 import it.finki.tinki.model.Users.User; 10 import it.finki.tinki.model.dto.UserRegisterDTO; 10 11 import it.finki.tinki.service.AccountService; 11 12 import it.finki.tinki.service.MatchmakerService; … … 36 37 37 38 @RequestMapping(path = "/user", method = RequestMethod.POST) 38 private Map<String, String> registerUser(@RequestParam String email, 39 @RequestParam String password, 40 @RequestParam String name, 41 @RequestParam String surname, 42 @RequestParam List<Long> retainedSkills, 43 @RequestParam List<Long> skillsToLearn){ 39 private Map<String, String> registerUser(@RequestBody UserRegisterDTO body){ 44 40 45 List<Skill> retained = this.skillService.returnSkillsBasedOnId( retainedSkills);46 List<Skill> toLearn = this.skillService.returnSkillsBasedOnId( skillsToLearn);41 List<Skill> retained = this.skillService.returnSkillsBasedOnId(body.getRetainedSkills()); 42 List<Skill> toLearn = this.skillService.returnSkillsBasedOnId(body.getSkillsToLearn()); 47 43 48 Account k = this.accountService.registerUser( email, password, name, surname, retained, toLearn);44 Account k = this.accountService.registerUser(body.getEmail(), body.getPassword(), body.getName(), body.getSurname(), retained, toLearn); 49 45 50 46 Map<String, String> response = new HashMap<>(); … … 60 56 61 57 @RequestMapping(path = "/team", method = RequestMethod.POST) 62 private Map<String, String> registerTeam(@Request ParamString email,63 @Request ParamString password,64 @Request ParamString name,65 @Request Paramint members){58 private Map<String, String> registerTeam(@RequestBody String email, 59 @RequestBody String password, 60 @RequestBody String name, 61 @RequestBody int members){ 66 62 67 63 Account k = this.accountService.registerTeam(email, password, name, members); … … 79 75 80 76 @RequestMapping(path = "/company", method = RequestMethod.POST) 81 private Map<String, String> registeCompany(@Request ParamString email,82 @Request ParamString password,83 @Request ParamString name,84 @Request ParamString country,85 @Request ParamString city,86 @Request ParamString street){77 private Map<String, String> registeCompany(@RequestBody String email, 78 @RequestBody String password, 79 @RequestBody String name, 80 @RequestBody String country, 81 @RequestBody String city, 82 @RequestBody String street){ 87 83 88 84 Account k = this.accountService.registerCompany(email, password, name, country, city, street);
Note:
See TracChangeset
for help on using the changeset viewer.