queryWrapper.and(w1->w1.eq("t.assignee_",userId).or(w2->w2.isNull("t.assignee_").apply("exists ( select LINK.ID_ from ACT_RU_IDENTITYLINK LINK where LINK.TASK_ID_ = t.ID_ and LINK.TYPE_ = 'candidate' and (LINK.USER_ID_ = {0} or ( LINK.GROUP_ID_ IN ({1}) ) ))",userId,ids)));
Stringids=StreamUtils.join(roleIds,x->"'"+x+"'");
queryWrapper.and(w1->w1.eq("t.assignee_",userId).or(w2->w2.isNull("t.assignee_").apply("exists ( select LINK.ID_ from ACT_RU_IDENTITYLINK LINK where LINK.TASK_ID_ = t.ID_ and LINK.TYPE_ = 'candidate' and (LINK.USER_ID_ = {0} or ( LINK.GROUP_ID_ IN (" +ids+") ) ))",userId,ids)));