select a.id, a.name, a.address, a.version, a.company_id,a.del_flag,a.create_by, a.create_time, a.update_by, a.update_time, a.remark, b.name as company_name from hz_warehouse a left join sys_company b on b.id=a.company_id insert into hz_warehouse_cupboard warehouse_id, cupboard_name, mess, create_by, create_time, update_by, update_time, del_flag, #{warehouseId}, #{cupboardName}, #{mess}, #{createBy}, #{createTime}, #{updateBy}, #{updateTime}, #{delFlag}, update hz_warehouse set del_flag=1 where id=#{warehouseId} update hz_warehouse_cupboard cupboard_name = #{cupboardName}, mess = #{mess}, update_by = #{updateBy}, update_time = #{updateTime}, del_flag = #{delFlag}, where id = #{id} delete from hz_warehouse_cupboard where id = #{cupboardId}