zjh
2023-12-06 41f99a843fb2c0424426e006f29c1e78192eae01
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,22 @@
     * @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);
    @Select({"<script>", "select * from tj_advice a where a.id in",
            "<foreach collection='aList' item='id' open='(' separator=',' close=')'>",
            "#{id}",
            "</foreach>",
            "</script>" })
    List<TjAdvice> getAdviceStringByIds(@Param("aList") String[] aList);
}