Helius
2022-07-07 6a93d3d7c3c3e61339bde84c30056cad08f21e6c
src/main/resources/mapper/ArticleMapper.xml
@@ -21,8 +21,11 @@
                <if test="record.title!=null">
                    and a.title like concat ('%',#{record.title},'%')
                </if>
                <if test="record.contentType != null">
                    and a.content_type = #{record.contentType}
                <if test="record.columnIds != null">
                    and a.column_id in
                    <foreach collection="record.columnIds" separator="," close=")" open="(" item="item">
                        #{item}
                    </foreach>
                </if>
            </if>
        </where>
@@ -71,6 +74,12 @@
            <if test="record.columnCode != null and record.columnCode != ''">
                and c.column_code=#{record.columnCode}
            </if>
            <if test="record.columnIds != null">
                and c.id in
                <foreach collection="record.columnIds" item="item" open="(" close=")" separator=",">
                    ${item}
                </foreach>
            </if>
        </where>
    </select>
</mapper>