INSERT INTO sys_allot_detail (
		
			ID,
		
		ALLOT_ID,
		SKU_ID,
		APP_TOTAL,
		REAL_TOTAL,
		REMARK,
		receive_total,
		wholesale,
		store_id
		)
		VALUES (
		
			#{id},
		
		#{allotId},
		#{skuId},
		#{appTotal},
		#{realTotal},
		#{remark},
		#{receiveTotal},
		#{wholesale},
		#{storeId}
		)
	
	
	
		INSERT INTO sys_allot_detail (
		ID,
		ALLOT_ID,
		SKU_ID,
		APP_TOTAL,
		REAL_TOTAL,
		REMARK,
		receive_total,
		wholesale,
		store_id
		)
		VALUES
		(
			#{item.id},
			#{item.allotId},
			#{item.skuId},
			#{item.appTotal},
			#{item.realTotal},
			#{item.remark},
			#{item.receiveTotal},
			#{item.wholesale},
			#{item.storeId}
			)
	
	
	
		UPDATE sys_allot_detail
		
			
				ALLOT_ID = #{allotId},
			
			
				SKU_ID = #{skuId},
			
			
				APP_TOTAL = #{appTotal},
			
			
				REAL_TOTAL = #{realTotal},
			
			
				REMARK = #{remark},
			
			
				receive_total = #{receiveTotal},
			
			
				wholesale = #{wholesale},
			
			
				store_id = #{storeId},
			
		
		WHERE ID=#{id}
	
	
	
		delete from sys_allot_detail where  ID in
		
			#{item}
		
	
	
	
		DELETE FROM sys_allot_detail
		where  ID=#{id}
	
	
	
		DELETE FROM sys_allot_detail
		where allot_id=#{id}
	
	
	
		delete from sys_allot_detail where  ID in
		
			#{item.id}