Commit eda052ce authored by 周健威's avatar 周健威

修改申请接口

parent c7a15132
...@@ -20,8 +20,6 @@ import java.util.List; ...@@ -20,8 +20,6 @@ import java.util.List;
public interface UserRestInterface { public interface UserRestInterface {
public UserFeign getUserFeign(); public UserFeign getUserFeign();
default HttpServletRequest getRequest() { default HttpServletRequest getRequest() {
return ((ServletRequestAttributes) RequestContextHolder.getRequestAttributes()).getRequest(); return ((ServletRequestAttributes) RequestContextHolder.getRequestAttributes()).getRequest();
} }
...@@ -111,16 +109,18 @@ public interface UserRestInterface { ...@@ -111,16 +109,18 @@ public interface UserRestInterface {
} }
default List<Integer> getBusinessUserCompanyIds(){ default List<Integer> getBusinessUserCompanyIds(){
//Integer currentUserIdInt = getCurrentUserIdInt(); UserDTO userDTO = getBusinessUserByAppUser();
if (getBusinessUserByAppUser() != null){
return userDTO.getCompanyIds();
}
return null;
}
default UserDTO getBusinessUserByAppUser(){
String currentUserName = BaseContextHandler.getUsername(); String currentUserName = BaseContextHandler.getUsername();
if (StrUtil.isNotBlank(currentUserName)){ if (StrUtil.isNotBlank(currentUserName)){
ObjectRestResponse<UserDTO> restResponse = getUserFeign().businessUserinfoByMobilePhone(currentUserName); ObjectRestResponse<UserDTO> restResponse = getUserFeign().businessUserinfoByMobilePhone(currentUserName);
if (restResponse.getData() != null){ return restResponse.getData();
UserDTO userDTO =restResponse.getData();
if (userDTO != null){
return userDTO.getCompanyIds();
}
}
} }
return null; return null;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment