From e48c899de835942661b9e062a3857965d1afe240 Mon Sep 17 00:00:00 2001 From: HanLong <404402223@qq.com> Date: Mon, 20 Apr 2026 10:19:28 +0800 Subject: [PATCH] =?UTF-8?q?fix:[=E8=AF=95=E9=AA=8C=E7=AE=A1=E7=90=86][?= =?UTF-8?q?=E7=89=A9=E8=B4=A8=E5=88=97=E8=A1=A8]?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/com/hxhq/business/service/impl/BacteriaServiceImpl.java | 3 ++- .../src/main/java/com/hxhq/business/service/impl/CellServiceImpl.java | 3 ++- .../hxhq-system/src/main/resources/mapper/business/BacteriaMapper.xml | 2 +- .../hxhq-system/src/main/resources/mapper/business/CellMapper.xml | 2 +- 4 files changed, 6 insertions(+), 4 deletions(-) diff --git a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/impl/BacteriaServiceImpl.java b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/impl/BacteriaServiceImpl.java index eade86f..9866875 100644 --- a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/impl/BacteriaServiceImpl.java +++ b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/impl/BacteriaServiceImpl.java @@ -59,7 +59,8 @@ public class BacteriaServiceImpl extends ServiceImpl i QueryWrapper queryWrapper = Wrappers.query(); queryWrapper.eq("b.del_flag", 0); if(form.getStudyId() != null) { - queryWrapper.eq("b.study_id", form.getStudyId()); + queryWrapper.eq("b.study_id", form.getStudyId()) + .eq("sb.study_id", form.getStudyId()); } if(StringUtils.isNotEmpty(form.getMc())) { queryWrapper.like("b.mc", form.getMc()); diff --git a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/impl/CellServiceImpl.java b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/impl/CellServiceImpl.java index 8a74743..6be687a 100644 --- a/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/impl/CellServiceImpl.java +++ b/hxhq-modules/hxhq-system/src/main/java/com/hxhq/business/service/impl/CellServiceImpl.java @@ -59,7 +59,8 @@ public class CellServiceImpl extends ServiceImpl implements IC QueryWrapper queryWrapper = Wrappers.query(); queryWrapper.eq("c.del_flag", 0); if (form.getStudyId() != null) { - queryWrapper.eq("c.study_id", form.getStudyId()); + queryWrapper.eq("c.study_id", form.getStudyId()) + .eq("sc.study_id", form.getStudyId()); } if (StringUtils.isNotEmpty(form.getMc())) { queryWrapper.like("c.mc", form.getMc()); diff --git a/hxhq-modules/hxhq-system/src/main/resources/mapper/business/BacteriaMapper.xml b/hxhq-modules/hxhq-system/src/main/resources/mapper/business/BacteriaMapper.xml index 8162473..e54bf72 100644 --- a/hxhq-modules/hxhq-system/src/main/resources/mapper/business/BacteriaMapper.xml +++ b/hxhq-modules/hxhq-system/src/main/resources/mapper/business/BacteriaMapper.xml @@ -10,7 +10,7 @@ - SELECT c.*, s.name as studyName + SELECT distinct c.id, c.*, s.name as studyName FROM `t_cell` c LEFT JOIN `t_study_cell` sc on c.id=sc.resource_id LEFT JOIN `t_study` s on s.id = c.study_id