| 
					
				 | 
			
			
				@@ -20,6 +20,8 @@ import org.springframework.validation.annotation.Validated; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import cn.newfeifan.mall.framework.common.util.object.BeanUtils; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+import java.util.HashMap; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import static cn.newfeifan.mall.framework.common.exception.util.ServiceExceptionUtil.exception; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import static cn.newfeifan.mall.module.enums.ErrorCodeConstants.MERCHANT_NOT_EXISTS; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import static cn.newfeifan.mall.module.system.enums.ErrorCodeConstants.USER_MOBILE_EXISTS; 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -46,13 +48,13 @@ public class MerchantServiceImpl implements MerchantService { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     @Override 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     @Transactional(rollbackFor = Exception.class) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    public Long createMerchant(MerchantSaveReqVO createReqVO) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    public HashMap<String, Long> createMerchant(MerchantSaveReqVO createReqVO) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         // 插入 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         MerchantDO merchant = BeanUtils.toBean(createReqVO, MerchantDO.class); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         merchantMapper.insert(merchant); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         // 创建一个店铺 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        shopService.createShop(merchant); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        Long shopId = shopService.createShop(merchant); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         // 创建商户的时候, 根据手机号, 创建一个新的账号 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         // 如果这个手机号已经存在, 则提示该手机号已经存在 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         AdminUserDO adminUserDO = userMapper.selectByMobile(merchant.getContactNumber()); 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -61,7 +63,10 @@ public class MerchantServiceImpl implements MerchantService { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         adminUserService.createUserByMobile(merchant.getId(), merchant.getContactNumber(), merchant.getContact()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         // todo 设置直推人关联关系 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        return merchant.getId(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        HashMap<String, Long> stringLongHashMap = new HashMap<>(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        stringLongHashMap.put("shopId", shopId); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        stringLongHashMap.put("merId", merchant.getId()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        return stringLongHashMap; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     @Override 
			 |