|
@@ -4,7 +4,6 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
|
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
|
|
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|
|
import com.qmth.boot.core.exception.StatusException;
|
|
|
-import com.qmth.exam.reserve.bean.category.CategoryCacheBean;
|
|
|
import com.qmth.exam.reserve.bean.student.StudentInfo;
|
|
|
import com.qmth.exam.reserve.bean.student.WechatBindReq;
|
|
|
import com.qmth.exam.reserve.cache.impl.CategoryCacheService;
|
|
@@ -84,30 +83,11 @@ public class StudentServiceImpl extends ServiceImpl<StudentDao, StudentEntity> i
|
|
|
|
|
|
@Override
|
|
|
public StudentInfo findInfoByStudentId(Long studentId) {
|
|
|
- StudentEntity entity = baseMapper.selectById(studentId);
|
|
|
- if (entity == null) {
|
|
|
+ StudentInfo info = baseMapper.findInfoById(studentId);
|
|
|
+ if (info == null) {
|
|
|
throw new StatusException("学生信息不存在");
|
|
|
}
|
|
|
|
|
|
- StudentInfo info = new StudentInfo();
|
|
|
- info.setId(entity.getId());
|
|
|
- info.setName(entity.getName());
|
|
|
- info.setStudentCode(entity.getStudentCode());
|
|
|
- info.setIdentityNumber(entity.getIdentityNumber());
|
|
|
- info.setPhotoPath(entity.getPhotoPath());
|
|
|
- info.setGender(entity.getGender());
|
|
|
- info.setApplyNumber(entity.getApplyNumber());
|
|
|
- info.setOpenId(entity.getOpenId());
|
|
|
- info.setUid(entity.getUid());
|
|
|
- info.setOrgId(entity.getOrgId());
|
|
|
- info.setApplyTaskId(entity.getApplyTaskId());
|
|
|
- info.setCategoryId(entity.getCategoryId());
|
|
|
-
|
|
|
- CategoryCacheBean category = categoryCacheService.getCategoryById(entity.getCategoryId());
|
|
|
- if (category != null) {
|
|
|
- info.setCategoryName(category.getName());
|
|
|
- }
|
|
|
-
|
|
|
return info;
|
|
|
}
|
|
|
|