select fh.id,
fh.sheep_id,
fh.sheepfold,
sf.sheepfold_name as sheepfoldName,
fh.variety_id,
bv.variety as varietyName,
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
left join bas_sheep_variety bv on fh.variety_id = bv.id
INSERT INTO sc_fix_hoof
(sheep_id,
sheepfold,
variety_id,
comment,technician,
create_by,
create_time)
VALUES
(#{sheepId},
#{sheepfold},
#{varietyId},#{comment},#{technician},
#{createBy},
#{createTime})
update sc_fix_hoof
sheep_id = #{sheepId},sheepfold = #{sheepfold},variety_id=#{varietyId},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}