xdd 1 deň pred
rodič
commit
df7549f1a4

+ 3 - 0
fs-admin/src/main/java/com/fs/hisStore/controller/FsStoreProductScrmController.java

@@ -22,6 +22,7 @@ import com.fs.hisStore.service.IFsStoreProductAttrValueScrmService;
 import com.fs.hisStore.service.IFsStoreProductScrmService;
 import com.mysql.cj.util.StringUtils;
 import io.swagger.annotations.ApiOperation;
+import lombok.extern.slf4j.Slf4j;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.http.HttpStatus;
 import org.springframework.http.ResponseEntity;
@@ -39,6 +40,7 @@ import java.util.List;
  * @author fs
  * @date 2022-03-15
  */
+@Slf4j
 @RestController
 @RequestMapping("/store/store/storeProduct")
 public class FsStoreProductScrmController extends BaseController
@@ -73,6 +75,7 @@ public class FsStoreProductScrmController extends BaseController
     @GetMapping("/list")
     public TableDataInfo list(FsStoreProductScrm fsStoreProduct)
     {
+        log.info("查询商品列表 参数: {}", fsStoreProduct);
         startPage();
         List<FsStoreProductListVO> list;
         if(StringUtils.isNullOrEmpty(fsStoreProduct.getBarCode())){

+ 5 - 3
fs-service/src/main/java/com/fs/company/service/impl/CompanyServiceImpl.java

@@ -109,9 +109,11 @@ public class CompanyServiceImpl implements ICompanyService
     @Override
     public Company selectCompanyById(Long companyId){
         Company company = companyMapper.selectCompanyById(companyId);
-        List<CompanyMiniapp> miniApp = companyMiniappService.getMiniAppListByCompanyList(Collections.singletonList(company.getCompanyId()));
-        company.setMiniAppMaster(GET_MINI_APP_STR.apply(0, miniApp));
-        company.setMiniAppServer(GET_MINI_APP_STR.apply(1, miniApp));
+        if(company != null) {
+            List<CompanyMiniapp> miniApp = companyMiniappService.getMiniAppListByCompanyList(Collections.singletonList(company.getCompanyId()));
+            company.setMiniAppMaster(GET_MINI_APP_STR.apply(0, miniApp));
+            company.setMiniAppServer(GET_MINI_APP_STR.apply(1, miniApp));
+        }
         return company;
     }
 

+ 4 - 2
fs-service/src/main/java/com/fs/hisStore/service/impl/FsStoreProductScrmServiceImpl.java

@@ -167,8 +167,10 @@ public class FsStoreProductScrmServiceImpl implements IFsStoreProductScrmService
                 String[] split = item.getCompanyIds().split(",");
 
                 for (String companyId : split) {
-                    String companyName = companyCacheService.selectCompanyNameById(Long.valueOf(companyId));
-                    companyNameList.add(companyName);
+                    if(StringUtils.isNotBlank(companyId)) {
+                        String companyName = companyCacheService.selectCompanyNameById(Long.valueOf(companyId));
+                        companyNameList.add(companyName);
+                    }
                 }
                 item.setCompanyName(String.join(",",companyNameList));
             }