Files
digital-cloth-backend-service/digital-common/digital-util/src/main/java/digital/util/oss/UserUtil.java
T
2025-12-25 09:57:56 +08:00

21 lines
544 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 digital.util.oss;
import org.apache.shiro.SecurityUtils;
import digital.base.vo.LoginUser;
/**
* U CAN GET A CRAB WHEN U MEET US
* IF GET A QUESTIONPLEASE CONTACT US
* WEBSITE www.crabholder.cn www.crabholder.com
* EMAILcrabholder@163.com.
* CREATED ON 2020/7/13
*/
public class UserUtil {
public static LoginUser getLoginUser() {
return (LoginUser) SecurityUtils.getSubject().getPrincipal();
}
public static String getId() {
return ((LoginUser) SecurityUtils.getSubject().getPrincipal()).getId();
}
}