<?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="com.base.biz.mapper.PointInfoMapper">

    <select id="getPointInfoList" parameterType="com.base.biz.model.dto.request.PointListReqDTO"
            resultType="com.base.biz.model.entity.PointInfo">
        select * from point_info
        <where>
            <if test="req.pointType != null and req.pointType != ''">
                point_type = #{req.pointType}
            </if>
            <if test="req.parentIds != null">
                and parent_id in
                <foreach collection="req.parentIds" index="index" item="item" open="(" separator="," close=")">
                    #{item}
                </foreach>
            </if>
        </where>
        order by serial asc
    </select>

</mapper>