feat(car): 更新车辆查询支持组织ID列表筛选

- 添加 organizationIds 参数支持多组织ID筛选
- 实现 IN 查询逻辑替代原有的单个组织ID匹配
- 保留原有 organizationId 单值查询作为备选条件
- 添加 foreach 循环处理组织ID集合
- 优化查询条件避免参数冲突
This commit is contained in:
2026-01-13 15:27:30 +08:00
parent f0cd200e21
commit 45828ad95c

View File

@@ -25,7 +25,13 @@
<if test="param.type != null">
AND a.type = #{param.type}
</if>
<if test="param.organizationId != null">
<if test="param.organizationIds != null and param.organizationIds.size > 0">
AND a.organization_id IN
<foreach collection="param.organizationIds" item="orgId" open="(" close=")" separator=",">
#{orgId}
</foreach>
</if>
<if test="param.organizationId != null and (param.organizationIds == null or param.organizationIds.size == 0)">
AND a.organization_id = #{param.organizationId}
</if>
<if test="param.organizationParentId != null">