|
@@ -1,5 +1,6 @@
|
|
|
package com.fjhx.xmhjc.service.product.impl;
|
|
|
|
|
|
+import cn.hutool.core.util.ObjectUtil;
|
|
|
import com.fjhx.xmhjc.entity.product.po.ProductCategory;
|
|
|
import com.fjhx.xmhjc.entity.product.po.ProductSubCategory;
|
|
|
import com.fjhx.xmhjc.entity.product.vo.ProductCategoryVo;
|
|
@@ -31,6 +32,8 @@ public class ProductSubCategoryServiceImpl extends ServiceImpl<ProductSubCategor
|
|
|
@Override
|
|
|
public Page<ProductSubCategoryVo> getPage(ProductSubCategorySelectDto dto) {
|
|
|
IWrapper<ProductSubCategory> wrapper = getWrapper();
|
|
|
+ wrapper.eq(ObjectUtil.isNotNull(dto.getCategoryId()), "parent_id", dto.getCategoryId());
|
|
|
+ wrapper.eq(ObjectUtil.isNotNull(dto.getStatus()), "status", dto.getStatus());
|
|
|
wrapper.orderByDesc("psc", ProductSubCategory::getId);
|
|
|
Page<ProductSubCategoryVo> page = this.baseMapper.getPage(dto.getPage(), wrapper);
|
|
|
return page;
|