|
|
@@ -1685,13 +1685,15 @@ public class KwsEnterpriseService {
|
|
|
public List<EntInfo> queryEnterpriseByPageType(EnterprisePageQueryReqVo req) {
|
|
|
log.info("查询企业信息请求参数:{}", JSON.toJSONString(req));
|
|
|
|
|
|
- List<KwsEntType> entTypes = kwsEntTypeRepository.queryByType(req.getEnterpriseType());
|
|
|
- if (CollectionUtils.isEmpty(entTypes)) {
|
|
|
+ Long loginEntId = LoginUserHolder.getEntId();
|
|
|
+ if (Objects.isNull(loginEntId)) {
|
|
|
return Collections.emptyList();
|
|
|
}
|
|
|
|
|
|
- Set<Long> entIds = entTypes.stream().map(KwsEntType::getEntId).collect(Collectors.toSet());
|
|
|
- if (CollectionUtils.isEmpty(entIds)) {
|
|
|
+ List<KwsEntType> entTypes = kwsEntTypeDao.findListByEntId(loginEntId);
|
|
|
+ boolean matchEnterpriseType = CollectionUtils.isNotEmpty(entTypes)
|
|
|
+ && entTypes.stream().anyMatch(item -> Objects.equals(item.getType(), req.getEnterpriseType()));
|
|
|
+ if (!matchEnterpriseType) {
|
|
|
return Collections.emptyList();
|
|
|
}
|
|
|
|
|
|
@@ -1699,7 +1701,7 @@ public class KwsEnterpriseService {
|
|
|
.eq(BaseModel::getDelFlag, Global.UN_DELETED)
|
|
|
.eq(BaseModel::getStatus, Global.NO)
|
|
|
.eq(KwsEnterprise::getApproval, ApprovalEnum.OK.getCode())
|
|
|
- .in(KwsEnterprise::getId, entIds)
|
|
|
+ .eq(KwsEnterprise::getId, loginEntId)
|
|
|
.like(StringUtils.isNotBlank(req.getEntName()), KwsEnterprise::getFirmName, req.getEntName())
|
|
|
.orderByAsc(KwsEnterprise::getFirmName));
|
|
|
if (CollectionUtils.isEmpty(enterprises)) {
|