| 
					
				 | 
			
			
				@@ -168,7 +168,7 @@ public class GoodsServiceImpl implements GoodsService { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         goods.setAttributeCategory(categoryDao.queryObject(goods.getCategoryId()).getParentId()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         goods.setAddTime(new Date()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        goods.setIsDelete(0); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        goods.setIsDelete(Integer.parseInt(Dict.isDelete.item_0.getItem())); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         goods.setIsNew(0); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         goods.setCreateUserId(user.getUserId()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         goods.setUpdateUserId(user.getUserId()); 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -309,7 +309,7 @@ public class GoodsServiceImpl implements GoodsService { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             goods.setIsHot(0); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         goods.setAttributeCategory(categoryDao.queryObject(goods.getCategoryId()).getParentId()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        goods.setIsDelete(0); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        goods.setIsDelete(Integer.parseInt(Dict.isDelete.item_0.getItem())); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         goods.setIsNew(0); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         goods.setUpdateUserId(user.getUserId()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         goods.setUpdateTime(new Date()); 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -384,32 +384,33 @@ public class GoodsServiceImpl implements GoodsService { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             goodsSpecification = goodsSpecificationDao.queryByGoodsId(goods.getId()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             goodsSpecification.setValue(goods.getCiqProdModel()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             goodsSpecificationDao.update(goodsSpecification); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        if(product == null){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            product = new ProductEntity(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            product.setGoodsSn(goods.getGoodsSn()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            product.setGoodsSpecificationNameValue(goodsSpecification.getValue()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            product.setGoodsSpecificationIds(goodsSpecification.getSpecificationId()+""); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            product.setGoodsId(goods.getId()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            product.setGoodsNumber(goods.getGoodsNumber()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            product.setGoodsDefault(0); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            return productDao.save(product); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        }else{ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            product.setGoodsSpecificationNameValue(goodsSpecification.getValue()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            return productDao.update(product); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            if(product == null){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                product = new ProductEntity(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                product.setGoodsSn(goods.getGoodsSn()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                product.setGoodsSpecificationNameValue(goodsSpecification.getValue()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                product.setGoodsSpecificationIds(goodsSpecification.getId()+""); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                product.setGoodsId(goods.getId()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                product.setGoodsNumber(goods.getGoodsNumber()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                product.setGoodsDefault(0); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                return productDao.save(product); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            }else{ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                product.setGoodsSpecificationIds(goodsSpecification.getId().toString()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                product.setGoodsSpecificationNameValue(goodsSpecification.getValue()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                return productDao.update(product); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        return 1; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     @Override 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     public int delete(Integer id) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         SysUserEntity user = ShiroUtils.getUserEntity(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         GoodsEntity goodsEntity = goodsDao.queryObject(id); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        goodsEntity.setIsDelete(1); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        goodsEntity.setIsOnSale(0); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        goodsEntity.setIsDelete(Integer.parseInt(Dict.isDelete.item_1.getItem())); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        goodsEntity.setIsOnSale(Integer.parseInt(Dict.isOnSale.item_0.getItem())); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         goodsEntity.setUpdateUserId(user.getUserId()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         goodsEntity.setUpdateTime(new Date()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        //更新团购 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         Map params = new HashMap(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         params.put("goodsId", id); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         List<GoodsGroupEntity> groupVos = goodsGroupDao.queryList(params); 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -439,8 +440,8 @@ public class GoodsServiceImpl implements GoodsService { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         int result = 0; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         for (Integer id : ids) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             GoodsEntity goodsEntity = queryObject(id); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            goodsEntity.setIsDelete(0); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            goodsEntity.setIsOnSale(1); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            goodsEntity.setIsDelete(Integer.parseInt(Dict.isDelete.item_0.getItem())); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            goodsEntity.setIsOnSale(Integer.parseInt(Dict.isOnSale.item_1.getItem())); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             goodsEntity.setUpdateUserId(user.getUserId()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             goodsEntity.setUpdateTime(new Date()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             result += goodsDao.update(goodsEntity); 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -455,7 +456,8 @@ public class GoodsServiceImpl implements GoodsService { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         if (1 == goodsEntity.getIsOnSale()) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             throw new RRException("此商品已处于上架状态!"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        goodsEntity.setIsOnSale(1); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        goodsEntity.setIsOnSale(Integer.parseInt(Dict.isOnSale.item_1.getItem())); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        goodsEntity.setIsDelete(Integer.parseInt(Dict.isDelete.item_0.getItem())); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         goodsEntity.setUpdateUserId(user.getUserId()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         goodsEntity.setUpdateTime(new Date()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         return goodsDao.update(goodsEntity); 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -468,7 +470,7 @@ public class GoodsServiceImpl implements GoodsService { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         if (0 == goodsEntity.getIsOnSale()) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             throw new RRException("此商品已处于下架状态!"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        goodsEntity.setIsOnSale(0); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        goodsEntity.setIsOnSale(Integer.parseInt(Dict.isOnSale.item_0.getItem())); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         goodsEntity.setUpdateUserId(user.getUserId()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         goodsEntity.setUpdateTime(new Date()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         return goodsDao.update(goodsEntity); 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -480,7 +482,7 @@ public class GoodsServiceImpl implements GoodsService { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         SysUserEntity user = ShiroUtils.getUserEntity(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         for (Integer id : ids) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             GoodsEntity goodsEntity = queryObject(id); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            goodsEntity.setIsOnSale(1); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            goodsEntity.setIsOnSale(Integer.parseInt(Dict.isOnSale.item_1.getItem())); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             goodsEntity.setUpdateUserId(user.getUserId()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             goodsEntity.setUpdateTime(new Date()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             result += goodsDao.update(goodsEntity); 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -494,7 +496,7 @@ public class GoodsServiceImpl implements GoodsService { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         SysUserEntity user = ShiroUtils.getUserEntity(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         for (Integer id : ids) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             GoodsEntity goodsEntity = queryObject(id); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            goodsEntity.setIsOnSale(0); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            goodsEntity.setIsOnSale(Integer.parseInt(Dict.isOnSale.item_0.getItem())); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             goodsEntity.setUpdateUserId(user.getUserId()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             goodsEntity.setUpdateTime(new Date()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             result += goodsDao.update(goodsEntity); 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -679,7 +681,7 @@ public class GoodsServiceImpl implements GoodsService { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 goodsEntity.setCusGoodsCode(goodsDto.getCusGoodsCode()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 goodsEntity.setCusRecCode(goodsDto.getCusRecCode()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 goodsEntity.setCiqProdModel(goodsDto.getCiqProdModel()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                goodsEntity.setIsDelete(0); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                goodsEntity.setIsDelete(Integer.parseInt(Dict.isDelete.item_0.getItem())); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 goodsEntity.setIsNew(0); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 goodsEntity.setUpdateUserId(user.getUserId()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 goodsEntity.setAddTime(new Date()); 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -715,7 +717,7 @@ public class GoodsServiceImpl implements GoodsService { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                         // 添加商品规格 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                         GoodsSpecificationEntity specificationEntity = goodsSpecificationDao.queryByGoodsId(goodsEntity.getId()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                         if(specificationEntity ==null) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                            goodsSpecification.setGoodsId(goodsEntity.getId() ); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                            goodsSpecification.setGoodsId(goodsEntity.getId()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                             goodsSpecification.setValue(goodsEntity.getCiqProdModel()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                             goodsSpecification.setSpecificationId(1); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                             goodsSpecificationDao.save(goodsSpecification); 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -729,12 +731,13 @@ public class GoodsServiceImpl implements GoodsService { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                         product = new ProductEntity(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                         product.setGoodsSn(goodsDto.getGoodsSn()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                         product.setGoodsSpecificationNameValue(goodsSpecification.getValue()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                        product.setGoodsSpecificationIds(goodsSpecification.getSpecificationId()+""); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                        product.setGoodsSpecificationIds(goodsSpecification.getId().toString()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                         product.setGoodsId(goodsEntity.getId()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                         product.setGoodsDefault(0); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                         product.setGoodsNumber(goodsEntity.getGoodsNumber()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                         productDao.save(product); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                     }else{ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                        product.setGoodsSpecificationIds(goodsSpecification.getId().toString()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                         product.setGoodsSpecificationNameValue(goodsSpecification.getValue()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                         productDao.update(product); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                     } 
			 |