Esempio n. 1
0
 @RequestMapping("/login")
 public Result<Member> login(Member member) {
   Member _member = memberService.findByEmailAndPassword(member.getEmail(), member.getPassword());
   member = null;
   if (null != _member) {
     return new Result<Member>(_member);
   } else {
     return new Result<Member>("Email of Password not valid");
   }
 }
Esempio n. 2
0
 @RequestMapping("/delete/{id}")
 public void delete(@PathVariable String id) {
   memberService.delete(new Member(id));
 }
Esempio n. 3
0
 @RequestMapping("/save")
 public Result<Member> save(Member member) {
   memberService.save(member);
   return new Result<Member>(member);
 }
Esempio n. 4
0
 @RequestMapping("/{id}")
 public Result<Member> findById(@PathVariable String id) {
   return new Result<Member>(memberService.findById(id));
 }
Esempio n. 5
0
 @RequestMapping("/team/{teamName}/members")
 public Result<List<Member>> projectMembers(@PathVariable String teamName) {
   return new Result<List<Member>>(memberService.findByTeamName(teamName));
 }
Esempio n. 6
0
 @RequestMapping("/list")
 public Result<List<Member>> list() {
   return new Result<List<Member>>(memberService.findAll());
 }