新增分类查询排序

This commit is contained in:
liyj 2025-10-29 15:47:05 +08:00
parent 1b27a1c58d
commit 14ad8988e7

View File

@ -963,7 +963,7 @@ public class ShopBaseProductCategoryServiceImpl extends BaseServiceImpl<ShopBase
@Override
public List<ProductCategoryRes> getTree(Integer pid, Boolean onlyEnable, String categoryName) {
QueryWrapper<ShopBaseProductCategory> objectQueryWrapper = new QueryWrapper<>();
objectQueryWrapper.orderByAsc("category_order");
if (CheckUtil.isNotEmpty(categoryName)) {
objectQueryWrapper.like("category_name", categoryName);
}