1. 迁移角色相关逻辑

2. admin-web 接入角色新接口
This commit is contained in:
YunaiV
2020-04-29 21:57:09 +08:00
parent 0763551d6d
commit e4048f8716
36 changed files with 221 additions and 186 deletions

View File

@@ -1,6 +1,6 @@
package cn.iocoder.mall.system.rpc.convert.oauth2;
import cn.iocoder.mall.system.biz.bo.ouath2.OAuth2AccessTokenBO;
import cn.iocoder.mall.system.biz.bo.ouath2.OAuth2AuthenticateBO;
import cn.iocoder.mall.system.biz.dto.oatuh2.OAuth2AccessTokenAuthenticateDTO;
import cn.iocoder.mall.system.rpc.request.oauth2.OAuth2AccessTokenAuthenticateRequest;
import cn.iocoder.mall.system.rpc.response.oauth2.OAuth2AccessTokenResponse;
@@ -14,6 +14,6 @@ public interface OAuth2Convert {
OAuth2AccessTokenAuthenticateDTO convert(OAuth2AccessTokenAuthenticateRequest authenticateRequest);
OAuth2AccessTokenResponse convert(OAuth2AccessTokenBO bean);
OAuth2AccessTokenResponse convert(OAuth2AuthenticateBO bean);
}

View File

@@ -1,7 +1,7 @@
package cn.iocoder.mall.system.rpc.rpc.oauth2;
import cn.iocoder.common.framework.vo.CommonResult;
import cn.iocoder.mall.system.biz.bo.ouath2.OAuth2AccessTokenBO;
import cn.iocoder.mall.system.biz.bo.ouath2.OAuth2AuthenticateBO;
import cn.iocoder.mall.system.biz.dto.oatuh2.OAuth2AccessTokenAuthenticateDTO;
import cn.iocoder.mall.system.biz.service.oauth2.OAuth2Service;
import cn.iocoder.mall.system.rpc.api.oauth2.OAuth2RPC;
@@ -21,7 +21,7 @@ public class OAuth2RPCImpl implements OAuth2RPC {
public CommonResult<OAuth2AccessTokenResponse> authenticate(OAuth2AccessTokenAuthenticateRequest authenticateRequest) {
// 执行认证
OAuth2AccessTokenAuthenticateDTO authenticateDTO = OAuth2Convert.INSTANCE.convert(authenticateRequest);
OAuth2AccessTokenBO accessTokenBO = oauth2Service.authenticate(authenticateDTO);
OAuth2AuthenticateBO accessTokenBO = oauth2Service.authenticate(authenticateDTO);
// 返回结果
OAuth2AccessTokenResponse accessTokenResponse = OAuth2Convert.INSTANCE.convert(accessTokenBO);
return CommonResult.success(accessTokenResponse);