| | |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | |
| | | import javax.annotation.Resource; |
| | | import javax.validation.Valid; |
| | | import java.io.File; |
| | | import java.io.IOException; |
| | | |
| | |
| | | |
| | | @ApiOperation(value = "登陆接口", notes = "登陆接口") |
| | | @PostMapping("/login") |
| | | public Result login(@RequestBody AdminLoginDto adminLoginDto) { |
| | | |
| | | String username = adminLoginDto.getUsername(); |
| | | if(StrUtil.isEmpty(username)){ |
| | | return Result.fail("请输入用户名"); |
| | | } |
| | | String password = adminLoginDto.getPassword(); |
| | | if(StrUtil.isEmpty(password)){ |
| | | return Result.fail("请输入密码"); |
| | | } |
| | | public Result login(@RequestBody @Valid AdminLoginDto adminLoginDto) { |
| | | return iCommonService.login(adminLoginDto); |
| | | } |
| | | |
| | |
| | | * @return |
| | | */ |
| | | @ApiOperation(value="用户退出登录", notes="用户退出登录") |
| | | @GetMapping(value = "/Logout") |
| | | @PostMapping(value = "/Logout") |
| | | public Result memberLogout() { |
| | | return iCommonService.memberLogout(); |
| | | } |