修复已经废弃的接口产生的问题
This commit is contained in:
parent
bae4016a7b
commit
9aff50313f
@ -46,49 +46,56 @@ public class UserServiceImpl extends AbstractService implements IUserService {
|
||||
|
||||
@Override
|
||||
public JSONArray listDepartmentUsers(Map<String, Object> params) throws AccessTokenException, SearchException {
|
||||
String result = restTemplateUtil.doPostForm(String.format(IApiConsts.LIST_DEPARTMENT_USER, apiPathProperties.getUserCenter(), params.get("departmentId").toString()), params);
|
||||
params.put(IApiConsts.ACCESS_TOKEN, ClientTokenManager.getInstance().getClientToken().getAccessToken());
|
||||
String result = restTemplateUtil.doPostFormNormal(String.format(IApiConsts.LIST_DEPARTMENT_USER, apiPathProperties.getUserCenter(), params.get("departmentId").toString()), params);
|
||||
searchResourceResult(result, "获取人员列表失败");
|
||||
return JSONArray.parseArray(result);
|
||||
}
|
||||
|
||||
@Override
|
||||
public JSONArray listRoleUsers(Map<String, Object> params) throws AccessTokenException, SearchException {
|
||||
String result = restTemplateUtil.doPostForm(String.format(IApiConsts.LIST_ROLE_USER, apiPathProperties.getUserCenter(), params.get("roleId").toString()), params);
|
||||
params.put(IApiConsts.ACCESS_TOKEN, ClientTokenManager.getInstance().getClientToken().getAccessToken());
|
||||
String result = restTemplateUtil.doPostFormNormal(String.format(IApiConsts.LIST_ROLE_USER, apiPathProperties.getUserCenter(), params.get("roleId").toString()), params);
|
||||
searchResourceResult(result, "获取人员列表失败");
|
||||
return JSONArray.parseArray(result);
|
||||
}
|
||||
|
||||
@Override
|
||||
public JSONArray listGroupUsers(Map<String, Object> params) throws AccessTokenException, SearchException {
|
||||
String result = restTemplateUtil.doPostForm(String.format(IApiConsts.LIST_GROUP_USER, apiPathProperties.getUserCenter(), params.get("groupId").toString()), params);
|
||||
params.put(IApiConsts.ACCESS_TOKEN, ClientTokenManager.getInstance().getClientToken().getAccessToken());
|
||||
String result = restTemplateUtil.doPostFormNormal(String.format(IApiConsts.LIST_GROUP_USER, apiPathProperties.getUserCenter(), params.get("groupId").toString()), params);
|
||||
searchResourceResult(result, "获取人员列表失败");
|
||||
return JSONArray.parseArray(result);
|
||||
}
|
||||
|
||||
@Override
|
||||
public JSONArray listPositionUsers(Map<String, Object> params) throws AccessTokenException, SearchException {
|
||||
String result = restTemplateUtil.doPostForm(String.format(IApiConsts.LIST_POSITION_USER, apiPathProperties.getUserCenter(), params.get("positionId").toString()), params);
|
||||
params.put(IApiConsts.ACCESS_TOKEN, ClientTokenManager.getInstance().getClientToken().getAccessToken());
|
||||
String result = restTemplateUtil.doPostFormNormal(String.format(IApiConsts.LIST_POSITION_USER, apiPathProperties.getUserCenter(), params.get("positionId").toString()), params);
|
||||
searchResourceResult(result, "获取人员列表失败");
|
||||
return JSONArray.parseArray(result);
|
||||
}
|
||||
|
||||
@Override
|
||||
public JSONArray listAllUsers(Map<String, Object> params) throws AccessTokenException, SearchException {
|
||||
String result = restTemplateUtil.doPostForm(String.format(IApiConsts.LIST_ALL_USER, apiPathProperties.getUserCenter()), params);
|
||||
params.put(IApiConsts.ACCESS_TOKEN, ClientTokenManager.getInstance().getClientToken().getAccessToken());
|
||||
String result = restTemplateUtil.doPostFormNormal(String.format(IApiConsts.LIST_ALL_USER, apiPathProperties.getUserCenter()), params);
|
||||
searchResourceResult(result, "获取全部人员列表失败");
|
||||
return JSONArray.parseArray(result);
|
||||
}
|
||||
|
||||
@Override
|
||||
public JSONArray listUserDepartmentUser(Map<String, Object> params) throws AccessTokenException, SearchException {
|
||||
String result = restTemplateUtil.doPostForm(String.format(IApiConsts.LIST_USER_DEPARTMENT_USER, apiPathProperties.getUserCenter(), params.get("userId").toString()), params);
|
||||
params.put(IApiConsts.ACCESS_TOKEN, ClientTokenManager.getInstance().getClientToken().getAccessToken());
|
||||
String result = restTemplateUtil.doPostFormNormal(String.format(IApiConsts.LIST_USER_DEPARTMENT_USER, apiPathProperties.getUserCenter(), params.get("userId").toString()), params);
|
||||
searchResourceResult(result, "获取人员列表失败");
|
||||
return JSONArray.parseArray(result);
|
||||
}
|
||||
|
||||
@Override
|
||||
public JSONArray listUserDepartmentUserByRole(Map<String, Object> params) throws AccessTokenException, SearchException {
|
||||
String result = restTemplateUtil.doPostForm(String.format(IApiConsts.LIST_USER_DEPARTMENT_USER_BY_ROLE, apiPathProperties.getUserCenter(), params.get("userId").toString(), params.get("roleId").toString()), params);
|
||||
params.put(IApiConsts.ACCESS_TOKEN, ClientTokenManager.getInstance().getClientToken().getAccessToken());
|
||||
String result = restTemplateUtil.doPostFormNormal(String.format(IApiConsts.LIST_USER_DEPARTMENT_USER_BY_ROLE, apiPathProperties.getUserCenter(), params.get("userId").toString(), params.get("roleId").toString()), params);
|
||||
searchResourceResult(result, "获取人员列表失败");
|
||||
return JSONArray.parseArray(result);
|
||||
}
|
||||
@ -102,14 +109,16 @@ public class UserServiceImpl extends AbstractService implements IUserService {
|
||||
|
||||
@Override
|
||||
public JSONArray listUserDepartmentUserByPosition(Map<String, Object> params) throws AccessTokenException, SearchException {
|
||||
String result = restTemplateUtil.doPostForm(String.format(IApiConsts.LIST_USER_DEPARTMENT_USER_BY_POSITION, apiPathProperties.getUserCenter(), params.get("userId").toString(), params.get("positionId").toString()), params);
|
||||
params.put(IApiConsts.ACCESS_TOKEN, ClientTokenManager.getInstance().getClientToken().getAccessToken());
|
||||
String result = restTemplateUtil.doPostFormNormal(String.format(IApiConsts.LIST_USER_DEPARTMENT_USER_BY_POSITION, apiPathProperties.getUserCenter(), params.get("userId").toString(), params.get("positionId").toString()), params);
|
||||
searchResourceResult(result, "获取人员列表失败");
|
||||
return JSONArray.parseArray(result);
|
||||
}
|
||||
|
||||
@Override
|
||||
public JSONObject getUserDetail(Map<String, Object> params) throws AccessTokenException, SearchException {
|
||||
String result = restTemplateUtil.doPostForm(String.format(IApiConsts.GET_USER_DETAIL, apiPathProperties.getUserCenter(), params.get("userId").toString()), params);
|
||||
params.put(IApiConsts.ACCESS_TOKEN, ClientTokenManager.getInstance().getClientToken().getAccessToken());
|
||||
String result = restTemplateUtil.doPostFormNormal(String.format(IApiConsts.GET_USER_DETAIL, apiPathProperties.getUserCenter(), params.get("userId").toString()), params);
|
||||
searchResourceResult(result, "获取人员列表失败");
|
||||
return JSONObject.parseObject(result);
|
||||
}
|
||||
@ -131,7 +140,8 @@ public class UserServiceImpl extends AbstractService implements IUserService {
|
||||
|
||||
@Override
|
||||
public SuccessResult updateUserPassword(Map<String, Object> params) throws AccessTokenException, SearchException {
|
||||
String result = restTemplateUtil.doPostForm(String.format(IApiConsts.UPDATE_USER_PASSWORD, apiPathProperties.getUserCenter()), params);
|
||||
params.put(IApiConsts.ACCESS_TOKEN, ClientTokenManager.getInstance().getClientToken().getAccessToken());
|
||||
String result = restTemplateUtil.doPostFormNormal(String.format(IApiConsts.UPDATE_USER_PASSWORD, apiPathProperties.getUserCenter()), params);
|
||||
updateResourceResult(result, "密码修改失败");
|
||||
return new SuccessResult();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user