select epa.id, epa.type, epa.name, epa.price_markup, epa.enable, epa.sort, epa.application_scope, epa.application_scope_id, epa.create_by, epa.create_time, epa.update_by, epa.update_time, epa.remark, epa.merchant_id from zdy_eatery_product_attribute epa left join sys_dept d on epa.merchant_id = d.dept_id insert into zdy_eatery_product_attribute type, name, price_markup, enable, application_scope, application_scope_id, create_by, create_time, update_by, update_time, remark, merchant_id, sort, #{type}, #{name}, #{priceMarkup}, #{enable}, #{applicationScope}, #{applicationScopeId}, #{createBy}, #{createTime}, #{updateBy}, #{updateTime}, #{remark}, #{merchantId}, #{sort}, update zdy_eatery_product_attribute type = #{type}, name = #{name}, price_markup = #{priceMarkup}, enable = #{enable}, application_scope = #{applicationScope}, application_scope_id = #{applicationScopeId}, create_by = #{createBy}, create_time = #{createTime}, update_by = #{updateBy}, update_time = #{updateTime}, remark = #{remark}, sort = #{sort}, where id = #{id} and merchant_id = #{merchantId} delete from zdy_eatery_product_attribute where id = #{id} and merchant_id = #{merchantId} delete from zdy_eatery_product_attribute where id in #{id} delete from zdy_eatery_product_attribute where merchant_id in #{deptId}