From 143ebce41207eb0d3a4df3b6bbd3d482e4f0a8c2 Mon Sep 17 00:00:00 2001 From: xiangpei <xiangpei@timesnew.cn> Date: 星期四, 16 五月 2024 18:20:41 +0800 Subject: [PATCH] 学生在线学习api --- src/main/resources/mapper/OnlineStudyMapper.xml | 28 +++++++++++++++++++++++++++- 1 files changed, 27 insertions(+), 1 deletions(-) diff --git a/src/main/resources/mapper/OnlineStudyMapper.xml b/src/main/resources/mapper/OnlineStudyMapper.xml index 1be4954..6ab5488 100644 --- a/src/main/resources/mapper/OnlineStudyMapper.xml +++ b/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"> -- Gitblit v1.8.0