Commit 6a872472 by 桂前礼

bug: [none] bookId匹配失败则返回全部

parent e66db746
...@@ -151,14 +151,13 @@ public class WeworkTeacherBizImpl implements WeworkTeacherBiz { ...@@ -151,14 +151,13 @@ public class WeworkTeacherBizImpl implements WeworkTeacherBiz {
public List<WeworkTeacherVO> queryAll(Long bookId) { public List<WeworkTeacherVO> queryAll(Long bookId) {
if (Objects.nonNull(bookId)){ if (Objects.nonNull(bookId)){
WeworkTeacherBookBind bind = weworkTeacherBookBindMapper.getByBookId(bookId); WeworkTeacherBookBind bind = weworkTeacherBookBindMapper.getByBookId(bookId);
if (Objects.isNull(bind) || StrUtil.isBlank(bind.getWeworkTeacherArr())){ if (Objects.nonNull(bind) && StrUtil.isNotBlank(bind.getWeworkTeacherArr())){
return new ArrayList<>(); List<Long> longs = JSONObject.parseArray(bind.getWeworkTeacherArr(), Long.class);
} if (CollUtil.isEmpty(longs)){
List<Long> longs = JSONObject.parseArray(bind.getWeworkTeacherArr(), Long.class); return new ArrayList<>();
if (CollUtil.isEmpty(longs)){ }
return new ArrayList<>(); return weworkTeacherMapper.getMaterialByIds(longs);
} }
return weworkTeacherMapper.getMaterialByIds(longs);
} }
return weworkTeacherMapper.queryAll(); return weworkTeacherMapper.queryAll();
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment