|  | @@ -1,12 +1,67 @@
 | 
	
		
			
				|  |  |  package com.ym.mec.biz.service.impl;
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | +import java.util.ArrayList;
 | 
	
		
			
				|  |  | +import java.util.Arrays;
 | 
	
		
			
				|  |  | +import java.util.HashMap;
 | 
	
		
			
				|  |  | +import java.util.List;
 | 
	
		
			
				|  |  | +import java.util.Map;
 | 
	
		
			
				|  |  | +import java.util.Objects;
 | 
	
		
			
				|  |  | +import java.util.Set;
 | 
	
		
			
				|  |  | +import java.util.stream.Collectors;
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +import org.apache.commons.lang3.StringUtils;
 | 
	
		
			
				|  |  | +import org.springframework.beans.factory.annotation.Autowired;
 | 
	
		
			
				|  |  | +import org.springframework.stereotype.Service;
 | 
	
		
			
				|  |  | +import org.springframework.transaction.annotation.Transactional;
 | 
	
		
			
				|  |  | +import org.springframework.util.CollectionUtils;
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  |  import com.ym.mec.auth.api.client.SysUserFeignService;
 | 
	
		
			
				|  |  |  import com.ym.mec.auth.api.entity.SysUser;
 | 
	
		
			
				|  |  | -import com.ym.mec.biz.dal.dao.*;
 | 
	
		
			
				|  |  | -import com.ym.mec.biz.dal.dto.*;
 | 
	
		
			
				|  |  | -import com.ym.mec.biz.dal.entity.*;
 | 
	
		
			
				|  |  | +import com.ym.mec.biz.dal.dao.ClassGroupDao;
 | 
	
		
			
				|  |  | +import com.ym.mec.biz.dal.dao.CourseScheduleStudentPaymentDao;
 | 
	
		
			
				|  |  | +import com.ym.mec.biz.dal.dao.MusicGroupDao;
 | 
	
		
			
				|  |  | +import com.ym.mec.biz.dal.dao.MusicGroupQuitDao;
 | 
	
		
			
				|  |  | +import com.ym.mec.biz.dal.dao.MusicGroupStudentFeeDao;
 | 
	
		
			
				|  |  | +import com.ym.mec.biz.dal.dao.OrganizationDao;
 | 
	
		
			
				|  |  | +import com.ym.mec.biz.dal.dao.StudentDao;
 | 
	
		
			
				|  |  | +import com.ym.mec.biz.dal.dao.StudentExtracurricularExercisesSituationDao;
 | 
	
		
			
				|  |  | +import com.ym.mec.biz.dal.dao.StudentManageDao;
 | 
	
		
			
				|  |  | +import com.ym.mec.biz.dal.dao.StudentPaymentOrderDao;
 | 
	
		
			
				|  |  | +import com.ym.mec.biz.dal.dao.StudentRegistrationDao;
 | 
	
		
			
				|  |  | +import com.ym.mec.biz.dal.dao.SubjectChangeDao;
 | 
	
		
			
				|  |  | +import com.ym.mec.biz.dal.dao.SysUserCashAccountDao;
 | 
	
		
			
				|  |  | +import com.ym.mec.biz.dal.dao.TeacherDao;
 | 
	
		
			
				|  |  | +import com.ym.mec.biz.dal.dao.VipGroupDao;
 | 
	
		
			
				|  |  | +import com.ym.mec.biz.dal.dto.BasicUserDto;
 | 
	
		
			
				|  |  | +import com.ym.mec.biz.dal.dto.ConditionDto;
 | 
	
		
			
				|  |  | +import com.ym.mec.biz.dal.dto.MusicCardDto;
 | 
	
		
			
				|  |  | +import com.ym.mec.biz.dal.dto.MusicGroupStudentSignDto;
 | 
	
		
			
				|  |  | +import com.ym.mec.biz.dal.dto.MusicGroupStudentsDto;
 | 
	
		
			
				|  |  | +import com.ym.mec.biz.dal.dto.SimpleUserDto;
 | 
	
		
			
				|  |  | +import com.ym.mec.biz.dal.dto.Student4operating;
 | 
	
		
			
				|  |  | +import com.ym.mec.biz.dal.dto.StudentManageAccountBaseInfoDto;
 | 
	
		
			
				|  |  | +import com.ym.mec.biz.dal.dto.StudentManageBaseInfoOfMusicGroupDto;
 | 
	
		
			
				|  |  | +import com.ym.mec.biz.dal.dto.StudentManageCourseListDto;
 | 
	
		
			
				|  |  | +import com.ym.mec.biz.dal.dto.StudentManageListDto;
 | 
	
		
			
				|  |  | +import com.ym.mec.biz.dal.dto.StudentManageVipGroupClassDto;
 | 
	
		
			
				|  |  | +import com.ym.mec.biz.dal.dto.StudentManageVipGroupDto;
 | 
	
		
			
				|  |  | +import com.ym.mec.biz.dal.dto.StudentRegisterPerDto;
 | 
	
		
			
				|  |  | +import com.ym.mec.biz.dal.dto.UserGoodsDto;
 | 
	
		
			
				|  |  | +import com.ym.mec.biz.dal.entity.MusicGroupQuit;
 | 
	
		
			
				|  |  | +import com.ym.mec.biz.dal.entity.Student;
 | 
	
		
			
				|  |  | +import com.ym.mec.biz.dal.entity.StudentRegistration;
 | 
	
		
			
				|  |  | +import com.ym.mec.biz.dal.entity.SubjectChange;
 | 
	
		
			
				|  |  | +import com.ym.mec.biz.dal.entity.SysUserCashAccount;
 | 
	
		
			
				|  |  | +import com.ym.mec.biz.dal.entity.Teacher;
 | 
	
		
			
				|  |  |  import com.ym.mec.biz.dal.enums.YesOrNoEnum;
 | 
	
		
			
				|  |  | -import com.ym.mec.biz.dal.page.*;
 | 
	
		
			
				|  |  | +import com.ym.mec.biz.dal.page.MusicGroupStudentQueryInfo;
 | 
	
		
			
				|  |  | +import com.ym.mec.biz.dal.page.StudentManageAttendanceQueryInfo;
 | 
	
		
			
				|  |  | +import com.ym.mec.biz.dal.page.StudentManageCourseQueryInfo;
 | 
	
		
			
				|  |  | +import com.ym.mec.biz.dal.page.StudentManageQueryInfo;
 | 
	
		
			
				|  |  | +import com.ym.mec.biz.dal.page.StudentManageVipClassQueryInfo;
 | 
	
		
			
				|  |  | +import com.ym.mec.biz.dal.page.StudentOperatingQueryInfo;
 | 
	
		
			
				|  |  | +import com.ym.mec.biz.dal.page.StudentSignQueryInfo;
 | 
	
		
			
				|  |  | +import com.ym.mec.biz.dal.page.TeacherPaymentRecordInfo;
 | 
	
		
			
				|  |  |  import com.ym.mec.biz.service.StudentManageService;
 | 
	
		
			
				|  |  |  import com.ym.mec.biz.service.StudentService;
 | 
	
		
			
				|  |  |  import com.ym.mec.common.entity.ImResult;
 | 
	
	
		
			
				|  | @@ -15,15 +70,6 @@ import com.ym.mec.common.exception.BizException;
 | 
	
		
			
				|  |  |  import com.ym.mec.common.page.PageInfo;
 | 
	
		
			
				|  |  |  import com.ym.mec.im.ImFeignService;
 | 
	
		
			
				|  |  |  import com.ym.mec.util.collection.MapUtil;
 | 
	
		
			
				|  |  | -import org.apache.commons.lang3.StringUtils;
 | 
	
		
			
				|  |  | -import org.apache.poi.ss.formula.functions.T;
 | 
	
		
			
				|  |  | -import org.springframework.beans.factory.annotation.Autowired;
 | 
	
		
			
				|  |  | -import org.springframework.stereotype.Service;
 | 
	
		
			
				|  |  | -import org.springframework.transaction.annotation.Transactional;
 | 
	
		
			
				|  |  | -import org.springframework.util.CollectionUtils;
 | 
	
		
			
				|  |  | -
 | 
	
		
			
				|  |  | -import java.util.*;
 | 
	
		
			
				|  |  | -import java.util.stream.Collectors;
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  /**
 | 
	
		
			
				|  |  |   * @Author Joburgess
 | 
	
	
		
			
				|  | @@ -473,24 +519,23 @@ public class StudentManageServiceImpl implements StudentManageService {
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |      @Override
 | 
	
		
			
				|  |  |      @Transactional(rollbackFor = Exception.class)
 | 
	
		
			
				|  |  | -    public int studentUpdate(SysUser sysUser) {
 | 
	
		
			
				|  |  | -        Integer userId = sysUser.getId();
 | 
	
		
			
				|  |  | -        if (userId == null || StringUtils.isEmpty(sysUser.getPhone())) {
 | 
	
		
			
				|  |  | +    public int studentUpdate(Student student) {
 | 
	
		
			
				|  |  | +        Integer userId = student.getId();
 | 
	
		
			
				|  |  | +        if (userId == null || StringUtils.isEmpty(student.getPhone())) {
 | 
	
		
			
				|  |  |              throw new BizException("参数校验失败");
 | 
	
		
			
				|  |  |          }
 | 
	
		
			
				|  |  | -        SysUser sysUser1 = sysUserFeignService.queryUserByMobile(sysUser.getPhone());
 | 
	
		
			
				|  |  | +        SysUser sysUser1 = sysUserFeignService.queryUserByMobile(student.getPhone());
 | 
	
		
			
				|  |  |          if (sysUser1 != null && !userId.equals(sysUser1.getId())) {
 | 
	
		
			
				|  |  |              throw new BizException("手机号已被占用");
 | 
	
		
			
				|  |  |          }
 | 
	
		
			
				|  |  | -        teacherDao.updateUser(sysUser);
 | 
	
		
			
				|  |  | -        Student student = new Student(userId, studentRegistrationDao.getSubjectIds(userId));
 | 
	
		
			
				|  |  | -        student.setOperatingTag(sysUser.getOperatingTag());
 | 
	
		
			
				|  |  | +        teacherDao.updateUser(student);
 | 
	
		
			
				|  |  | +        student.setOperatingTag(student.getOperatingTag());
 | 
	
		
			
				|  |  |          student.setOperatingTempTag(0);
 | 
	
		
			
				|  |  | -        student.setServiceTag(sysUser.getServiceTag() == 0 ? 2 : 1);
 | 
	
		
			
				|  |  | -        student.setTeacherId(sysUser.getTeacherId());
 | 
	
		
			
				|  |  | +        student.setServiceTag(student.getServiceTag() == 0 ? 2 : 1);
 | 
	
		
			
				|  |  | +        student.setTeacherId(student.getTeacherId());
 | 
	
		
			
				|  |  |          studentService.upSet(student);
 | 
	
		
			
				|  |  |          if (new Integer(2).equals(student.getServiceTag())) {
 | 
	
		
			
				|  |  | -            studentExtracurricularExercisesSituationDao.deleteByStudent(sysUser.getId());
 | 
	
		
			
				|  |  | +            studentExtracurricularExercisesSituationDao.deleteByStudent(student.getId());
 | 
	
		
			
				|  |  |          }
 | 
	
		
			
				|  |  |          return userId;
 | 
	
		
			
				|  |  |      }
 |