@@ -5,13 +5,14 @@ import com.yunhai.userhome.entity.UserCurrentRole;
|
||||
import java.util.Optional;
|
||||
|
||||
/**
|
||||
* 用户当前激活角色(user_current_role 表读写)。
|
||||
* 用户当前激活角色访问(UserBase 单一权威源,经 SDK 走 oapi,本地无存储)。<br>
|
||||
* 保留接口以稳定既有 81 处消费点(仅读 roleId/schId);实现由本地表改为 UserBase 开放接口。
|
||||
*/
|
||||
public interface IUserCurrentRoleService {
|
||||
|
||||
/** 取用户当前角色(可能不存在)。 */
|
||||
/** 取用户当前激活角色(未切换时兜底主身份;无任何身份返回 Optional.empty)。 */
|
||||
Optional<UserCurrentRole> findById(Integer userId);
|
||||
|
||||
/** 保存/覆盖用户当前角色。 */
|
||||
/** 切换用户当前激活角色(目标身份须属该用户,由 UserBase 校验)。 */
|
||||
void save(UserCurrentRole role);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user