新增部分功能
This commit is contained in:
parent
d69f94bf5d
commit
b7f285bfa4
@ -7,6 +7,7 @@ import com.cm.common.exception.SearchException;
|
||||
import com.cm.common.plugin.pojo.bos.UserResourceBO;
|
||||
import com.cm.common.result.SuccessResult;
|
||||
import com.cm.common.result.SuccessResultList;
|
||||
import org.aspectj.lang.annotation.DeclareError;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
@ -30,6 +31,7 @@ public interface IUserService {
|
||||
* @throws AccessTokenException
|
||||
* @throws SearchException
|
||||
*/
|
||||
@Deprecated
|
||||
JSONArray listDepartmentUsers(Map<String, Object> params) throws AccessTokenException, SearchException;
|
||||
|
||||
/**
|
||||
@ -40,6 +42,7 @@ public interface IUserService {
|
||||
* @throws AccessTokenException
|
||||
* @throws SearchException
|
||||
*/
|
||||
@Deprecated
|
||||
JSONArray listRoleUsers(Map<String, Object> params) throws AccessTokenException, SearchException;
|
||||
|
||||
/**
|
||||
@ -50,6 +53,7 @@ public interface IUserService {
|
||||
* @throws AccessTokenException
|
||||
* @throws SearchException
|
||||
*/
|
||||
@Deprecated
|
||||
JSONArray listGroupUsers(Map<String, Object> params) throws AccessTokenException, SearchException;
|
||||
|
||||
/**
|
||||
@ -60,6 +64,7 @@ public interface IUserService {
|
||||
* @throws AccessTokenException
|
||||
* @throws SearchException
|
||||
*/
|
||||
@Deprecated
|
||||
JSONArray listPositionUsers(Map<String, Object> params) throws AccessTokenException, SearchException;
|
||||
|
||||
/**
|
||||
@ -70,6 +75,7 @@ public interface IUserService {
|
||||
* @throws AccessTokenException
|
||||
* @throws SearchException
|
||||
*/
|
||||
@Deprecated
|
||||
JSONArray listUserByIds(Map<String, Object> params) throws AccessTokenException, SearchException;
|
||||
|
||||
/**
|
||||
@ -80,6 +86,7 @@ public interface IUserService {
|
||||
* @throws AccessTokenException
|
||||
* @throws SearchException
|
||||
*/
|
||||
@Deprecated
|
||||
JSONArray listAllUsers(Map<String, Object> params) throws AccessTokenException, SearchException;
|
||||
|
||||
/**
|
||||
@ -90,6 +97,7 @@ public interface IUserService {
|
||||
* @throws AccessTokenException
|
||||
* @throws SearchException
|
||||
*/
|
||||
@Deprecated
|
||||
JSONArray listUserDepartmentUser(Map<String, Object> userParams) throws AccessTokenException, SearchException;
|
||||
|
||||
/**
|
||||
@ -100,6 +108,7 @@ public interface IUserService {
|
||||
* @throws AccessTokenException
|
||||
* @throws SearchException
|
||||
*/
|
||||
@Deprecated
|
||||
JSONArray listUserDepartmentUserByRole(Map<String, Object> params) throws AccessTokenException, SearchException;
|
||||
|
||||
/**
|
||||
@ -109,6 +118,7 @@ public interface IUserService {
|
||||
* @param userParams
|
||||
* @return
|
||||
*/
|
||||
@Deprecated
|
||||
JSONArray listUserDepartmentUserByRole(String token, Map<String, Object> userParams) throws SearchException;
|
||||
|
||||
/**
|
||||
@ -119,6 +129,7 @@ public interface IUserService {
|
||||
* @throws AccessTokenException
|
||||
* @throws SearchException
|
||||
*/
|
||||
@Deprecated
|
||||
JSONArray listUserDepartmentUserByPosition(Map<String, Object> params) throws AccessTokenException, SearchException;
|
||||
|
||||
/**
|
||||
@ -129,6 +140,7 @@ public interface IUserService {
|
||||
* @throws AccessTokenException
|
||||
* @throws SearchException
|
||||
*/
|
||||
@Deprecated
|
||||
JSONObject getUserDetail(Map<String, Object> params) throws AccessTokenException, SearchException;
|
||||
|
||||
/**
|
||||
@ -140,6 +152,7 @@ public interface IUserService {
|
||||
* @throws AccessTokenException
|
||||
* @throws SearchException
|
||||
*/
|
||||
@Deprecated
|
||||
JSONArray listRoleUsers(String accessToken, Map<String, Object> params) throws AccessTokenException, SearchException;
|
||||
|
||||
/**
|
||||
@ -221,6 +234,16 @@ public interface IUserService {
|
||||
*/
|
||||
SuccessResultList<List<UserResourceBO>> listPageUserSimple(Map<String, Object> params) throws AccessTokenException, SearchException;
|
||||
|
||||
/**
|
||||
* 用户列表(通过用户Id列表)
|
||||
*
|
||||
* @param userIds
|
||||
* @return
|
||||
* @throws AccessTokenException
|
||||
* @throws SearchException
|
||||
*/
|
||||
List<UserResourceBO> listUserResourceByIds(List<String> userIds) throws AccessTokenException, SearchException;
|
||||
|
||||
/**
|
||||
* 用户动态详情列表(通过id列表)
|
||||
*
|
||||
@ -233,6 +256,7 @@ public interface IUserService {
|
||||
|
||||
/**
|
||||
* 用户详情
|
||||
*
|
||||
* @param userId
|
||||
* @return
|
||||
* @throws AccessTokenException
|
||||
|
@ -19,10 +19,7 @@ import org.apache.poi.util.StringUtil;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.*;
|
||||
|
||||
/**
|
||||
* When you feel like quitting. Think about why you started
|
||||
@ -198,6 +195,26 @@ public class UserServiceImpl extends AbstractService implements IUserService {
|
||||
return successResult;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<UserResourceBO> listUserResourceByIds(List<String> userIds) throws AccessTokenException, SearchException {
|
||||
if (userIds.isEmpty()) {
|
||||
return new ArrayList<>();
|
||||
}
|
||||
StringBuilder userIdsSB = new StringBuilder();
|
||||
for (String userId : userIds) {
|
||||
if (userIdsSB.length() > 0) {
|
||||
userIdsSB.append("_");
|
||||
}
|
||||
userIdsSB.append(userId);
|
||||
}
|
||||
Map<String, Object> params = getHashMap(4);
|
||||
params.put("userIds", userIdsSB.toString());
|
||||
params.put(IApiConsts.ACCESS_TOKEN, ClientTokenManager.getInstance().getClientToken().getAccessToken());
|
||||
String result = restTemplateUtil.doPostForm(String.format(IApiConsts.LIST_USER_BY_ID, apiPathProperties.getUserCenter()), params);
|
||||
searchResourceResult(result, "获取人员列表失败");
|
||||
return JSONArray.parseArray(result, UserResourceBO.class);
|
||||
}
|
||||
|
||||
@Override
|
||||
public JSONArray listDynamicUserInfoByIds(List<String> userIds) throws AccessTokenException, SearchException {
|
||||
if (userIds.isEmpty()) {
|
||||
|
Loading…
Reference in New Issue
Block a user