mirror of
http://192.168.1.205:9980/cf_devdept2/cf_imes_server.git
synced 2026-08-13 21:32:07 +08:00
分析页统计:生产单状态统计接口实现
This commit is contained in:
+8
-3
@@ -1,6 +1,8 @@
|
||||
package com.cf.imes.framework.security.core.util;
|
||||
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.cf.imes.framework.common.exception.ServiceException;
|
||||
import com.cf.imes.framework.common.exception.enums.GlobalErrorCodeConstants;
|
||||
import com.cf.imes.framework.security.core.LoginUser;
|
||||
import com.cf.imes.framework.web.core.util.WebFrameworkUtils;
|
||||
import org.springframework.lang.Nullable;
|
||||
@@ -123,9 +125,12 @@ public class SecurityFrameworkUtils {
|
||||
* 获取当前用户的组织ID
|
||||
*
|
||||
*/
|
||||
public static Long getUserOrganId(){
|
||||
|
||||
return SecurityFrameworkUtils.getLoginUser().getOrganId();
|
||||
public static Long getUserOrganId() {
|
||||
LoginUser loginUser = SecurityFrameworkUtils.getLoginUser();
|
||||
if (loginUser == null) {
|
||||
throw new ServiceException(GlobalErrorCodeConstants.UNAUTHORIZED);
|
||||
}
|
||||
return loginUser.getOrganId();
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user