Merge remote-tracking branch 'origin/master'
This commit is contained in:
@@ -51,6 +51,7 @@ public class ProdGroupServiceImpl extends ServiceImpl<ProdGroupMapper, ProdGroup
|
||||
}
|
||||
Long shopId = StpKit.USER.getShopId(0L);
|
||||
queryWrapper.eq(ProdGroup::getShopId, shopId);
|
||||
queryWrapper.orderBy(ProdGroup::getSort, true);
|
||||
queryWrapper.orderBy(ProdGroup::getId, false);
|
||||
return queryWrapper;
|
||||
}
|
||||
|
||||
@@ -34,6 +34,7 @@ public class ShopProdCategoryServiceImpl extends ServiceImpl<ShopProdCategoryMap
|
||||
}
|
||||
Long shopId = StpKit.USER.getShopId(0L);
|
||||
queryWrapper.eq(ShopProdCategory::getShopId, shopId);
|
||||
queryWrapper.eq(ShopProdCategory::getSort, true);
|
||||
queryWrapper.orderBy(ShopProdCategory::getId, false);
|
||||
return queryWrapper;
|
||||
}
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package com.czg.service.product.service.impl;
|
||||
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import cn.hutool.core.util.ObjUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.czg.constant.GlobalConstant;
|
||||
@@ -50,6 +51,7 @@ public class ShopProductSpecServiceImpl extends ServiceImpl<ShopProdSpecMapper,
|
||||
}
|
||||
Long shopId = StpKit.USER.getShopId(0L);
|
||||
queryWrapper.eq(ShopProdSpec::getShopId, shopId);
|
||||
queryWrapper.orderBy(ShopProdSpec::getLevel, true);
|
||||
queryWrapper.orderBy(ShopProdSpec::getSort, true);
|
||||
queryWrapper.orderBy(ShopProdSpec::getId, false);
|
||||
return queryWrapper;
|
||||
@@ -66,7 +68,7 @@ public class ShopProductSpecServiceImpl extends ServiceImpl<ShopProdSpecMapper,
|
||||
QueryWrapper queryWrapper = buildQueryWrapper(param);
|
||||
queryWrapper.eq(ShopProdSpec::getStatus, StatusEnum.ENABLED.value());
|
||||
List<ShopProdSpecDTO> list = super.listAs(queryWrapper, ShopProdSpecDTO.class);
|
||||
return TreeUtils.build(list, GlobalConstant.TREE_ROOT);
|
||||
return TreeUtils.build(list, CollUtil.isEmpty(list) ? GlobalConstant.TREE_ROOT : list.getFirst().getPid());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user