1. 完成 auth 鉴权逻辑

2. 完成 admin 获取 Admin 上下文
3. 完成 user 获取 User 上下文
This commit is contained in:
YunaiV
2020-04-23 21:18:48 +08:00
parent a545d673ab
commit eb86ae7cbc
104 changed files with 815 additions and 1256 deletions

View File

@@ -1,7 +1,15 @@
package cn.iocoder.mall.system.rpc.api.admin;
import cn.iocoder.common.framework.vo.CommonResult;
import cn.iocoder.mall.system.rpc.response.admin.AdminResponse;
/**
* Admin RPC 接口
*/
public interface AdminRPC {
CommonResult<AdminResponse> getAdmin(Integer id);
CommonResult<AdminResponse> getAdminByAccountId(Integer accountId);
}

View File

@@ -0,0 +1,10 @@
package cn.iocoder.mall.system.rpc.api.authorization;
import cn.iocoder.common.framework.vo.CommonResult;
import cn.iocoder.mall.system.rpc.request.authorization.AuthorizationCheckPermissionsRequest;
public interface AuthorizationRPC {
CommonResult<Boolean> checkPermissions(AuthorizationCheckPermissionsRequest checkPermissionsRequest);
}

View File

@@ -0,0 +1,15 @@
package cn.iocoder.mall.system.rpc.api.user;
import cn.iocoder.common.framework.vo.CommonResult;
import cn.iocoder.mall.system.rpc.response.user.UserResponse;
/**
* User RPC 接口
*/
public interface UserRPC {
// CommonResult<UserResponse> getUser(Integer id);
CommonResult<UserResponse> getUserByAccountId(Integer accountId);
}

View File

@@ -7,7 +7,7 @@ import javax.validation.constraints.NotNull;
import java.util.List;
/**
* 权模块 - 校验账号是否有权限 Request
* 权模块 - 校验账号是否有权限 Request
*/
@Data
@Accessors(chain = true)

View File

@@ -4,7 +4,7 @@ import lombok.Data;
import lombok.experimental.Accessors;
/**
* Admin 信息 Response
* Admin 模块 - Admin 信息 Response
*/
@Data
@Accessors(chain = true)
@@ -14,6 +14,5 @@ public class AdminResponse {
* 管理员编号
*/
private Integer id;
// private String
}

View File

@@ -0,0 +1,18 @@
package cn.iocoder.mall.system.rpc.response.user;
import lombok.Data;
import lombok.experimental.Accessors;
/**
* User 模块 - User 信息 Response
*/
@Data
@Accessors(chain = true)
public class UserResponse {
/**
* 用户编号
*/
private Integer id;
}