select bu.id, bu.id as userid, bu.username, bu.realname, up.in_postid, up.position_status, up.contract_stime from t_s_base_user bu LEFT JOIN t_bus_user_personnel up ON bu.ID=up.userid WHERE 1=1 <#if ( userAndUserPersonnelDto.userIdList )?? && userAndUserPersonnelDto.userIdList ?size gt 0> and bu.id in( <#list userAndUserPersonnelDto.userIdList as item> '${item}' <#if item_has_next>, ) <#else > and bu.id=null and bu.delete_flag='0'