select ep.id, ep.name, ep.type, ep.img, ep.sale_prise, ep.code, ep.sort, ep.status, ep.manufacture_date, ep.create_by, ep.create_time, ep.update_by, ep.update_time, ep.remark, ep.merchant_id, ep.submit_time, ep.audit_status, ep.audit_time, ep.reject_reason, ep.flag, ep.sort from zdy_eatery_product ep left join sys_dept d on ep.merchant_id = d.dept_id insert into zdy_eatery_product name, type, img, sale_prise, code, manufacture_date, create_by, create_time, update_by, update_time, remark, merchant_id, sort, submit_time, audit_status, audit_time, reject_reason, flag, status, #{name}, #{type}, #{img}, #{salePrise}, #{code}, #{manufactureDate}, #{createBy}, #{createTime}, #{updateBy}, #{updateTime}, #{remark}, #{merchantId}, #{sort}, #{submitTime}, #{auditStatus}, #{auditTime}, #{rejectReason}, #{flag}, #{status}, update zdy_eatery_product name = #{name}, type = #{type}, img = #{img}, sale_prise = #{salePrise}, manufacture_date = #{manufactureDate}, create_by = #{createBy}, create_time = #{createTime}, update_by = #{updateBy}, update_time = #{updateTime}, remark = #{remark}, sort = #{sort}, submit_time= #{submitTime}, audit_status= #{auditStatus}, audit_time= #{auditTime}, reject_reason= #{rejectReason}, flag = #{flag}, where id = #{id} and merchant_id = #{merchantId} UPDATE `zdy_eatery_product` SET `status` = 'down' where merchant_id = #{merchantId} UPDATE `zdy_eatery_product` SET `status` = #{status} where id = #{id} and merchant_id = #{merchantId} UPDATE `zdy_eatery_product` SET `status` = 'down' where id in #{productId} and merchant_id = #{merchantId} update zdy_eatery_product SET `delete_flag` = '1' where id = #{id} and merchant_id = #{merchantId} delete from zdy_eatery_product where id in #{id} delete from zdy_eatery_product_specs where product_id in #{productId} delete from zdy_eatery_product_specs where product_id = #{productId} insert into zdy_eatery_product_specs ( id , product_id , name , price , create_by , create_time , update_by , update_time , remark , merchant_id) values ( #{item.id }, #{item.productId }, #{item.name }, #{item.price }, #{item.createBy }, #{item.createTime }, #{item.updateBy }, #{item.updateTime }, #{item.remark }, #{item.merchantId }) update zdy_eatery_product SET `delete_flag` = 1 where merchant_id in #{deptId} delete zdy_eatery_product where merchant_id in #{deptId}