| 
					
				 | 
			
			
				@@ -543,16 +543,23 @@ public class StudentServiceImpl extends ServiceImpl<StudentDao, Student> impleme 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     @Transactional(rollbackFor = Exception.class) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     @Override 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     public void addStudent(StudentWrapper.Student student) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        // 更新头像 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        if (StringUtils.isEmpty(student.getAvatar())) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            String avatar; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            if (student.getGender().equals(1)) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                avatar = sysConfigService.findConfigValue(SysConfigConstant.DEFAULT_HEARD_BOY); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            } else { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                avatar = sysConfigService.findConfigValue(SysConfigConstant.DEFAULT_HEARD_GIRL); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            student.setAvatar(avatar); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         SysUser sysUser = employeeDao.querySysUserByPhone(student.getPhone()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         if (sysUser == null) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             sysUser = new SysUser(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             sysUser.setUserType(ClientEnum.STUDENT.getCode()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             sysUser.setGender(student.getGender()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             //设置默认头像 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            if (StringUtil.isEmpty(sysUser.getAvatar())) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                String defaultHeard = sysConfigService.findConfigValue(SysConfigConstant.DEFAULT_HEARD); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                sysUser.setAvatar(defaultHeard); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            sysUser.setAvatar(student.getAvatar()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             sysUser.setUsername(student.getName()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             sysUser.setPhone(student.getPhone()); 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -573,20 +580,6 @@ public class StudentServiceImpl extends ServiceImpl<StudentDao, Student> impleme 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         student.setId(sysUser.getId()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         Long tenantId = student.getTenantId(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        // 更新头像 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        if (StringUtils.isEmpty(student.getAvatar())) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            String avatar; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            if (tenantId != -1L) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                if (student.getGender().equals(1)) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                    avatar = sysConfigService.findConfigValue(SysConfigConstant.TENANT_STUDENT_BOY_AVATAR); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                } else { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                    avatar = sysConfigService.findConfigValue(SysConfigConstant.TENANT_STUDENT_GIRL_AVATAR); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            } else { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                avatar = sysConfigService.findConfigValue(SysConfigConstant.DEFAULT_HEARD); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            student.setAvatar(avatar); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         this.save(student); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         // 加好友 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -607,10 +600,14 @@ public class StudentServiceImpl extends ServiceImpl<StudentDao, Student> impleme 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         if (student == null) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             throw new BizException("学生信息不存在"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        String avatar = student.getAvatar(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        String avatar = studentInfo.getAvatar(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         if (StringUtils.isEmpty(avatar)) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            avatar = sysConfigService.findConfigValue(SysConfigConstant.TENANT_STUDENT_AVATAR); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            student.setAvatar(avatar); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            if (studentInfo.getGender().equals(1)) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                avatar = sysConfigService.findConfigValue(SysConfigConstant.DEFAULT_HEARD_BOY); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            } else { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                avatar = sysConfigService.findConfigValue(SysConfigConstant.DEFAULT_HEARD_GIRL); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            studentInfo.setAvatar(avatar); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         // 解绑 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 //        if (Boolean.FALSE.equals(studentInfo.getBindTenant())) { 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -639,23 +636,29 @@ public class StudentServiceImpl extends ServiceImpl<StudentDao, Student> impleme 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         com.yonge.cooleshow.biz.dal.entity.SysUser sysUser = sysUserMapper.selectById(studentInfo.getId()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         sysUser.setGender(studentInfo.getGender()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        sysUser.setAvatar(student.getAvatar()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         sysUserMapper.updateById(sysUser); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         return true; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     private Boolean createStudent(StudentWrapper.Student studentInfo) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        String avatar = studentInfo.getAvatar(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        if (StringUtils.isEmpty(avatar)) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            if (studentInfo.getGender().equals(1)) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                avatar = sysConfigService.findConfigValue(SysConfigConstant.DEFAULT_HEARD_BOY); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            } else { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                avatar = sysConfigService.findConfigValue(SysConfigConstant.DEFAULT_HEARD_GIRL); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            studentInfo.setAvatar(avatar); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         com.yonge.cooleshow.biz.dal.entity.SysUser sysUser = getOrCreateAccount(studentInfo); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         Student student = new Student(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         student.setUserId(sysUser.getId()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         student.setTenantId(studentInfo.getTenantId()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         student.setSubjectId(studentInfo.getSubjectId()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        student.setAvatar(studentInfo.getAvatar()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         student.setCreateTime(new Date()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         student.setLockFlag(UserLockFlag.NORMAL); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        String avatar = studentInfo.getAvatar(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        if (StringUtils.isEmpty(avatar)) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            avatar = sysConfigService.findConfigValue(SysConfigConstant.TENANT_STUDENT_AVATAR); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            student.setAvatar(avatar); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         save(student); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         return true; 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -688,7 +691,14 @@ public class StudentServiceImpl extends ServiceImpl<StudentDao, Student> impleme 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                     com.yonge.cooleshow.biz.dal.entity.SysUser.class); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             sysUser.setPhone(studentInfo.getPhone()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             if (StringUtils.isEmpty(studentInfo.getAvatar())) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                sysUser.setAvatar(sysConfigService.findConfigValue(SysConfigConstant.DEFAULT_HEARD)); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                //设置默认头像 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                String avatar; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                if (studentInfo.getGender().equals(1)) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    avatar = sysConfigService.findConfigValue(SysConfigConstant.DEFAULT_HEARD_BOY); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                } else { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    avatar = sysConfigService.findConfigValue(SysConfigConstant.DEFAULT_HEARD_GIRL); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                sysUser.setAvatar(avatar); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             } else { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 sysUser.setAvatar(studentInfo.getAvatar()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             } 
			 |