xiangpei
2024-05-16 143ebce41207eb0d3a4df3b6bbd3d482e4f0a8c2
src/main/resources/mapper/OnlineStudyMapper.xml
@@ -28,7 +28,33 @@
            </if>
        </where>
        ORDER BY
        create_time DESC
            tos.create_time DESC
    </select>
    <select id="byType" resultType="com.mindskip.xzs.domain.vo.OnlineStudyVO">
        SELECT
            tos.id,
            tos.content_type,
            tos.content_url as contentUrlString,
            tos.belong_type,
            tos.subject,
            tos.create_time,
            tos.update_time,
            tos.attachment as attachmentString
        FROM
            t_online_study tos
                INNER JOIN t_study_type tst ON tst.id = tos.belong_type
        <where>
            AND tos.deleted = 0
            <if test="query.subject != null and query.subject != ''">
                AND tos.subject like concat('%', #{query.subject}, '%')
            </if>
            <if test="query.belongType != null">
                AND tst.id = #{query.belongType}
            </if>
        </where>
        ORDER BY
            tos.create_time DESC
    </select>
    <insert id="add" keyColumn="id" useGeneratedKeys="true" parameterType="com.mindskip.xzs.domain.OnlineStudy">