Files
UserBaseService/src/main/java/com/yunhai/userbase/model/identity/IdentitySwitchRequest.java
T
chenxing 44f966c33b
ci-userbase-service / build-and-push (push) Successful in 4m7s
其他接口
2026-08-18 21:51:18 +08:00

26 lines
733 B
Java
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
package com.yunhai.userbase.model.identity;
import lombok.Data;
import javax.validation.constraints.NotNull;
/**
* 切换身份入参:指定目标学校与该学校下的角色。<br>
* 服务端校验 (userId, roleId, schoolId) 在 {@code sys_user_role_rel} 中存在且正常态,<br>
* 不存在则拒绝(防止越权切换到非授权身份)。<br>
*
* @author chenx
* @date 2026/8/18
*/
@Data
public class IdentitySwitchRequest {
/** 目标角色ID(SysRoleEnum.key) */
@NotNull(message = "角色ID不能为空")
private Integer roleId;
/** 目标学校ID(=学校组 sys_group.id;无学校维度传 0) */
@NotNull(message = "学校ID不能为空")
private Integer schoolId;
}