select kst.staff_id, kst.canteen_id, staff_no, staff_name, post_name, mobile, sex, kst.area_id, health_cert_expire,
health_cert_front_img, health_cert_back_img, nutrity_cert_expire,
safety_cert_expire, kst.create_by, kst.create_time, kst.update_by, kst.update_time,
ksf.photo_url, ksf.face_state, bc.canteen_name, ba.area_name
from kitchen_staff_info kst
left join kitchen_staff_face ksf on kst.staff_id = ksf.staff_id
left join basic_canteen bc on kst.canteen_id = bc.canteen_id
left join basic_area ba on kst.area_id = ba.area_id
insert into kitchen_staff_info
staff_no,
staff_name,
post_name,
mobile,
sex,
area_id,
canteen_id,
health_cert_expire,
health_cert_front_img,
health_cert_back_img,
nutrity_cert_expire,
safety_cert_expire,
create_by,
create_time,
update_by,
update_time,
#{staffNo},
#{staffName},
#{postName},
#{mobile},
#{sex},
#{areaId},
#{canteenId},
#{healthCertExpire},
#{healthCertFrontImg},
#{healthCertBackImg},
#{nutrityCertExpire},
#{safetyCertExpire},
#{createBy},
#{createTime},
#{updateBy},
#{updateTime},
update kitchen_staff_info
staff_no = #{staffNo},
staff_name = #{staffName},
post_name = #{postName},
mobile = #{mobile},
sex = #{sex},
area_id = #{areaId},
canteen_id = #{canteenId},
health_cert_expire = #{healthCertExpire},
health_cert_front_img = #{healthCertFrontImg},
health_cert_back_img = #{healthCertBackImg},
nutrity_cert_expire = #{nutrityCertExpire},
safety_cert_expire = #{safetyCertExpire},
create_by = #{createBy},
create_time = #{createTime},
update_by = #{updateBy},
update_time = #{updateTime},
where staff_id = #{staffId}
delete from kitchen_staff_info where staff_id = #{staffId}
delete from kitchen_staff_info where staff_id in
#{staffId}