| 
					
				 | 
			
			
				@@ -5,7 +5,6 @@ import com.alibaba.fastjson.JSON; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import com.google.common.collect.ImmutableBiMap; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import com.google.common.collect.Lists; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import com.google.common.collect.Maps; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-import com.google.gson.Gson; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import com.kmall.admin.dao.*; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import com.kmall.admin.dto.GoodsDetailsDto; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import com.kmall.admin.dto.GoodsDto; 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -1016,8 +1015,8 @@ public class GoodsServiceImpl implements GoodsService { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                         goodsEntity.setGoodsNumber(goods.getGoodsNumber()+Integer.parseInt(goodsDto.getGoodsNumber())); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                         // TODO 这里改成批量修改 GoodsEntity 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                        updateGoodsList.add(goodsEntity); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-//                        goodsDao.update(goodsEntity); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+//                        updateGoodsList.add(goodsEntity); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                        goodsDao.update(goodsEntity); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                     }else{ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                         mngChangeEntity.setOriginalNum(0);//原库存数 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                         mngChangeEntity.setValidNum(Integer.parseInt(goodsDto.getGoodsNumber()));//可用数 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -1159,16 +1158,16 @@ public class GoodsServiceImpl implements GoodsService { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                     goodsSpecificationDao.updateBatch(updateSpecificationList); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            if(updateGoodsList != null && updateGoodsList.size() > 0 ){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                if(updateGoodsList.size() > 50){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                    List<List<GoodsEntity>> partition = Lists.partition(updateGoodsList, 50); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                    for (List<GoodsEntity> goodsEntities : partition) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                        goodsDao.updateBatch(goodsEntities); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                }else{ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                    goodsDao.updateBatch(updateGoodsList); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+//            if(updateGoodsList != null && updateGoodsList.size() > 0 ){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+//                if(updateGoodsList.size() > 50){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+//                    List<List<GoodsEntity>> partition = Lists.partition(updateGoodsList, 50); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+//                    for (List<GoodsEntity> goodsEntities : partition) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+//                        goodsDao.updateBatch(goodsEntities); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+//                    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+//                }else{ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+//                    goodsDao.updateBatch(updateGoodsList); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+//                } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+//            } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -2022,7 +2021,7 @@ public class GoodsServiceImpl implements GoodsService { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     public void syncGoodsRate() { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         String storeId = "163"; // 市场部说所有门店价格一致,并且活动一致,可直接取其中一个门店价格进行计算税率 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         // 查询出所有商品 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        List<GoodsEntity> allGoodsList = goodsDao.queryAllList(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        List<GoodsEntity> allGoodsList = goodsDao.queryAllList(null,null); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         for (GoodsEntity goodsEntity : allGoodsList) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             // 同步过海关商品编码才可以算税率 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             if ("1".equals(goodsEntity.getIsSyncHsCode())) { 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -2086,8 +2085,8 @@ public class GoodsServiceImpl implements GoodsService { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     @Override 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    public List<GoodsEntity> queryAllList() { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        return goodsDao.queryAllList(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    public List<GoodsEntity> queryAllList(Integer page,Integer pageSize) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        return goodsDao.queryAllList(page,pageSize); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     private void calculeatePromotion(SysUserEntity user, GoodsEntity goods, List<Map<String, String>> errorPriceSkuList, List<ShopErrorPriceRecordEntity> shopErrorPriceRecordEntities) { 
			 |