INSERT INTO sys_instore_detail (
			ID,
			INSTORE_ID,
			SKU_ID,
			AMOUNT,
			PRICE,
			PRICE_TOTAL,
			REMARK,
			UNIT,
			YWSTATUS,
			batch
		)
	VALUES (
			#{id},
			#{instoreId},
			#{skuId},
			#{amount},
			#{price},
			#{priceTotal},
			#{remark},
			#{unit},
			#{ywstatus},
			#{batch}
	)
	
	
	
	
		INSERT INTO sys_instore_detail (
				ID,
			INSTORE_ID,
			SKU_ID,
			AMOUNT,
			PRICE,
			PRICE_TOTAL,
			REMARK,
			UNIT,
			YWSTATUS,
		batch
		)
	VALUES 
	(
			#{item.id},
			#{item.instoreId},
			#{item.skuId},
			#{item.amount},
			#{item.price},
			#{item.priceTotal},
			#{item.remark},
			#{item.unit},
			#{item.ywstatus},
			#{item.batch}
	)
	
	
	
	
	
		UPDATE sys_instore_detail
		
				
					INSTORE_ID = #{instoreId},
						
				
					SKU_ID = #{skuId},
						
				
					AMOUNT = #{amount},
						
				
					PRICE = #{price},
						
				
					PRICE_TOTAL = #{priceTotal},
				
				
					UNIT = #{unit},
				
				
					YWSTATUS = #{ywstatus},
				
				
					batch = #{batch},
				
		
		WHERE ID=#{id} 
	
	
	
	
	
	
		delete from sys_instore_detail where  ID in
		
			#{item}
		
	
		
	
	
		DELETE FROM sys_instore_detail
		where  ID=#{id} 
	
	
	
	
		delete from sys_instore_detail where  INSTORE_ID=#{id}