优化修改sku时,如存在sku则不新增
This commit is contained in:
		
							parent
							
								
									7ca351f7cd
								
							
						
					
					
						commit
						46f1fcc269
					
				| @ -162,7 +162,13 @@ public class GoodsSkuServiceImpl extends ServiceImpl<GoodsSkuMapper, GoodsSku> i | ||||
|         } else { | ||||
|             newSkuList = new ArrayList<>(); | ||||
|             for (Map<String, Object> map : skuList) { | ||||
|                 GoodsSku sku = new GoodsSku(); | ||||
|                 GoodsSku sku = null; | ||||
|                 if (map.get("id") != null) { | ||||
|                     sku = this.getGoodsSkuByIdFromCache(map.get("id").toString()); | ||||
|                 } | ||||
|                 if (sku == null || map.get("id") == null) { | ||||
|                     sku = new GoodsSku(); | ||||
|                 } | ||||
|                 //设置商品信息 | ||||
|                 goodsInfo(sku, goods); | ||||
|                 //设置商品规格信息 | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 paulGao
						paulGao