|
@@ -2,13 +2,11 @@ package com.xy.service;
|
|
|
|
|
|
import cn.dev33.satoken.stp.StpUtil;
|
|
|
import com.xy.dto.LoginDto;
|
|
|
-import com.xy.dto.SatokenAuthorizeDto;
|
|
|
import com.xy.utils.R;
|
|
|
import io.swagger.annotations.Api;
|
|
|
import io.swagger.annotations.ApiOperation;
|
|
|
import lombok.AllArgsConstructor;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
-import org.springframework.web.bind.annotation.GetMapping;
|
|
|
import org.springframework.web.bind.annotation.RequestBody;
|
|
|
|
|
|
@Service
|
|
@@ -16,16 +14,11 @@ import org.springframework.web.bind.annotation.RequestBody;
|
|
|
@Api(tags = "权限校验")
|
|
|
public class AuthorizeServiceImpl implements AuthorizeService {
|
|
|
|
|
|
- @Override
|
|
|
- @ApiOperation("接口形式鉴权")
|
|
|
- public R<Boolean> satokenAuthorize(SatokenAuthorizeDto satokenAuthorizeDto) {
|
|
|
- return R.ok(true);
|
|
|
- }
|
|
|
-
|
|
|
@Override
|
|
|
@ApiOperation("登录")
|
|
|
public R<String> login(@RequestBody LoginDto loginDto) {
|
|
|
StpUtil.login(loginDto.getAccount());
|
|
|
return R.ok(StpUtil.getTokenValue());
|
|
|
}
|
|
|
+
|
|
|
}
|