shiyunteng
2026-06-08 a0974f04b5a83e3ab152ce79e53f180e7b496165
platformx-business-finance-biz/src/main/java/com/by4cloud/platformx/business/service/impl/ProductServiceImpl.java
@@ -9,6 +9,7 @@
import com.by4cloud.platformx.business.entity.Product;
import com.by4cloud.platformx.business.mapper.ProductMapper;
import com.by4cloud.platformx.business.service.ProductService;
import com.by4cloud.platformx.common.data.datascope.DataScope;
import jakarta.validation.constraints.NotNull;
import org.springframework.beans.BeanUtils;
import org.springframework.stereotype.Service;
@@ -32,9 +33,9 @@
        Long parent = parentId == null ? 0l : parentId;
        List<TreeNode<Long>> collect = baseMapper
                .selectList(Wrappers.<Product>lambdaQuery()
                .selectListByScope(Wrappers.<Product>lambdaQuery()
                        .like(StrUtil.isNotBlank(productName), Product::getProductName, productName)
                        .orderByAsc(Product::getCreateTime))
                        .orderByAsc(Product::getCreateTime), DataScope.of("comp_id"))
                .stream().map(getNodeFunction()).collect(Collectors.toList());
        // 模糊查询 不组装树结构 直接返回 表格方便编辑