select goods_id, live_id, company_id, company_user_id,sales, store_id, product_id, create_time, create_by, update_by, update_time, remark, status, stock, sort,case when is_show = 1 then true else false end as is_show from live_goods insert into live_goods live_id, company_id, company_user_id, store_id, product_id, create_time, create_by, update_by, update_time, remark, status, stock, sort, is_show, sales, #{liveId}, #{companyId}, #{companyUserId}, #{storeId}, #{productId}, #{createTime}, #{createBy}, #{updateBy}, #{updateTime}, #{remark}, #{status}, #{stock}, #{sort}, #{isShow}, #{sales}, update live_goods live_id = #{liveId}, company_id = #{companyId}, company_user_id = #{companyUserId}, store_id = #{storeId}, product_id = #{productId}, create_time = #{createTime}, create_by = #{createBy}, update_by = #{updateBy}, update_time = #{updateTime}, remark = #{remark}, status = #{status}, stock = #{stock}, sort = #{sort}, is_show = #{isShow}, sales = #{sales}, where goods_id = #{goodsId} delete from live_goods where goods_id = #{goodsId} delete from live_goods where goods_id in #{goodsId} INSERT INTO live_goods ( live_id, company_id, company_user_id, product_id, create_time, create_by, update_by, update_time, remark, status, stock, sort, is_show,sales ) VALUES ( #{item.liveId}, #{item.companyId}, null, #{item.companyUserId}, null, #{item.productId}, #{item.createTime}, #{item.createBy}, #{item.updateBy}, #{item.updateTime}, #{item.remark}, #{item.status}, #{item.stock}, #{item.sort}, #{item.isShow}, #{item.sales} ) update live_goods set status = #{listVo.status} where goods_id in #{goodsId} delete from live_goods WHERE goods_id IN #{goodsId} update live_goods set status = #{listVo.status} where goods_id in #{goodsId} update live_goods set is_show = #{listVo.isShow} and status = 1 where goods_id in #{goodsId} delete from live_goods WHERE goods_id IN #{goodsId}