From 121a2eda372f4149864117b881e8c334dc6e6c54 Mon Sep 17 00:00:00 2001 From: lige <bestlige@outlook.com> Date: 星期五, 15 九月 2023 12:00:24 +0800 Subject: [PATCH] 1 --- ltkj-hosp/src/main/java/com/ltkj/hosp/mapper/TjAdviceMapper.java | 11 +++++++++++ 1 files changed, 11 insertions(+), 0 deletions(-) diff --git a/ltkj-hosp/src/main/java/com/ltkj/hosp/mapper/TjAdviceMapper.java b/ltkj-hosp/src/main/java/com/ltkj/hosp/mapper/TjAdviceMapper.java index e0666cb..57c3fc2 100644 --- a/ltkj-hosp/src/main/java/com/ltkj/hosp/mapper/TjAdviceMapper.java +++ b/ltkj-hosp/src/main/java/com/ltkj/hosp/mapper/TjAdviceMapper.java @@ -5,6 +5,8 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.ltkj.hosp.domain.TjAdvice; import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; +import org.apache.ibatis.annotations.Select; /** * adviceMapper鎺ュ彛 @@ -62,4 +64,13 @@ * @return 缁撴灉 */ public int deleteTjAdviceByIds(Long[] ids); + + + + @Select({"<script>", "select GROUP_CONCAT(a.title Separator ';') from tj_advice a where a.id in", + "<foreach collection='aList' item='id' open='(' separator=',' close=')'>", + "#{id}", + "</foreach>", + "</script>" }) + public String getAdviceStringByIds(@Param("aList") List<String> aList); } -- Gitblit v1.8.0