汇鑫大厦用户扫码自动把用户加入集团

This commit is contained in:
2024-02-22 10:46:38 +08:00
parent 5c75b981a4
commit 0ff8b3d22b
5 changed files with 55 additions and 34 deletions

View File

@@ -175,6 +175,11 @@ public class BaseController {
return getLoginUser().getUsername();
}
/**
* 通过authorization获取memberId
* @param authorization
* @return
*/
public String getMemberIdByAuthorization(String authorization) {
if (StringUtils.isBlank(authorization)) {
throw new BusinessException(ReturnCodeEnum.CODE_TOKEN_ERROR);
@@ -187,26 +192,13 @@ public class BaseController {
return memberId;
}
/**
* 通过request获取memberId
* @param request
* @return
*/
public String getMemberIdByAuthorization(HttpServletRequest request) {
return getMemberIdByAuthorization(request.getHeader("Authorization"));
}
/**
* 获取当前登录账号有权限的运营商部门id
*
* 平台管理员账号会返回空数组
* @return
*/
/*public List<String> getDeptIds() {
// 获取登录账号信息
AuthorizedDeptVO authorizedMap = SecurityUtils.getAuthorizedMap();
if (authorizedMap == null) {
return new ArrayList<>();
}
List<String> merchantDeptIds = authorizedMap.getMerchantDeptIds();
if (CollectionUtils.isNotEmpty(merchantDeptIds)) {
return merchantDeptIds;
}
return new ArrayList<>();
}*/
}