| | |
| | | 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; |
| | |
| | | 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()); |
| | | |
| | | // 模糊查询 不组装树结构 直接返回 表格方便编辑 |