and wx_enterprise_id = #{wxEnterpriseId} and staff_id = #{staffId}
</select>
<selectid="listNoDepartStaff"resultType="String">
SELECT distinct(a.staff_id) FROM `tab_haoban_staff` a LEFT JOIN `tab_haoban_staff_department_related` b ON a.`staff_id` = b.`staff_id` AND b.`status_flag` = 1
WHERE
a.create_time >= #{addDate}
<iftest="null != wxEnterpriseId">
and a.wx_enterprise_id = #{wxEnterpriseId}
</if>
AND a.status_flag = 1 AND b.`staff_department_related_id` IS NULL