From ced35443353a013091a70a240c846e4344fec19d Mon Sep 17 00:00:00 2001
From: liujie <1793218484@qq.com>
Date: 星期二, 03 六月 2025 15:22:04 +0800
Subject: [PATCH] 小程序接口 发布

---
 ruoyi-system/src/main/java/com/ruoyi/system/service/impl/TbCompanyServiceImpl.java |   11 +++++++++--
 1 files changed, 9 insertions(+), 2 deletions(-)

diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/TbCompanyServiceImpl.java b/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/TbCompanyServiceImpl.java
index 2f08fce..6db2e48 100644
--- a/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/TbCompanyServiceImpl.java
+++ b/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/TbCompanyServiceImpl.java
@@ -58,6 +58,9 @@
     @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());
@@ -120,8 +123,8 @@
             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));
@@ -214,6 +217,10 @@
         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);

--
Gitblit v1.7.1