隐藏商品类型中的'根目录'

This commit is contained in:
季圣华
2018-12-22 21:56:08 +08:00
parent 71fbc8a573
commit f998e37ac3
2 changed files with 3 additions and 1 deletions

View File

@@ -31,7 +31,7 @@ public class MaterialCategoryService {
public List<MaterialCategory> getAllList(Long parentId) {
MaterialCategoryExample example = new MaterialCategoryExample();
example.createCriteria().andParentidEqualTo(parentId);
example.createCriteria().andParentidEqualTo(parentId).andIdNotEqualTo(1l);
example.setOrderByClause("id");
return materialCategoryMapper.selectByExample(example);
}

View File

@@ -11,6 +11,7 @@
<if test="parentId != null">
and parentId = ${parentId}
</if>
and Id !=1
<if test="offset != null and rows != null">
limit #{offset},#{rows}
</if>
@@ -26,5 +27,6 @@
<if test="parentId != null">
and parentId = ${parentId}
</if>
and Id !=1
</select>
</mapper>