delete from sys_information where creditCode = #{ids} delete from sys_shareholder where creditCode = #{ids} delete from sys_member where creditCode = #{ids} delete from blade_dept where id = #{ids} select dept_id, ifnull(count(*), 0) count from blade_user bu left join blade_role br on bu.role_id = br.id where role_alias = "安保人员" and bu.is_deleted = 0 and bu.`status` = 1 left join sys_information si on si.departmentid = bu.dept_id left join sys_jurisdiction sj on sj.id = si.jurisdiction where 1=1 and (si.stats = 2 or si.stats =4) and bu.is_deleted = 0 and bu.`status` = 1