1. 完成 auth 鉴权逻辑
2. 完成 admin 获取 Admin 上下文 3. 完成 user 获取 User 上下文
This commit is contained in:
@@ -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);
|
||||
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
|
||||
}
|
||||
@@ -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);
|
||||
|
||||
}
|
||||
@@ -7,7 +7,7 @@ import javax.validation.constraints.NotNull;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 鉴权模块 - 校验账号是否有权限 Request
|
||||
* 授权模块 - 校验账号是否有权限 Request
|
||||
*/
|
||||
@Data
|
||||
@Accessors(chain = true)
|
||||
|
||||
@@ -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
|
||||
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user