select pp.id, pp.com_id, sd.dept_name as com_name, pp.project_id, pi.project_name, pp.image_url, pp.video_url, pp.video_date, pp.state, pp.remark, pp.is_del, pp.create_by, pp.create_date, pp.update_by, pp.update_date from pro_photography pp left join pro_project_info pi on pi.id = pp.project_id left join sys_dept sd on sd.dept_id = pp.com_id insert into pro_photography com_id, project_id, image_url, video_url, video_date, state, remark, is_del, create_by, create_date, update_by, update_date, #{comId}, #{projectId}, #{imageUrl}, #{videoUrl}, #{videoDate}, #{state}, #{remark}, #{isDel}, #{createBy}, #{createDate}, #{updateBy}, #{updateDate}, update pro_photography com_id = #{comId}, project_id = #{projectId}, image_url = #{imageUrl}, video_url = #{videoUrl}, video_date = #{videoDate}, state = #{state}, remark = #{remark}, is_del = #{isDel}, create_by = #{createBy}, create_date = #{createDate}, update_by = #{updateBy}, update_date = #{updateDate}, where id = #{id} update pro_photography set is_del=2 where id = #{id} update pro_photography set is_del=2 where id in #{id}