From f33f56fb2ebfea915b93467698ca6b243ee934ba Mon Sep 17 00:00:00 2001 From: xiangpei <xiangpei@timesnew.cn> Date: 星期二, 16 七月 2024 17:32:49 +0800 Subject: [PATCH] 导出完善 --- 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