yangdamao 1 anno fa
parent
commit
93ddfde71a

+ 7 - 0
zhongzheng-admin/src/main/java/com/zhongzheng/controller/schedule/ScheduleController.java

@@ -424,6 +424,13 @@ public class ScheduleController extends BaseController {
         return AjaxResult.success();
     }
 
+    @ApiOperation("同步一二建商品")
+    @GetMapping("/goods/copy/two")
+    public AjaxResult goodsCopyTwo(){
+        iScheduleService.goodsCopyTwo();
+        return AjaxResult.success();
+    }
+
     @ApiOperation("分销佣金解冻")
     @GetMapping("/distributionRebate")
     public AjaxResult distributionRebate(UserQueryBo bo){

+ 4 - 1
zhongzheng-system/src/main/java/com/zhongzheng/modules/grade/service/impl/ClassGradeServiceImpl.java

@@ -318,7 +318,10 @@ public class ClassGradeServiceImpl extends ServiceImpl<ClassGradeMapper, ClassGr
             else if (("继续教育二级建造师".equals(businessName)) || ("继续教育二级造价师".equals(businessName))){
                 erJfalg = true;
                 ezJfalg = "继续教育二级造价师".equals(businessName);
-                add.setOfficialName(ServletUtils.getEncoded("PIY"));
+                if (ObjectUtils.isNotNull(bo.getClassStatus()) && bo.getClassStatus() == 0){
+                    //预开班
+                    add.setOfficialName(ServletUtils.getEncoded("PIY"));
+                }
             }
         }
         //是否创建官方班级编号

+ 3 - 0
zhongzheng-system/src/main/java/com/zhongzheng/modules/schedule/service/IScheduleService.java

@@ -117,4 +117,7 @@ public interface IScheduleService extends IService<PolyvVideo> {
     void syncUserDateStudyLog();
 
     void usbUserDownload();
+
+    void goodsCopyTwo();
+
 }

+ 20 - 0
zhongzheng-system/src/main/java/com/zhongzheng/modules/schedule/service/impl/ScheduleServiceImpl.java

@@ -2038,6 +2038,26 @@ public class ScheduleServiceImpl extends ServiceImpl<PolyvVideoMapper, PolyvVide
         }
     }
 
+    @Override
+    public void goodsCopyTwo() {
+        //商品一二建复制
+        List<Goods> list = iGoodsService.list(new LambdaQueryWrapper<Goods>()
+                .eq(Goods::getEducationTypeId, 3)
+                .in(Goods::getBusinessId, Arrays.asList(6,7))
+                .eq(Goods::getProjectId, 5)
+                .like(Goods::getGoodsName,"2023")
+                .eq(Goods::getStatus, 1));
+        if (CollectionUtils.isEmpty(list)) {
+            return;
+        }
+        List<Long> goodsIds = list.stream().filter(item -> !item.getGoodsName().contains("测试")).map(Goods::getGoodsId).collect(Collectors.toList());
+        GoodsBatchCopyTenantBo bo = new GoodsBatchCopyTenantBo();
+        bo.setTenantId(713019440277910L);
+        bo.setGoodsIds(goodsIds);
+        //执行复制
+        iGoodsService.goodsCopyOne(bo);
+    }
+
 
     private String getWeeks(Long time){
         Calendar calendar = Calendar.getInstance();