修改3-15问题

This commit is contained in:
2023-03-15 18:13:27 +08:00
parent 7cfbdaf947
commit 90c0a9bfdf
10 changed files with 72 additions and 8 deletions

View File

@@ -39,4 +39,12 @@
from pms_product_category c1 left join pms_product_category c2 on c1.id = c2.parent_id
where c1.parent_id = 0
</select>
<select id="selectCountByNameAndLevel" resultType="int">
select count(*) from pms_product_category where parent_id = #{parentId} and name = #{name}
</select>
<select id="selectCountByNameAndLevelId" resultType="int">
select count(*) from pms_product_category where parent_id = #{parentId} and name = #{name} and id &lt;&gt; #{id}
</select>
</mapper>