feat: 带水印下载
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
package com.jero.modules.sys.utils;
|
||||
|
||||
import com.jero.common.system.vo.LoginUser;
|
||||
import org.apache.shiro.SecurityUtils;
|
||||
|
||||
/**
|
||||
* @author: Mzaxd
|
||||
* @Date: 2023/7/7 14:54
|
||||
*/
|
||||
public class UserUtils {
|
||||
|
||||
public static String getUserId() {
|
||||
LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
||||
return sysUser.getId();
|
||||
}
|
||||
|
||||
public static LoginUser getCurrentUser() {
|
||||
return (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user