he2802 3 anos atrás
pai
commit
5f87f84689

+ 10 - 0
zhongzheng-system/src/main/java/com/zhongzheng/modules/user/bo/UserStudyRecordQueryBo.java

@@ -96,4 +96,14 @@ public class UserStudyRecordQueryBo extends BaseEntity {
 	@Excel(name = "订单商品ID")
 	@ApiModelProperty("订单商品ID")
 	private Long orderGoodsId;
+	/** 模块名称 */
+	@ApiModelProperty("模块名称")
+	private String moduleName;
+	/** 章名称 */
+	@ApiModelProperty("章名称")
+	private String chapterName;
+	/** 节ID */
+	@ApiModelProperty("节名称")
+	private Long sectionName;
+
 }

+ 13 - 2
zhongzheng-system/src/main/resources/mapper/modules/user/UserStudyRecordMapper.xml

@@ -1271,9 +1271,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             cs.real_duration,
             u.realname,
             u.id_card,
-            cs.`name`,
+            cs.`name` as section_name,
             cm.module_name,
-            cc.chapter_id
+            cc.`name` as chapter_name
         FROM
             (
                 SELECT
@@ -1297,5 +1297,16 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
                 LEFT JOIN `user` u ON r.user_id = u.user_id
                 LEFT JOIN course_module cm ON r.module_id = cm.module_id
                 LEFT JOIN course_chapter cc ON r.chapter_id = cc.chapter_id
+            where
+                1=1
+            <if test="moduleName != null and moduleName != ''" >
+                AND cm.module_name like concat('%', #{moduleName}, '%')
+            </if>
+            <if test="chapterName != null and chapterName != ''" >
+                AND cc.`name` like concat('%', #{chapterName}, '%')
+            </if>
+            <if test="sectionName != null and sectionName != ''" >
+                AND cs.`name` like concat('%', #{sectionName}, '%')
+            </if>
     </select>
 </mapper>