关联三张表
<!-- 查询(根据查询条件分页查询) -->
<select id="getListMapPage" resultType="hashmap" parameterType="hashmap">
SELECT
tdmm.id as id,
tdmm.delivery_man_id as deliveryManId,
tdmm.customer_id as customerId,
tdmm.open_id as openId,
tdm.id as customerId,
tdm.login_name as customerLoginName,
tdm.real_name as customerRealName,
tc.id as deliveryManId,
tc.login_name as deliveryManLoginName,
tc.real_name as deliveryManRealName
FROM table1 tdmm
LEFT JOIN table2 tdm on(tdmm.delivery_man_id=tc.id) 左关联
LEFT JOIN table3 tc on(tdmm.customer_id=tdm.id)
WHERE tdmm.status = 1 条件
limit ${(page-1)*pagesize},${pagesize}
</select>