update 查询所属运营商,带权限校验

This commit is contained in:
Guoqs
2024-06-13 15:44:46 +08:00
parent fe87fa038c
commit 53d83bf1af
6 changed files with 46 additions and 4 deletions

View File

@@ -32,6 +32,7 @@ import java.util.ArrayList;
import java.util.List;
import java.util.Objects;
import java.util.concurrent.CompletableFuture;
import java.util.stream.Collectors;
/**
* 充电桩运营商信息Service业务层处理
@@ -81,7 +82,13 @@ public class PileMerchantInfoServiceImpl implements PileMerchantInfoService {
return Lists.newArrayList();
}
pileMerchantInfo.setStationDeptIds(authorizedMap.getStationDeptIds());
pileMerchantInfo.setMerchantDeptIds(authorizedMap.getMerchantDeptIds());
// 当前登录用户的运营商权限列表
List<MerchantInfoVO> list = UserUtils.getMerchantInfoVOList();
if (CollectionUtils.isNotEmpty(list)) {
List<String> collect = list.stream().map(MerchantInfoVO::getDeptId).collect(Collectors.toList());
pileMerchantInfo.setMerchantDeptIds(collect);
}
return selectPileMerchantInfoList(pileMerchantInfo);
}
@@ -104,6 +111,11 @@ public class PileMerchantInfoServiceImpl implements PileMerchantInfoService {
return list;
}
@Override
public List<PileMerchantInfo> selectPileMerchantInfoListByIdList(List<String> merchantIdList) {
return pileMerchantInfoMapper.selectPileMerchantInfoListByIdList(merchantIdList);
}
/**
* 新增充电桩运营商信息
*