Browse Source

资源分享集团校时分享给自己学校集团校和校本资源

tags/正式3.13.4^2
王宁 11 months ago
parent
commit
f73bb7f863

+ 2
- 2
sstudy/src/main/java/com/xhkjedu/sstudy/controller/resource/ResourceController.java View File

111
     }
111
     }
112
 
112
 
113
     /**
113
     /**
114
-     * @Description 分享伙伴校
114
+     * @Description 分享伙伴校(我的空间分享)
115
      * @Param [tResource]
115
      * @Param [tResource]
116
      * @Author ywx
116
      * @Author ywx
117
      * @Date 2023/7/21 9:34
117
      * @Date 2023/7/21 9:34
152
     }
152
     }
153
 
153
 
154
     /**
154
     /**
155
-     * @Description 分享集团校
155
+     * @Description 分享集团校(校本资源模块分享)
156
      * @Date 2023/8/29 16:11
156
      * @Date 2023/8/29 16:11
157
      * @Author YWX
157
      * @Author YWX
158
      * @Param [tResource]
158
      * @Param [tResource]

+ 16
- 0
sstudy/src/main/java/com/xhkjedu/sstudy/service/resource/ResourceService.java View File

379
         List<TResourceDirector> directors = new ArrayList<>(groups.size());
379
         List<TResourceDirector> directors = new ArrayList<>(groups.size());
380
         List<Integer> schoolIds = new ArrayList<>();//已分享过的学校集合
380
         List<Integer> schoolIds = new ArrayList<>();//已分享过的学校集合
381
         try {
381
         try {
382
+            //2024-1-10分享到伙伴学校时同时分享到自己所在学校集团校 和 校本资源
383
+            Integer mySchoolid = vo.getSchoolid();
384
+            TGuideGroup myGroup = new TGuideGroup();
385
+            myGroup.setSchoolid(mySchoolid);
386
+            groups.add(myGroup);//分享到自己学校集团校
387
+
388
+            resource.setSchoolid(mySchoolid);
389
+            share(resource);//分享校本资源
390
+
382
             for (TGuideGroup g : groups) {
391
             for (TGuideGroup g : groups) {
383
                 Integer schoolid = g.getSchoolid();
392
                 Integer schoolid = g.getSchoolid();
384
                 if (N_Utils.numInList(schoolid, schoolids)) {//已分享过的学校需更新试题时间
393
                 if (N_Utils.numInList(schoolid, schoolids)) {//已分享过的学校需更新试题时间
467
         List<TResourceDirector> resourceDirectors = r.getDirectors();
476
         List<TResourceDirector> resourceDirectors = r.getDirectors();
468
         List<TResourceDirector> directors = new ArrayList<>();
477
         List<TResourceDirector> directors = new ArrayList<>();
469
         List<Integer> schoolIds = new ArrayList<>();//已分享过的学校集合
478
         List<Integer> schoolIds = new ArrayList<>();//已分享过的学校集合
479
+
480
+        //2024-1-10分享到伙伴学校时同时分享到自己所在学校集团校 和 校本资源
481
+        Integer mySchoolid = r.getSchoolid();
482
+        TGuideGroup myGroup = new TGuideGroup();
483
+        myGroup.setSchoolid(mySchoolid);
484
+        groups.add(myGroup);//分享到自己学校集团校
485
+
470
         for (TGuideGroup group : groups) {
486
         for (TGuideGroup group : groups) {
471
             Integer schoolid = group.getSchoolid();
487
             Integer schoolid = group.getSchoolid();
472
             if (N_Utils.numInList(schoolid, schoolids)) {//已分享过的学校需更新资源时间
488
             if (N_Utils.numInList(schoolid, schoolids)) {//已分享过的学校需更新资源时间

Loading…
Cancel
Save