|  | @@ -3,6 +3,7 @@ package com.ym.mec.web.controller.education;
 | 
	
		
			
				|  |  |  import com.ym.mec.auth.api.client.SysUserFeignService;
 | 
	
		
			
				|  |  |  import com.ym.mec.auth.api.entity.SysUser;
 | 
	
		
			
				|  |  |  import com.ym.mec.biz.dal.dao.EmployeeDao;
 | 
	
		
			
				|  |  | +import com.ym.mec.biz.dal.dao.PracticeGroupDao;
 | 
	
		
			
				|  |  |  import com.ym.mec.biz.dal.dao.TeacherDao;
 | 
	
		
			
				|  |  |  import com.ym.mec.biz.dal.dto.PracticeGroupBuyDto;
 | 
	
		
			
				|  |  |  import com.ym.mec.biz.dal.entity.Employee;
 | 
	
	
		
			
				|  | @@ -22,10 +23,7 @@ import org.springframework.beans.factory.annotation.Autowired;
 | 
	
		
			
				|  |  |  import org.springframework.http.HttpStatus;
 | 
	
		
			
				|  |  |  import org.springframework.web.bind.annotation.*;
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | -import java.util.ArrayList;
 | 
	
		
			
				|  |  | -import java.util.Arrays;
 | 
	
		
			
				|  |  | -import java.util.List;
 | 
	
		
			
				|  |  | -import java.util.Objects;
 | 
	
		
			
				|  |  | +import java.util.*;
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  /**
 | 
	
		
			
				|  |  |   * @Author Joburgess
 | 
	
	
		
			
				|  | @@ -49,6 +47,8 @@ public class EduPracticeGroupController extends BaseController {
 | 
	
		
			
				|  |  |      @Autowired
 | 
	
		
			
				|  |  |      private SysUserFeignService sysUserFeignService;
 | 
	
		
			
				|  |  |      @Autowired
 | 
	
		
			
				|  |  | +    private PracticeGroupDao practiceGroupDao;
 | 
	
		
			
				|  |  | +    @Autowired
 | 
	
		
			
				|  |  |      private TeacherCourseRewardService teacherCourseRewardService;
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |      List<Integer> excludeOrganIds=new ArrayList<>(Arrays.asList(new Integer[]{36}));
 | 
	
	
		
			
				|  | @@ -122,6 +122,22 @@ public class EduPracticeGroupController extends BaseController {
 | 
	
		
			
				|  |  |          return succeed(practiceGroupService.findUserLatestPracticeGroup(studentId,groupId));
 | 
	
		
			
				|  |  |      }
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | +    @ApiOperation("检测学生是否是新用户")
 | 
	
		
			
				|  |  | +    @GetMapping(value = "/isNewStudent")
 | 
	
		
			
				|  |  | +    public HttpResponseResult isNewStudent(Integer studentId){
 | 
	
		
			
				|  |  | +        SysUser sysUser = sysUserFeignService.queryUserInfo();
 | 
	
		
			
				|  |  | +        if (sysUser == null) {
 | 
	
		
			
				|  |  | +            return failed(HttpStatus.FORBIDDEN, "请登录");
 | 
	
		
			
				|  |  | +        }
 | 
	
		
			
				|  |  | +        if(Objects.isNull(studentId)){
 | 
	
		
			
				|  |  | +            throw new BizException("请指定学生");
 | 
	
		
			
				|  |  | +        }
 | 
	
		
			
				|  |  | +        int studentExitChargePractices = practiceGroupDao.checkStudentExitChargePractice(studentId);
 | 
	
		
			
				|  |  | +        Map<String, Integer> result=new HashMap<>();
 | 
	
		
			
				|  |  | +        result.put("isNewStudent", studentExitChargePractices<=0?0:1);
 | 
	
		
			
				|  |  | +        return succeed(result);
 | 
	
		
			
				|  |  | +    }
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  |      @ApiOperation("陪练课购买")
 | 
	
		
			
				|  |  |      @PostMapping(value = "/buyPracticeGroup")
 | 
	
		
			
				|  |  |      public HttpResponseResult buyPracticeGroup(@RequestBody PracticeGroupBuyDto practiceGroupBuyParams){
 |