select fh.id, fh.sheep_id, fh.sheepfold, sf.sheepfold_name as sheepfoldName, fh.comment, fh.technician, fh.create_by, fh.create_time from sc_fix_hoof fh left join da_sheepfold sf on fh.sheepfold = sf.id insert into sc_fix_hoof and fh.sheep_id like concat('%', #{sheepId}, '%') and fh.sheepfold = #{sheepfold} comment, technician, create_by, create_time, #{sheepId}, #{sheepfold}, #{comment}, #{technician}, #{createBy}, #{createTime}, update sc_fix_hoof sheep_id = #{sheepId}, sheepfold = #{sheepfold}, comment = #{comment}, technician = #{technician}, create_by = #{createBy}, create_time = #{createTime}, where id = #{id} delete from sc_fix_hoof where id = #{id} delete from sc_fix_hoof where id in #{id}