Commit 6bf28ff7 by guojuxing

联合商户被授权的账号分组数据

parent 30f2e2f4
......@@ -251,6 +251,26 @@ public class UnionEnterpriseAuthApiServiceImpl implements UnionEnterpriseAuthApi
}
@Override
public ServiceResponse<List<UnionEnterpriseAuthDTO>> listOwnEnterpriseAuth(@NotNull Integer unionEnterpriseId) {
List<TabSysUnionEnterpriseAuth> list = unionEnterpriseAuthService.listOwnEnterpriseAuth(unionEnterpriseId);
return ServiceResponse.success(EntityUtil.changeEntityListNew(UnionEnterpriseAuthDTO.class, list));
}
@Override
public ServiceResponse<Map<Integer, List<Integer>>> getAccountGroupOfOwnEnterpriseAuth(@NotNull Integer unionEnterpriseId) {
List<TabSysUnionEnterpriseAuth> list = unionEnterpriseAuthService.listOwnEnterpriseAuth(unionEnterpriseId);
if (CollectionUtils.isNotEmpty(list)) {
return ServiceResponse.success(list.stream()
.filter(e -> StringUtils.isNotBlank(e.getAccountGroup()))
.collect(Collectors.toMap(e -> e.getOwnEnterpriseId(), e -> {
String[] accountGroupArr = e.getAccountGroup().split(",");
return Arrays.stream(accountGroupArr).mapToInt(accountGroup -> Integer.parseInt(accountGroup)).boxed().collect(Collectors.toList());
})));
}
return ServiceResponse.success(new HashMap<>());
}
@Override
public ServiceResponse<UnionEnterpriseAuthDTO> getUnionEnterpriseAuthByResourceGroupId(@NotNull Integer resourceGroupId) {
List<TabSysUnionEnterpriseAuth> listByResourceGroup = unionEnterpriseAuthService.listUnionEnterpriseAuthByResourceGroupId(resourceGroupId);
if (CollectionUtils.isNotEmpty(listByResourceGroup)) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment