<?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.mall.product.mapper.SpuInfoDescMapper">

    <!-- 通用查询映射结果 -->
    <resultMap id="BaseResultMap" type="com.mall.product.domain.entity.SpuInfoDesc">
            <id column="spu_id" property="spuId"/>
            <id column="decript" property="decript"/>
    </resultMap>

    <!-- 通用查询结果列 -->
    <sql id="Base_Column_List">
        spu_id,decript
    </sql>

    <!-- 分页查询spu信息介绍内容 -->
    <select id="selectListByPage" resultType="com.mall.product.domain.vo.SpuInfoDescVo">
        select
        <include refid="Base_Column_List"/>
        from pms_spu_info_desc
        <where>
                <if test="dto.spuId != null and dto.spuId != ''">
                    and spu_id like CONCAT('%',#{dto.spuId},'%')
                </if>
                <if test="dto.decript != null and dto.decript != ''">
                    and decript like CONCAT('%',#{dto.decript},'%')
                </if>
        </where>
    </select>

</mapper>
