已知ListString createBys=new ArrayList;这样写是对的吗 select id=getByUserIdApp resultType=comredxunbpmcoreentityBpmTask parameterType=javautilMap select v from select t from BPM_TASK t left j 日期: 2026-01-28 标签: 常规 这段代码的问题在于在条件判断中,createBys应该被写成createBys.size() > 0来判断是否为空。 修改后的代码如下: select v.* from ( select t.* from BPM_TASK t left join bpm_def d on t.def_id_= d.def_id_ where ASSIGNEE_=#{userId} and t.TENANT_ID_=#{tenantId} and t.STATUS_!='COMPLETED' and t.STATUS_!='LOCKED' UNION select t.* from bpm_task t left join bpm_def d on t.def_id_= d.def_id_ left join bpm_task_user u on t.TASK_ID_=u.TASK_ID_ where t.ASSIGNEE_ is null AND t.STATUS_!='COMPLETED' and t.STATUS_!='LOCKED' and (u.USER_ID_=#{userId} and t.TENANT_ID_=#{tenantId} or u.GROUP_ID_ in #{id} ) ) v where 1=1 and ${w.whereSql} AND ( v.BUS_KEY_ LIKE CONCAT('%', #{query}, '%') OR v.SUBJECT_ LIKE CONCAT('%', #{query}, '%') OR v.CREATE_BY_ LIKE CONCAT('%', #{query}, '%') OR v.CREATE_BY_ IN #{createBy} ) ORDER BY ${w.orderBySql} 原文地址: http://www.cveoy.top/t/topic/i1y7 著作权归作者所有。请勿转载和采集! 免费AI点我,无需注册和登录