<?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="cn.com.xingxi.store.data.mapper.WxaStoreBrandStoryMapper">


    <resultMap id="ShopBrandStoryDTOResult" type="ShopBrandStoryDTO" >
        <result property="description"    column="brandStory"    />
        <result property="imageUrl"    column="fileUrl"    />
    </resultMap>

    <select id="selectShopBrandStoryByMercId" parameterType="String" resultMap="ShopBrandStoryDTOResult">
        SELECT t_shop_brandstory.brandStory, t_attch_file.fileUrl
        FROM t_shop_brandstory
        INNER JOIN t_attch_file ON t_shop_brandstory.brandStoryImg = t_attch_file.fileId
        WHERE t_shop_brandstory.delFlag = '0'
          AND t_shop_brandstory.mercId = #{mercId}
        LIMIT 1
    </select>



</mapper>
