he2802 1 rok pred
rodič
commit
8d30215ac9

+ 1 - 1
run-prod.sh

@@ -31,4 +31,4 @@ docker run \
 -v /mydata/app/${app_admin_name}/logs:/var/logs \
 -v /data/nginx/conf.d:/data/nginx/conf.d \
 -d ${group_admin_name}/${app_admin_name}:${app_admin_version}
-echo '----start container admin----'
+echo '----start container admin----'

+ 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){

+ 1 - 1
zhongzheng-system/src/main/java/com/zhongzheng/modules/goods/service/impl/GoodsServiceImpl.java

@@ -2526,7 +2526,7 @@ public class GoodsServiceImpl extends ServiceImpl<GoodsMapper, Goods> implements
             List<QuestionBusiness> questionBusinessList = iQuestionBusinessService
                     .list(new LambdaQueryWrapper<QuestionBusiness>()
                             .eq(QuestionBusiness::getMajorId, oldExamId)
-                            .eq(QuestionBusiness::getMajorId, 2));
+                            .eq(QuestionBusiness::getType, 2));
             if (CollectionUtils.isNotEmpty(questionBusinessList)) {
                 for (QuestionBusiness item : questionBusinessList) {
                     item.setId(null);

+ 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();