|
@@ -267,9 +267,9 @@ public class StudentVisitServiceImpl extends BaseServiceImpl<Integer, StudentVis
|
|
|
} else {
|
|
|
objectMap.put(columnValue, row.get(s));
|
|
|
}
|
|
|
- } else if (columnValue.equals("studentId")) {
|
|
|
+ } else if (columnValue.equals("phone")) {
|
|
|
if (StringUtils.isEmpty(row.get(s).toString())) {
|
|
|
- sb.append("第" + rowNum).append("行数据导入失败:学员编号不可为空;");
|
|
|
+ sb.append("第" + rowNum).append("行数据导入失败:学员手机号不可为空;");
|
|
|
continue valueIsNull;
|
|
|
} else {
|
|
|
objectMap.put(columnValue, row.get(s));
|
|
@@ -311,6 +311,11 @@ public class StudentVisitServiceImpl extends BaseServiceImpl<Integer, StudentVis
|
|
|
}
|
|
|
try {
|
|
|
StudentVisit cost = JSONObject.parseObject(objectMap.toJSONString(), StudentVisit.class);
|
|
|
+ SysUser user = teacherDao.getUserWithPhone(cost.getPhone());
|
|
|
+ if(Objects.isNull(user) || !user.getUserType().contains("STUDENT")){
|
|
|
+ throw new BizException("手机号{}不存在",cost.getPhone());
|
|
|
+ }
|
|
|
+ cost.setStudentId(user.getId());
|
|
|
StudentRegistration studentRegistration = studentRegistrationDao.queryByUserIdAndMusicGroupId(cost.getStudentId(), cost.getMusicGroupId());
|
|
|
if(Objects.isNull(studentRegistration)){
|
|
|
throw new BizException("学员{}不在乐团{}中,无需回访",cost.getStudentId(),cost.getMusicGroupId());
|