"<when test = 'orderItemIdList != null and orderItemIdList.size() > 0'>",
"<when test = 'orderItemIdList != null and orderItemIdList.size() > 0'>",
"and (a.details->>'$.orderItemId' is null or (a.details->>'$.orderItemId' is not null and a.details->>'$.orderItemId' in <foreach item='orderItemId' index='index' collection='orderItemIdList' open='(' separator=',' close=')'>#{orderItemId}</foreach>)) ",
"and (a.details->>'$.orderItemId' is null or (a.details->>'$.orderItemId' is not null and a.details->>'$.orderItemId' in <foreach item='orderItemId' index='index' collection='orderItemIdList' open='(' separator=',' close=')'>#{orderItemId}</foreach>)) ",