Explorar el Código

update: sortId

guochao hace 5 años
padre
commit
9e9144093a

+ 4 - 1
mooctest-site-server/src/main/java/cn/iselab/mooctest/site/web/ctrl/ThemeController.java

@@ -119,10 +119,13 @@ public class ThemeController extends BaseSearchController {
 
         // 课程中的实体信息(课程信息、考试信息、练习信息) 可否为空
         List<EntityVO> entityVOList = courseVO.getEntityVOList();
+
         if(entityVOList !=null){
+            int index = 0;
             for(EntityVO entityVO: entityVOList){
+                index++;
                 entityVO.setThemeId(themeDetailVO.getId());
-                ThemeEntityRelationsVO entityRelation = themeLogic.createEntityRelation(themeDetailVO.getId(), entityVO.getEntityId(), entityVO.getEntityType(), entityVO.getSortedId());
+                ThemeEntityRelationsVO entityRelation = themeLogic.createEntityRelation(themeDetailVO.getId(), entityVO.getEntityId(), entityVO.getEntityType(), index);
                 entityVO.setSortedId(entityRelation.getSortId());
             }
         }else{