新增通过用户ID列表查询部门用户接口
This commit is contained in:
parent
f2edc1e6a2
commit
c85d2b9e7e
@ -43,6 +43,14 @@ public interface IDepartmentUserBaseService {
|
||||
*/
|
||||
List<DepartmentUserDTO> list(List<String> departmentIds);
|
||||
|
||||
/**
|
||||
* 机构用户列表
|
||||
*
|
||||
* @param userIds
|
||||
* @return
|
||||
*/
|
||||
List<DepartmentUserDTO> listByUserIds(List<String> userIds);
|
||||
|
||||
/**
|
||||
* 用户ID列表
|
||||
*
|
||||
@ -102,4 +110,5 @@ public interface IDepartmentUserBaseService {
|
||||
* @param departmentUserDTOs
|
||||
*/
|
||||
void setUser(List<DepartmentUserDTO> departmentUserDTOs);
|
||||
|
||||
}
|
||||
|
@ -1,5 +1,6 @@
|
||||
package ink.wgink.common.component;
|
||||
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import ink.wgink.interfaces.manager.IAppManager;
|
||||
import ink.wgink.pojo.app.AppToken;
|
||||
import ink.wgink.pojo.app.AppTokenUser;
|
||||
@ -151,7 +152,12 @@ public class SecurityComponent {
|
||||
* @return
|
||||
*/
|
||||
public <T> T getExpandData(Class<T> clazz) {
|
||||
return (T) getExpandData();
|
||||
Object expandData = getExpandData();
|
||||
if (expandData == null) {
|
||||
return null;
|
||||
}
|
||||
return JSON.parseObject(JSON.toJSONString(expandData), clazz);
|
||||
// return (T) getExpandData();
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -30,6 +30,9 @@ public interface IDepartmentUserRemoteService {
|
||||
@RemotePostMethod("/list/department-ids")
|
||||
List<DepartmentUserDTO> listByDepartmentIds(@RemoteServerParams String userCenter, @RemoteQueryParams("access_token") String accessToken, @RemoteJsonBodyParams IdsVO idsVO);
|
||||
|
||||
@RemotePostMethod("list/user-ids")
|
||||
List<DepartmentUserDTO> listByUserIds(@RemoteServerParams String userCenter, @RemoteQueryParams("access_token") String accessToken, @RemoteJsonBodyParams IdsVO idsVO);
|
||||
|
||||
@RemoteGetMethod("/list-user-id/{departmentId}")
|
||||
List<String> listUserId(@RemoteServerParams String userCenter, @RemotePathParams("departmentId") String departmentId, @RemoteQueryParams("access_token") String accessToken);
|
||||
|
||||
|
@ -51,6 +51,13 @@ public class DepartmentUserServiceImpl extends DefaultBaseService implements IDe
|
||||
return departmentUserRemoteService.listByDepartmentIds(apiPathProperties.getUserCenter(), OAuth2ClientTokenManager.getInstance().getToken().getAccessToken(), idsVO);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<DepartmentUserDTO> listByUserIds(List<String> userIds) {
|
||||
IdsVO idsVO = new IdsVO();
|
||||
idsVO.setIds(userIds);
|
||||
return departmentUserRemoteService.listByUserIds(apiPathProperties.getUserCenter(), OAuth2ClientTokenManager.getInstance().getToken().getAccessToken(), idsVO);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> listUserId(String departmentId) {
|
||||
return departmentUserRemoteService.listUserId(apiPathProperties.getUserCenter(), departmentId, OAuth2ClientTokenManager.getInstance().getToken().getAccessToken());
|
||||
|
@ -59,6 +59,13 @@ public class DepartmentUserResourceController extends DefaultBaseController {
|
||||
return departmentUserService.list(idsVO.getIds());
|
||||
}
|
||||
|
||||
@ApiOperation(value = "组织部门用户列表", notes = "通过用户ID列表获取组织部门用户列表接口")
|
||||
@ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)})
|
||||
@PostMapping("list/user-ids")
|
||||
public List<DepartmentUserDTO> listByUserIds(@RequestBody IdsVO idsVO) {
|
||||
return departmentUserService.listByUserIds(idsVO.getIds());
|
||||
}
|
||||
|
||||
@ApiOperation(value = "组织部门用户ID列表", notes = "通过部门ID组织部门用户ID列表接口")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "departmentId", value = "部门ID", paramType = "path"),
|
||||
|
@ -175,6 +175,13 @@ public class DepartmentUserServiceImpl extends DefaultBaseService implements IDe
|
||||
return list(params);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<DepartmentUserDTO> listByUserIds(List<String> userIds) {
|
||||
Map<String, Object> params = getHashMap(2);
|
||||
params.put("userIds", userIds);
|
||||
return list(params);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> listUserId(String departmentId) {
|
||||
Map<String, Object> params = getHashMap(2);
|
||||
|
Loading…
Reference in New Issue
Block a user