| 
					
				 | 
			
			
				@@ -3,7 +3,11 @@ package cn.newfeifan.mall.sale.service.merchant; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import cn.newfeifan.mall.framework.common.exception.ErrorCode; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import cn.newfeifan.mall.framework.common.pojo.PageResult; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import cn.newfeifan.mall.framework.common.util.json.JsonUtils; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+import cn.newfeifan.mall.module.product.controller.admin.spu.vo.ProductSpuUpdateStatusReqVO; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+import cn.newfeifan.mall.module.product.dal.dataobject.spuapply.SpuApplyDO; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+import cn.newfeifan.mall.module.product.enums.spu.ProductSpuStatusEnum; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import cn.newfeifan.mall.module.product.service.sku.ProductSkuService; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+import cn.newfeifan.mall.module.product.service.spuapply.SpuApplyService; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import cn.newfeifan.mall.module.system.dal.dataobject.oauth2.OAuth2AccessTokenDO; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import cn.newfeifan.mall.module.system.dal.dataobject.user.AdminUserDO; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import cn.newfeifan.mall.module.system.dal.mysql.user.AdminUserMapper; 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -58,6 +62,8 @@ public class MerchantServiceImpl implements MerchantService { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     @Resource 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     private ShopService shopService; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     @Resource 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    private SpuApplyService spuApplyService; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    @Resource 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     private StringRedisTemplate stringRedisTemplate; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     @Override 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -106,7 +112,18 @@ public class MerchantServiceImpl implements MerchantService { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     @Override 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     public void deleteMerchant(Long id) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         // 校验存在 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        validateMerchantExists(id); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+//        validateMerchantExists(id); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        List<SpuApplyDO> spuApplyDOS = spuApplyService.selectListByMerId(id); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        spuApplyDOS.forEach(spuApplyDO -> { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        ProductSpuUpdateStatusReqVO build = new ProductSpuUpdateStatusReqVO().setId(spuApplyDO.getId()).setStatus(ProductSpuStatusEnum.DISABLE.getStatus()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            spuApplyService.updateSpuStatus(build); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        }); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+//        spuApplyDOS.forEach(spuApplyDO -> { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+//                    spuApplyService.deleteSpuApply(spuApplyDO.getId()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+//        }); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         // 删除 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         merchantMapper.deleteById(id); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     } 
			 |