| | |
| | | package cc.mrbird.febs.mall.controller; |
| | | |
| | | import cc.mrbird.febs.common.entity.FebsResponse; |
| | | import cc.mrbird.febs.mall.dto.ForgetPwdDto; |
| | | import cc.mrbird.febs.mall.dto.LoginDto; |
| | | import cc.mrbird.febs.mall.dto.RegisterDto; |
| | | import cc.mrbird.febs.mall.service.IApiMallMemberService; |
| | |
| | | import lombok.RequiredArgsConstructor; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.validation.annotation.Validated; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.validation.Valid; |
| | | |
| | |
| | | * @date 2021-09-16 |
| | | **/ |
| | | @Slf4j |
| | | @Validated |
| | | @CrossOrigin("*") |
| | | @RequiredArgsConstructor |
| | | @RestController |
| | | @RequestMapping(value = "/api/login") |
| | |
| | | return memberService.register(registerDto); |
| | | } |
| | | |
| | | |
| | | @ApiOperation(value = "账号密码登录接口", notes = "账号密码登录接口") |
| | | @PostMapping(value = "/toLogin") |
| | | public FebsResponse login(@RequestBody LoginDto loginDto) { |
| | | return memberService.toLogin(loginDto); |
| | | } |
| | | |
| | | |
| | | @ApiOperation(value = "忘记/修改密码", notes = "忘记/修改密码") |
| | | @PostMapping(value = "/forgetPwd") |
| | | public FebsResponse forgetPwd(@RequestBody ForgetPwdDto forgetPwdDto) { |
| | | return memberService.forgetPwd(forgetPwdDto); |
| | | } |
| | | } |