insert into bm_qrcode_box
box_code,
box_name,
box_type,
create_by,
create_time,
#{boxCode},
#{boxName},
#{boxType},
#{createBy},
#{createTime},
update bm_qrcode_box
box_code = #{boxCode},
box_type = #{boxType},
box_name = #{boxName},
box_status = #{status} ,
update_by = #{updateBy},
update_time = #{updateTime},
transfer_user = #{transferUser},
input_user = #{inputUser},
where box_id = #{boxId}
update bm_qrcode_box
box_type = #{boxType},
box_name = #{boxName},
box_status = #{status},
update_by = #{updateBy},
update_time = #{updateTime},
where box_code = #{boxCode}
delete
from bm_qrcode_box
where box_id = #{boxId}
delete
from bm_qrcode_box_bind
where id = #{id}
delete
from bm_qrcode_box_bind
where box_id = #{boxId}
and ma_id = #{maId}
insert into bm_qrcode_box_bind
ma_id,
box_id,
create_by,
create_time,
#{maId},
#{boxId},
#{createBy},
#{createTime},
update bm_qrcode_box
box_status = IF(box_status = 1,#{status},box_status) ,
where box_id = #{boxId}