he2802 2 éve
szülő
commit
3374b34f3c

+ 5 - 0
zhongzheng-system/src/main/java/com/zhongzheng/modules/course/domain/CourseHandouts.java

@@ -1,6 +1,7 @@
 package com.zhongzheng.modules.course.domain;
 
 import com.baomidou.mybatisplus.annotation.*;
+import com.zhongzheng.modules.course.vo.CourseFileVo;
 import io.swagger.annotations.ApiModelProperty;
 import lombok.Data;
 import lombok.NoArgsConstructor;
@@ -8,6 +9,8 @@ import lombok.experimental.Accessors;
 import java.io.Serializable;
 import java.util.Date;
 import java.math.BigDecimal;
+import java.util.List;
+
 import com.zhongzheng.common.annotation.Excel;
 
 /**
@@ -53,5 +56,7 @@ private static final long serialVersionUID=1L;
     private Long tenantId;
     @TableField(exist = false)
     private Long oId;
+    @TableField(exist = false)
+    private List<CourseFileVo> fileList;
 
 }

+ 6 - 12
zhongzheng-system/src/main/resources/mapper/modules/course/CourseHandoutsMapper.xml

@@ -122,22 +122,16 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 
     <select id="queryByGoodsList" parameterType="com.zhongzheng.modules.course.bo.CourseHandoutsQueryBo"  resultMap="CourseHandoutsResult">
         SELECT
-        s.*
+        s.handouts_name,s.can_download,cf.*
         FROM
-        goods_handouts gh
-        LEFT JOIN course_handouts s ON gh.handouts_id = s.handouts_id
+        course_handouts s
+        LEFT JOIN course_file cf ON cf.handouts_id = s.handouts_id
         WHERE
         1 = 1
-        <if test="status != null and status.size()!=0 ">
-            AND s.status in
-            <foreach collection="status" item="item" index="index" open="(" close=")" separator=",">
-                #{item}
-            </foreach>
-        </if>
-        <if test="goodsId != null and goodsId != ''">
-            AND gh.goods_id = #{goodsId}
+        <if test="handoutsId != null and handoutsId != ''">
+            AND s.handouts_id = #{handoutsId}
         </if>
-        ORDER BY gh.sort
+        ORDER BY cf.sort
     </select>
 
 </mapper>