疯狂的狮子li
2022-08-11 5d367b7bf8a61e1a586db90f95706e7626926ce7
update 优化 getLoginId 增加必要参数空校验
已修改1个文件
6 ■■■■■ 文件已修改
ruoyi-common/src/main/java/com/ruoyi/common/core/domain/model/LoginUser.java 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-common/src/main/java/com/ruoyi/common/core/domain/model/LoginUser.java
@@ -105,6 +105,12 @@
     * 获取登录id
     */
    public String getLoginId() {
        if (userType == null) {
            throw new IllegalArgumentException("用户类型不能为空");
        }
        if (userId == null) {
            throw new IllegalArgumentException("用户ID不能为空");
        }
        return userType + LoginHelper.JOIN_CODE + userId;
    }