<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">

<mapper namespace="org.jeecg.modules.stm.act.main.mapper.StCaMainLableMapper">
    <select id="queryLables" resultType="org.jeecg.modules.stm.act.main.vo.StCaMainLableVo">
        SELECT  GROUP_CONCAT(sl.lable_code) AS lableCodes,GROUP_CONCAT(sl.LABLE_NAME) AS lableNames,
                scml.CA_NO AS bizNo
        FROM st_lable sl
        INNER JOIN st_ca_main_lable scml ON sl.LABLE_CODE = scml.LABLE_CODE
        <where>
            <foreach item="item" collection="query.caNoList" open="(" separator="or" close=")">
                scml.ca_no = #{item}
            </foreach>
        </where>
        GROUP BY scml.ca_no
    </select>
</mapper>