<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="org.jeecg.modules.system.mapper.SysCategoryMapper">

	<select id="queryListByPid" parameterType="String"  resultType="org.jeecg.modules.system.model.TreeSelectModel">
		select code,
			   name as "title",
			   id as "key",
			   (case when has_child = '1' then 0 else 1 end) as isLeaf,
			   pid as parentId
			   from sys_category
			where pid = #{pid}
	</select>
	

</mapper>
