【新增】增加通过userId获取职位列表api

This commit is contained in:
俞宝山
2024-11-20 22:06:26 +08:00
parent 1ca98a0081
commit 59bb358d87
2 changed files with 24 additions and 0 deletions

View File

@@ -237,4 +237,20 @@ public class SysUserApiProvider implements SysUserApi {
.ne(SysUser::getId, StpUtil.getLoginId()))
.stream().map(JSONUtil::parseObj).collect(Collectors.toList());
}
@Override
public List<JSONObject> getPositionListByUserId(String userId) {
SysUserIdParam sysUserIdParam = new SysUserIdParam();
sysUserIdParam.setId(userId);
return sysUserService.loginPositionInfo(sysUserIdParam).stream().map(sysUserPosition -> {
JSONObject obj = new JSONObject();
obj.set("orgId", sysUserPosition.getOrgId());
obj.set("orgName", sysUserPosition.getOrgName());
obj.set("positionId", sysUserPosition.getPositionId());
obj.set("positionName", sysUserPosition.getPositionName());
obj.set("category", sysUserPosition.getCategory());
obj.set("type", sysUserPosition.getType());
return obj;
}).collect(Collectors.toList());
}
}