Parcourir la source

/textbook/textbook/textbook-subscription-export-query 接口空指针问题

大数据与最优化研究所 il y a 1 an
Parent
commit
f230872820

+ 1 - 1
src/main/java/com/xjrsoft/module/textbook/service/impl/TextbookServiceImpl.java

@@ -558,7 +558,7 @@ public class TextbookServiceImpl extends MPJBaseServiceImpl<TextbookMapper, Text
         List<TextbookSubscriptionExportQueryVo> result = textbookTextbookMapper.listTextbookSubscriptionExportQuery(dto);
         //将班级转换为中文
         for(TextbookSubscriptionExportQueryVo to: result){
-            if(to.getClassIds() != null && !to.getClassIds().equals("")){
+            if(to != null && to.getClassIds() != null && !("").equals(to.getClassIds())){
                 List<Long> classIdList = new ArrayList<>();
                 String[] classIdStrs = to.getClassIds().split(",");
                 for (String classIdStr : classIdStrs){