hjl
2024-06-07 3407c10808d75f2f9340a030f90191ecafa055a2
ruoyi-service/ruoyi-study/src/main/resources/mapper/sutdy/TStudyMapper.xml
@@ -1,22 +1,28 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.ruoyi.study.mapper.TStudyMapper">
    <!-- 通用查询映射结果 -->
    <resultMap id="BaseResultMap" type="com.ruoyi.study.domain.TStudy">
        <id column="id" property="id" />
        <result column="week" property="week" />
        <result column="day" property="day" />
        <result column="listen" property="listen" />
        <result column="type" property="type" />
        <result column="integral" property="integral" />
        <result column="sort" property="sort" />
        <result column="title" property="title" />
        <id column="id" property="id"/>
        <result column="week" property="week"/>
        <result column="day" property="day"/>
        <result column="listen" property="listen"/>
        <result column="type" property="type"/>
        <result column="integral" property="integral"/>
        <result column="sort" property="sort"/>
        <result column="title" property="title"/>
    </resultMap>
    <!-- 通用查询结果列 -->
    <sql id="Base_Column_List">
        id, week, day, listen, type, integral, sort, title
        id,
        week,
        day,
        listen,
        type,
        integral,
        sort,
        title
    </sql>
    <select id="weekList" resultType="com.ruoyi.study.dto.StudyWeekDTO">
@@ -36,10 +42,18 @@
                 LEFT JOIN t_story_listen sl ON s.id = sl.studyId
                 LEFT JOIN t_game g ON s.id = g.studyId
        <where>
            <if test="quarter != null">
                s.quarter = #{quarter}
            s.disabled = 0
              and sa.disabled = 0
              and si.disabled = 0
              and st.disabled = 0
              and sk.disabled = 0
              and sp.disabled = 0
              and sl.disabled = 0
              and g.disabled = 0
            <if test="quarter != null and quarter != ''">
                and s.quarter = #{quarter}
            </if>
            <if test="type != null">
            <if test="type != null and quarter != ''">
                and s.type = #{type}
            </if>
        </where>