| | |
| | | @Autowired |
| | | private TbUserService userService; |
| | | |
| | | @Autowired |
| | | private TbCompanyTypeService companyTypeService; |
| | | |
| | | @Override |
| | | public Page<IndexCompanyListVo> getCompanyList(CompanyListQuery query, Long userId) { |
| | | Page<TbCompany> page = new Page<>(query.getPageNum(), query.getPageSize()); |
| | |
| | | queryWrapper.orderByDesc(TbCompany::getCreateTime); |
| | | } |
| | | Page<TbCompany> companyPage = this.baseMapper.selectPage(page, queryWrapper); |
| | | if(companyPage.getRecords().isEmpty()){ |
| | | return page1; |
| | | if (companyPage.getRecords().isEmpty()) { |
| | | return page1; |
| | | } |
| | | List<Integer> ids = companyPage.getRecords().stream().map(TbCompany::getCompanyIndustryId).collect(Collectors.toList()); |
| | | List<TbIndustry> tbIndustries = industryService.list(new LambdaQueryWrapper<TbIndustry>().in(TbIndustry::getId, ids)); |
| | |
| | | List<TbOpeningBank> list1 = openingBankService.list(new LambdaQueryWrapper<TbOpeningBank>().eq(TbOpeningBank::getCompanyId, companyId)); |
| | | companyDetailVo.setOpeningBanks(list1); |
| | | |
| | | Integer companyCategory = tbCompany.getCompanyCategory(); |
| | | TbCompanyType byId = companyTypeService.getById(companyCategory); |
| | | companyDetailVo.setCompanyCategoryName(byId.getName()); |
| | | |
| | | // 当前未产生订单 |
| | | if (tbCompany.getStatus() == 1) { |
| | | companyDetailVo.setStatus(1); |