fix:获取当前用户类型

This commit is contained in:
sugus 2025-08-04 11:36:46 +08:00
parent 1875040b50
commit e0494fc9a0

View File

@ -164,11 +164,7 @@ public class SecurityUtils {
* @return 系统用户类型 * @return 系统用户类型
*/ */
public static UserTypeEnum getCurrentUserType(){ public static UserTypeEnum getCurrentUserType(){
UserDetails userDetails = getCurrentUser(); return getCurrentUserTypeVo();
// Java 对象转换为 JSONObject 对象
JSONObject jsonObject = (JSONObject) JSON.toJSON(userDetails);
String userTypeStr = jsonObject.getString("userType");
return UserTypeEnum.valueOf(userTypeStr);
} }
public static String getCurrentEmployee(){ public static String getCurrentEmployee(){