From 2d113b48ea098ed7bc0829d18900dae177bc5844 Mon Sep 17 00:00:00 2001 From: liujie <1793218484@qq.com> Date: 星期五, 05 九月 2025 11:09:26 +0800 Subject: [PATCH] 修改查询 --- ruoyi-service/ruoyi-study/src/main/resources/mapper/sutdy/TSubjectMapper.xml | 14 +++++++++++++- 1 files changed, 13 insertions(+), 1 deletions(-) diff --git a/ruoyi-service/ruoyi-study/src/main/resources/mapper/sutdy/TSubjectMapper.xml b/ruoyi-service/ruoyi-study/src/main/resources/mapper/sutdy/TSubjectMapper.xml index 2dbd834..4ab24d7 100644 --- a/ruoyi-service/ruoyi-study/src/main/resources/mapper/sutdy/TSubjectMapper.xml +++ b/ruoyi-service/ruoyi-study/src/main/resources/mapper/sutdy/TSubjectMapper.xml @@ -34,7 +34,19 @@ <if test="req.type != null and req.type != ''"> and `type` like concat('%',#{req.type},'%') </if> - <if test="null != req.ids and req.ids.size()>0" > + <if test="null != req.ids and req.ids.size()>0 and type ==1"> + and firstCategory in + <foreach collection="req.ids" close=")" open="(" item="item" separator=","> + #{item} + </foreach> + </if> + <if test="null != req.ids and req.ids.size()>0 and type ==2"> + and secondCategory in + <foreach collection="req.ids" close=")" open="(" item="item" separator=","> + #{item} + </foreach> + </if> + <if test="null != req.ids and req.ids.size()>0 and type ==0"> and firstCategory in <foreach collection="req.ids" close=")" open="(" item="item" separator=","> #{item} -- Gitblit v1.7.1