|
@@ -232,14 +232,17 @@ public class PracticeGroupController extends BaseController {
|
|
|
}
|
|
|
int studentExitChargePractices = practiceGroupDao.checkStudentExitChargePractice(sysUser.getId(),"2021-03-09 00:00:00");
|
|
|
Student student = studentDao.get(sysUser.getId());
|
|
|
+ if(student == null){
|
|
|
+ throw new BizException("学员信息不存在");
|
|
|
+ }
|
|
|
Map<String, Integer> result=new HashMap<>();
|
|
|
result.put("organId", sysUser.getOrganId());
|
|
|
result.put("isNewStudent", studentExitChargePractices<=0?0:1);
|
|
|
|
|
|
List<PracticeGroup> userStatusPracticeGroups = practiceGroupDao.findUserStatusPracticeGroups(sysUser.getId(), null, PracticeGroupType.COME_ON_PACKAGE);
|
|
|
long normalGroupNum = userStatusPracticeGroups.stream().filter(p -> GroupStatusEnum.NORMAL.equals(p.getGroupStatus())).count();
|
|
|
-
|
|
|
- result.put("comeOnPackage", 1==student.getComeOnPackage()&&normalGroupNum<=0?1:0);
|
|
|
+ int comeOnPackage = student.getComeOnPackage()==null?0:student.getComeOnPackage();
|
|
|
+ result.put("comeOnPackage", 1==comeOnPackage&&normalGroupNum<=0?1:0);
|
|
|
return succeed(result);
|
|
|
}
|
|
|
|