mybatis 批量update运用case-when语句


		update t_scte_goods
		
			update_time=current_timestamp,
		  	
                
                    
                        when goods_id = #{item.goodsId} then #{item.sellState}
                    
                    
                        when goods_id = #{item.goodsId} then t_scte_goods.sell_state
                    
                
            
            
                 
                         when goods_id=#{item.goodsId} then #{item.updateTime}
                 
            
            
                
                    
                        when goods_id = #{item.goodsId} then #{item.price}
                    
                    
                        when goods_id = #{item.goodsId} then t_scte_goods.price
                    
                
            
		
		where goods_id in 
			
				#{item.goodsId}
			 
	

你可能感兴趣的:(MyBatis)