<?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="com.nbclass.szxgl.mapper.ProjectClientMapper">

 	<select id="getTreeList" parameterType="java.lang.String" resultType="com.nbclass.szxgl.model.ProjectClient">
  		select Id, Name, ParentId, Sort from project_client where 1=1
		<if test="ParentId != null and ParentId != ''">
			and ParentId = #{ParentId}
		</if>
  		order by sort asc
	</select>

	<select id="getNameById" parameterType="java.lang.String" resultType="com.nbclass.szxgl.model.ProjectClient">
		select Id, Name, ParentId from project_client where Id = #{Id}
	</select>

</mapper>
