1.使用ResultMap指定Long类型
在查询数据的那一块的Resultmap指定为你刚才定义的那个ResultMap
<resultMap id="ResultOfLongPersonId" type="java.lang.Long">
<result column="person_id" property="personId" javaType="long"/>
</resultMap>
<select id="getPhoneGroupPersonIdsByGroupId" resultMap="ResultOfLongPersonId">
select person_id from phone_group_person
where phone_group_id=#{phoneGroupId,jdbcType=BIGINT}
and is_delete=0
</select>
2.直接在查询的时候定义ResultType="Long"
<select id="getPhoneGroupPersonIdsByGroupId" resultType="Long">
select person_id from phone_group_person
where phone_group_id=#{phoneGroupId,jdbcType=BIGINT}
and is_delete=0
</select>