he2802 2 jaren geleden
bovenliggende
commit
688b7e8b0c

+ 0 - 1
run-prod.sh

@@ -1,5 +1,4 @@
 
-
 #!/usr/bin/env bash
 # 定义应用组名
 group_admin_name='zhongzheng'

+ 3 - 0
zhongzheng-system/src/main/java/com/zhongzheng/modules/goods/mapper/GoodsMapper.java

@@ -80,4 +80,7 @@ public interface GoodsMapper extends BaseMapper<Goods> {
     void updateHandoutsId(@Param("goodsId") Long goodsId,@Param("tenantId") Long tenantId,@Param("handoutsId") Long handoutsId);
 
     String getGoodsBusinessName(Long goodsId);
+
+    @InterceptorIgnore(tenantLine = "true")
+    Long getNewHandoutsId(@Param("handoutsName") String handoutsName,@Param("encoder") String encoder,@Param("newTenantId") Long newTenantId);
 }

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

@@ -1519,11 +1519,12 @@ public class GoodsServiceImpl extends ServiceImpl<GoodsMapper, Goods> implements
                 }
 
                 //讲义
-      /*          if (ObjectUtil.isNotNull(goods.getHandoutsId())){
+                if (ObjectUtil.isNotNull(goods.getHandoutsId())){
                     CourseHandouts courseHandouts = iCourseHandoutsService.getById(goods.getHandoutsId());
                     if (ObjectUtil.isNotNull(courseHandouts)){
                         Long oid = courseHandouts.getHandoutsId();
-                        Long newId = getNewIdByTenant(oid, GoodsCopyEnum.COURSE_HANDOUTS.getType(),newTenantId);
+//                        Long newId = getNewIdByTenant(oid, GoodsCopyEnum.COURSE_HANDOUTS.getType(),newTenantId);
+                        Long newId = baseMapper.getNewHandoutsId(courseHandouts.getHandoutsName(),courseHandouts.getEncoder(),newTenantId);
                         if (ObjectUtil.isNull(newId)){
                             //讲义业务层次
                             List<CourseHandoutsBusiness> handoutsBusinessList = iCourseHandoutsBusinessService
@@ -1561,7 +1562,7 @@ public class GoodsServiceImpl extends ServiceImpl<GoodsMapper, Goods> implements
                             handleCourseFile(courseFileList,newId,newTenantId);
                         }
                     }
-                }*/
+                }
 
                 //科目ID,拼接
                 if (StringUtils.isNotBlank(goods.getSubjectIds())){

+ 4 - 0
zhongzheng-system/src/main/resources/mapper/modules/goods/GoodsMapper.xml

@@ -956,4 +956,8 @@
             g.goods_id = #{goodsId}
     </select>
 
+    <select id="getNewHandoutsId" parameterType="map" resultType="java.lang.Long">
+        SELECT handouts_id FROM course_handouts WHERE INSTR(handouts_name,#{handoutsName}) AND encoder = #{encoder} AND tenant_id = #{newTenantId}
+    </select>
+
 </mapper>