|
|
@@ -123,14 +123,16 @@ public class DetailServiceImpl implements IDetailService {
|
|
|
List<PlaceInfoVO.InstructorVO> instructorVOList = new ArrayList<>();
|
|
|
List<AppInstructor> appInstructors = appInstructorMapper.selectList(Wrappers.<AppInstructor>lambdaQuery()
|
|
|
.eq(AppInstructor::getOrgCode, appSite.getOrgCode()));
|
|
|
- if (appInstructors != null) {
|
|
|
+ if (CollUtil.isNotEmpty(appInstructors)) {
|
|
|
for (AppInstructor instructor : appInstructors) {
|
|
|
PlaceInfoVO.InstructorVO vo = new PlaceInfoVO.InstructorVO();
|
|
|
BeanUtils.copyProperties(instructor,vo); // 注意参数顺序
|
|
|
List<String> category = new ArrayList<>();
|
|
|
Arrays.stream(instructor.getTrainingPrograms().split(",")).forEach(categoryId -> {
|
|
|
AppCategory appCategory = appCategoryMapper.selectById(categoryId);
|
|
|
- category.add(appCategory.getName());
|
|
|
+ if (appCategory != null) {
|
|
|
+ category.add(appCategory.getName());
|
|
|
+ }
|
|
|
});
|
|
|
vo.setCategory(category);
|
|
|
SysUser sysUser = sysUserMapper.selectById(instructor.getUserId());
|