DAO中的写法
List<String> getParentNodeIds()
XML文件中的写法:
<resultMap id="ParentNodeList" type="java.lang.String"> <result column="node_id" property="nodeId" jdbcType="VARCHAR" /> </resultMap>
<select id="uniqueID" resultMap="ParentNodeList"> select node_id from node <where> parent_node_id is null or parent_node_id="" </where> GROUP BY node_id </select>
GROUP BY node_id
这个很重要
关注我,获取400个的赚钱金点子,轻松开启程序员的副业生涯