Browse Source

submit:讲义修改

yangdamao 2 years ago
parent
commit
16b8f16a64

+ 3 - 0
zhongzheng-system/src/main/java/com/zhongzheng/modules/course/mapper/CourseHandoutsMapper.java

@@ -42,4 +42,7 @@ public interface CourseHandoutsMapper extends BaseMapper<CourseHandouts> {
 
     @InterceptorIgnore(tenantLine = "true")
     List<CourseHandouts> getHandoutsListByTenant(@Param("encoder") String encoder,@Param("handoutsName") String handoutsName,@Param("tenantId") Long tenantId);
+
+    @InterceptorIgnore(tenantLine = "true")
+    void removeHandoutsRecord(@Param("handoutsId")Long handoutsId,@Param("tenantId") Long tenantId);
 }

+ 1 - 0
zhongzheng-system/src/main/java/com/zhongzheng/modules/course/service/impl/CourseHandoutsServiceImpl.java

@@ -335,6 +335,7 @@ public class CourseHandoutsServiceImpl extends ServiceImpl<CourseHandoutsMapper,
         baseMapper.removeHandouts(handoutsId, tenantId);
         baseMapper.removeHandoutsBusiness(handoutsId, tenantId);
         baseMapper.removeHandoutsFile(handoutsId, tenantId);
+        baseMapper.removeHandoutsRecord(handoutsId, tenantId);
     }
 
     @Override

+ 4 - 0
zhongzheng-system/src/main/resources/mapper/modules/course/CourseHandoutsMapper.xml

@@ -143,6 +143,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         DELETE FROM course_file WHERE handouts_id = #{handoutsId} AND tenant_id = #{tenantId}
     </delete>
 
+    <delete id="removeHandoutsRecord" parameterType="java.lang.Long" >
+        DELETE FROM sys_goods_copy_record WHERE new_id = #{handoutsId} AND tenant_id = #{tenantId} AND type = 15
+    </delete>
+
     <select id="getHandoutsListByTenant" parameterType="map" resultType="com.zhongzheng.modules.course.domain.CourseHandouts" >
         SELECT * FROM `course_handouts` WHERE encoder = #{encoder} AND handouts_name = #{handoutsName} AND tenant_id = #{tenantId}
     </select>