| 
					
				 | 
			
			
				@@ -1,14 +1,5 @@ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 package com.ym.mec.auth.service.impl; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-import java.util.Date; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-import java.util.List; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				- 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-import org.apache.commons.lang3.StringUtils; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-import org.springframework.beans.factory.annotation.Autowired; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-import org.springframework.beans.factory.annotation.Value; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-import org.springframework.stereotype.Service; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-import org.springframework.transaction.annotation.Transactional; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				- 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import com.ym.mec.auth.api.dto.SysUserInfo; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import com.ym.mec.auth.api.entity.SysUser; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import com.ym.mec.auth.api.enums.YesOrNoEnum; 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -20,20 +11,25 @@ import com.ym.mec.common.dal.BaseDAO; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import com.ym.mec.common.entity.ImResult; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import com.ym.mec.common.entity.ImUserModel; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import com.ym.mec.common.exception.BizException; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-import com.ym.mec.common.service.IdGeneratorService; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import com.ym.mec.common.service.impl.BaseServiceImpl; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import com.ym.mec.im.ImFeignService; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import com.ym.mec.web.WebFeignService; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+import org.apache.commons.lang3.StringUtils; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+import org.springframework.beans.factory.annotation.Autowired; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+import org.springframework.beans.factory.annotation.Value; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+import org.springframework.stereotype.Service; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+import org.springframework.transaction.annotation.Transactional; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+import java.util.Date; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+import java.util.List; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 @Service 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 public class SysUserServiceImpl extends BaseServiceImpl<Integer, SysUser> implements SysUserService { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 	@Autowired 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 	private SysUserDao sysUserDao; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				- 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 	@Autowired 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 	private SysUserRoleService sysUserRoleService; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				- 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 	@Autowired 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 	private SysRoleMenuService sysRoleMenuService; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 	@Autowired 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -42,8 +38,6 @@ public class SysUserServiceImpl extends BaseServiceImpl<Integer, SysUser> implem 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 	private WebFeignService userFeignService; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 	@Autowired 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 	private SysUserService sysUserService; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-	@Autowired 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-	private IdGeneratorService smsCodeService; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 	@Value("${auth.sysconfig.tenantId}") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 	private Integer lesseeOrganId; 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -158,14 +152,15 @@ public class SysUserServiceImpl extends BaseServiceImpl<Integer, SysUser> implem 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 			SysUser sysUser = new SysUser(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 			sysUser.setPhone(phone); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 			sysUser.setUserType("TEACHER"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+			sysUser.setTenantId(tenantId); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 			sysUserDao.insert(sysUser); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 			//添加用户现金账户 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 			imFeignService.register(new ImUserModel(sysUser.getId().toString(),phone,null)); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-			userFeignService.createCashAccount(sysUser.getId()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+			userFeignService.createCashAccount(sysUser.getId(),tenantId); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 			//sysTenantAccount 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 			sysUserDao.insertSysTenantAccount(sysUser.getId()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 			//创建teacher表 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-			sysUserDao.insertTeacher(sysUser.getId(),lesseeOrganId); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+			sysUserDao.insertTeacher(sysUser.getId(),lesseeOrganId,tenantId); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 			return queryUserInfoByPhone(phone); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		}else if(StringUtils.equalsIgnoreCase(clientId,"STUDENT")){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 			SysUser sysUser = new SysUser(); 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -176,16 +171,12 @@ public class SysUserServiceImpl extends BaseServiceImpl<Integer, SysUser> implem 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 			}else{ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 				sysUser.setOrganId(Integer.parseInt(organId)); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 			} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-			//注册是否赠送会员 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-			if(sysUser.getOrganId() == 59){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-			} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-			 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+			sysUser.setTenantId(tenantId); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 			sysUserDao.insert(sysUser); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-			sysUserService.saveStudent(sysUser.getId()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+			sysUserService.saveStudent(sysUser.getId(),tenantId); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 			//添加用户现金账户 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 			imFeignService.register(new ImUserModel(sysUser.getId().toString(),phone,null)); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-			userFeignService.createCashAccount(sysUser.getId()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+			userFeignService.createCashAccount(sysUser.getId(),tenantId); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 			return queryUserInfoByPhone(phone); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 		return null; 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -198,13 +189,13 @@ public class SysUserServiceImpl extends BaseServiceImpl<Integer, SysUser> implem 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 	} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 	@Override 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-	public void saveStudent(Integer userId) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-		sysUserDao.saveStudent(userId); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+	public void saveStudent(Integer userId,Integer tenantId) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+		sysUserDao.saveStudent(userId,tenantId); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 	} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 	@Override 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-	public void saveTeacher(Integer userId) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-		sysUserDao.insertTeacher(userId, lesseeOrganId); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+	public void saveTeacher(Integer userId,Integer tenantId) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+		sysUserDao.insertTeacher(userId, lesseeOrganId,tenantId); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 	} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 	@Override 
			 |