|
@@ -44,7 +44,7 @@ public class ProductClassifyServiceImpl extends ServiceImpl<ProductClassifyMappe
|
|
|
if (Objects.equals(isNeRawMaterial, 1)) {
|
|
|
pcIds = this.listObject(ProductClassify::getId, q -> q
|
|
|
.eq(ProductClassify::getId, 100)
|
|
|
- .or().apply("FIND_IN_SET(parent_id_set, 100)")
|
|
|
+ .or().apply("FIND_IN_SET(100,parent_id_set)")
|
|
|
);
|
|
|
}
|
|
|
|
|
@@ -53,6 +53,10 @@ public class ProductClassifyServiceImpl extends ServiceImpl<ProductClassifyMappe
|
|
|
.eq(ProductClassify::getDefinition, productClassify.getDefinition())
|
|
|
.like(ObjectUtil.isNotEmpty(name), ProductClassify::getName, name)
|
|
|
.notIn(ObjectUtil.isNotEmpty(pcIds), ProductClassify::getId, pcIds)
|
|
|
+ .and(ObjectUtil.isNotEmpty(productClassify.getAncestors()), q -> q
|
|
|
+ .eq(ProductClassify::getId, productClassify.getAncestors())
|
|
|
+ .or().apply("FIND_IN_SET({0},parent_id_set)", productClassify.getAncestors())
|
|
|
+ )
|
|
|
.orderByAsc(ProductClassify::getSort)
|
|
|
.list();
|
|
|
|