@return */ MapSearchVo searchEnterprisesAll(List citys, List brands); Sql语句错解:
SELECT e.*,b.name FROM bd_enterprise e LEFT JOIN bd_dc_brand b ON e.brand = b.id LEFT JOIN bd_enterprise_report bra ON bra.license_num=e.license_num WHERE citys in #{city} AND brands in #{brand}
正解: 采用where标签。
SELECT be.*,b.name FROM bd_enterprise_branch be LEFT JOIN bd_enterprise e ON be.subordinate_enterprise=e.license_num LEFT JOIN bd_dc_brand b ON e.brand = b.id be.branch_city OR be.branch_contact_city IN #{city} and e.brand in #{brand}