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

修改申请接口

parent c7a15132
......@@ -20,8 +20,6 @@ import java.util.List;
public interface UserRestInterface {
public UserFeign getUserFeign();
default HttpServletRequest getRequest() {
return ((ServletRequestAttributes) RequestContextHolder.getRequestAttributes()).getRequest();
}
......@@ -111,16 +109,18 @@ public interface UserRestInterface {
}
default List<Integer> getBusinessUserCompanyIds(){
//Integer currentUserIdInt = getCurrentUserIdInt();
String currentUserName = BaseContextHandler.getUsername();
if (StrUtil.isNotBlank(currentUserName)){
ObjectRestResponse<UserDTO> restResponse = getUserFeign().businessUserinfoByMobilePhone(currentUserName);
if (restResponse.getData() != null){
UserDTO userDTO =restResponse.getData();
if (userDTO != null){
UserDTO userDTO = getBusinessUserByAppUser();
if (getBusinessUserByAppUser() != null){
return userDTO.getCompanyIds();
}
return null;
}
default UserDTO getBusinessUserByAppUser(){
String currentUserName = BaseContextHandler.getUsername();
if (StrUtil.isNotBlank(currentUserName)){
ObjectRestResponse<UserDTO> restResponse = getUserFeign().businessUserinfoByMobilePhone(currentUserName);
return restResponse.getData();
}
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