mirror of https://gitee.com/xiaonuobase/snowy
【新增】增加通过userId获取职位列表api
parent
1ca98a0081
commit
59bb358d87
|
@ -120,4 +120,12 @@ public interface SysUserApi {
|
||||||
* @date 2024/7/19 9:54
|
* @date 2024/7/19 9:54
|
||||||
*/
|
*/
|
||||||
List<JSONObject> listUserWithoutCurrent();
|
List<JSONObject> listUserWithoutCurrent();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取用户的职位列表
|
||||||
|
*
|
||||||
|
* @author xuyuxiang
|
||||||
|
* @date 2022/6/20 18:19
|
||||||
|
**/
|
||||||
|
List<JSONObject> getPositionListByUserId(String userId);
|
||||||
}
|
}
|
||||||
|
|
|
@ -237,4 +237,20 @@ public class SysUserApiProvider implements SysUserApi {
|
||||||
.ne(SysUser::getId, StpUtil.getLoginId()))
|
.ne(SysUser::getId, StpUtil.getLoginId()))
|
||||||
.stream().map(JSONUtil::parseObj).collect(Collectors.toList());
|
.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());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue